Using Rstudio, I am attempting to display a dataFrame using the View() command. The command automatically sends the output to the 'Source' quadrant.
Is there any way to send it instead to either the "Workspace" quandrant or the "Files,Plots..." quadrant? Here is my code:
qRows <- data.frame( RowQuery = character(0), "BackTest P&L" = character(0), stringsAsFactors=FALSE)
qRows[nrow(qRows) + 1, ] <- c("@sp500(vwpc) | rsi(30) | qcume", "12%")
View(qRows)
to display a data frame in the "Files,Plots..." quadrant (Viewer) use the DT package:
if (!require("DT")) devtools::install_github("rstudio/DT")
datatable(qRows)
all those commands will open it in a separate window:
edit(qRows)
invisible(edit(qRows))
or
data.entry(qRows)
utils::View(qRows)
R Package googleVis can send your table to browser:
if (!require("googleVis")) devtools::install_github("rstudio/googleVis")
plot(gvisTable(qRows))
knitr/RMarkdown can send your dataframe to html/pdf/doc/slides etc; you will create a beautiful table in console or markdown issued file with:
if (!require("knitr")) devtools::install_github("rstudio/knitr")
knitr::kable(qRows)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With