简体   繁体   中英

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.

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))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM