[英]How to concatenate the results of two commands in R
How we can concatenate the results of two R
commands dim(filename)
and summary(filename)
for the filename in one output file as output.我们如何将两个
R
命令的结果连接到一个输出文件中的文件名dim(filename)
和summary(filename)
作为输出。
I tried it but it is not correct:我试过了,但它不正确:
output <- c(dim(filename), summary(filename)
OR
output <- dim(filename); summary(filename)
any help is appreciated.任何帮助表示赞赏。
当两个元素的class
不同时,最好将其放在一个list
以保留class
。
output <- list(dim(filename), summary(filename))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.