I want to view contents of a dataframe variable in console in a column mode

Question is very simple.

I run df$var1 and results appear in console in a format like

df$var1
[1] "09467" "20304" "28634" "29592" "30930" "98730" "98780" "98810"

I don't know how can I get this data, in console, in this way

"09467"
"20304"
"28634"
"29592"
"30930"
"98730"
"98780"
"98810"

I can do several things as viewing on RStudio Viewer, writing to a csv and so on. But I would like to take the output on console and copy&paste to another place in a easy way without row numbers or something annoying.

Thank you

A fellow of mine has found the answer.

Following my own sample:

cat(df$var1, sep=\n") returns data in the way I look for. (I'm working on a Windows environment)

Thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.