Home > Back-end >  How to copy all outputs when all outputs cannot be shown due to size in R console?
How to copy all outputs when all outputs cannot be shown due to size in R console?

Time:09-11

I have a data, named Grain, and this data is enormous (until 7849 rows).

After upload the excel file in R, I'd like to convert this data as code. So I used dput(Grain).

Grain<- read_excel("Grain.xlsx", sheet=1)
dput(Grain)

However, due to enormous amounts, all output couldn't be shown in R console. As far as I know, the code should start with "structure(list(" but this output starts with values.

Could you let me know how to copy all output even thought all of them are not shown in console?

Thanks

enter image description here

CodePudding user response:

See ?dput. This function has a file argument. Give a filename and the output will be saved in this file. The particular default value file = "" is for output in the console.

  • Related