There is a function format_csv in package readr, which outputs csv formated output to string. It can be used as
to_console<-function(dta){
cat(readr::format_csv(dta))
}
dta |> someoperation() |> to_console()
print to console tables that can be easily copied and pasted to Excel
3 years ago by CthulhuDreamer to c/r_programming
There is a function format_csv in package readr, which outputs csv formated output to string. It can be used as
to_console<-function(dta){
cat(readr::format_csv(dta))
}
dta |> someoperation() |> to_console()
Seconding clipr, it's my go-to for when i just need to quickly check or transferring something to and from Excel.
@programming.dev
Please use this as a forum to discuss R, and learn more about it. If you have any questions about how to do specific things in R, this is the place to ask.
You can download R here.
You can download RStudio here. RStudio IDE, which is supported by Posit PBC, is a powerful and well-developed IDE for R. Other development environment options include Emacs addon Emacs Speak Statistics and VSCode.
Other communities that may be of interest across the fediverse:
Please send @a_statistician a message to recommend additional communities to add to this list.
go to feed...
@programming.dev
Please use this as a forum to discuss R, and learn more about it. If you have any questions about how to do specific things in R, this is the place to ask.
You can download R here.
You can download RStudio here. RStudio IDE, which is supported by Posit PBC, is a powerful and well-developed IDE for R. Other development environment options include Emacs addon Emacs Speak Statistics and VSCode.
Other communities that may be of interest across the fediverse:
Please send @a_statistician a message to recommend additional communities to add to this list.
go to feed...
I use
clipr::write_clipandclipr::read_clip- can paste to excel but also read in something you've copied from excel.Helpful when you have a client with poorly formatted excel files, to the point that
readxlwon't do the job đsave