What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-09 13:05:25
R Api-library
install.packages(c("httr", "jsonlite")) Add solution -
R 2022-01-23 03:01:26
r install package
# Basic syntax: install.packages("package_you_want") # To then use the package in R, you need to run: library(package_you_want) # Note, when you install a package, the package name has to be in quotes # but when you load it, it shouldn't be # ... Add solution -
R 2021-10-27 09:15:22
r cbind vectors of unequal length
# Example usage: # If you have several vectors that you want to combine column-wise # or row-wise without repeating values from the shorter vectors, # here is the easiest approach for doing that that I've found: # Define vectors: vector_1 <- c("a... Add solution -
Other 2021-10-21 00:04:03
"zip_mass_appdata_for_map.rds"
if(!require("pacman")){ install.packages("pacman")}pacman::p_load(dplyr, tidycensus, leaflet, readr, sf, tmap, tmaptools, choroplethrZip, tidyr, scales)# You need a U.S. Census Bureau key. See help("census_api_key", package ... Add solution -
Other 2021-09-26 21:55:03
ggplot in R how to show information by hovering
install.packages("plotly") library(plotly) p <- ggplot(data = df, aes(x = Date, y = Revenue)) + geom_line(colour = "grey", aes(Date, Target)) + geom_line(colour = "#408FA6") ggplotly(p) Add solution -
-
Shell/Bash 2021-09-08 08:56:01
rstudio find out if package is installed
#Easy way to check if packages are already installed in RStudio packages <- c("ggplot2", "dplyr", "Hmisc", "lme4", "arm", "lattice", "lavaan") if (length(setdiff(packages, rownames(i... Add solution -
Shell/Bash 2021-08-29 00:10:02
how to install a package from a specific repo in r
install.packages("neuralnet") # run this once library(neuralnet) # have this on top of your script install.packages(pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, type), method... Add solution
Best helpers
Zach Zundel
+5
JSanchez
+5
Sam davies
+5
M. Arafat
+5
AMACB
+5
M208
+5
Kraig Lee
+5
Dk123
+5
Phatfingers
+5
Optimist
+5
Jsuissa
+5
Steve Caine
+5
Aerin
+5
Nsayer
+5
Phuzi
+5
E meyr
+5
Kevin Raffay
+5
Amziraro
+5
Zijoud
+5
Wad Cheber
+5
Saqib Iqbal
+5