Type: | Package |
Title: | Useful Shortcuts to Interact with 'RStudio' Scripts |
Version: | 1.4.0 |
Author: | José Carlos Del Valle <jcval94@gmail.com> |
Maintainer: | José Carlos Del Valle <jcval94@gmail.com> |
Description: | Integrates clipboard copied data in R Studio, loads and installs libraries within a R script and returns all valid arguments of a selected function. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 3.5.0), rstudioapi |
Imports: | utils |
RoxygenNote: | 6.1.1 |
URL: | https://github.com/jcval94/shortcuts |
BugReports: | https://github.com/jcval94/shortcuts/issues |
SystemRequirements: | RStudio |
NeedsCompilation: | no |
Packaged: | 2019-12-17 06:05:54 UTC; cody8 |
Repository: | CRAN |
Date/Publication: | 2019-12-17 09:50:02 UTC |
Creates a file copying current code without comments and tabuations
Description
Creates a file copying current code without comments and tabuations
Usage
clear.code()
Value
clear code to be executed
Examples
# Copy and paste all the following code in RStudio
1+1
clear.code()
A function to import copied data in RStudio via clipboard, the use of Addins is also highly recommended
Description
A function to import copied data in RStudio via clipboard, the use of Addins is also highly recommended
Usage
copypaste()
Value
A data frame object named "x" in .GlobalEnv
Examples
# Copy (Ctrl+C) a excel/google sheets/ online table such as the table:
# https://en.wikipedia.org/wiki/Standard_normal_table
# Then push Addins -> shortcuts / Copy Paste or Run the following code:
copypaste()
if("x" %in% ls()){x}
Compiles and installs all libraries in the current RStudio script where the word library is written
Description
Compiles and installs all libraries in the current RStudio script where the word library is written
Usage
libraries()
Value
libraries compiled
Examples
# Copy and paste all the following code in RStudio
loaded_pkgs<-(.packages())
# library(ggplot2)
# library(dplyr)
libraries()
loaded_pkgs2<-(.packages())
loaded_pkgs2[!loaded_pkgs2 %in% loaded_pkgs]
Displays all arguments and its values from a selected R function
Description
Displays all arguments and its values from a selected R function
Usage
r.args()
Value
arguments ready to run
Examples
# Copy and paste the function in RStudio, select the text and push Addins/Read Arguments
rnorm(n=100)
Read all documents in a folder and subfolders assigning them to the global environment; just extensions ".txt" and ".csv" are allowed
Description
Read all documents in a folder and subfolders assigning them to the global environment; just extensions ".txt" and ".csv" are allowed
Usage
read.all(dir = getwd())
Arguments
dir |
directory to read |
Value
data frame objects
Examples
lib<-getwd()
read.all(lib)