Reputation: 1272
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.
Upvotes: 1
Views: 198
Reputation: 887048
When the class
of two elements are different, it is better to place it in a list
to preserve the class
.
output <- list(dim(filename), summary(filename))
Upvotes: 2