This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.
library(rgdal)
## Loading required package: sp
## rgdal: version: 1.3-6, (SVN revision 773)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01
## Path to GDAL shared files: /usr/share/gdal/2.1
## GDAL binary built with GEOS: TRUE
## Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
## Path to PROJ.4 shared files: (autodetected)
## Linking to sp version: 1.3-1
library(sf)
## Linking to GEOS 3.5.1, GDAL 2.1.3, PROJ 4.9.2
library(sp)
library(cartography)
library(RColorBrewer)
install.packages("magick")
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5'
## (as 'lib' is unspecified)
## Warning in install.packages("magick"): installation of package 'magick' had
## non-zero exit status
library(magick)
## Linking to ImageMagick 6.9.7.4
## Enabled features: fontconfig, freetype, fftw, lcms, pango, x11
## Disabled features: cairo, ghostscript, rsvg, webp
str(magick::magick_config())
## List of 21
## $ version :Class 'numeric_version' hidden list of 1
## ..$ : int [1:4] 6 9 7 4
## $ modules : logi TRUE
## $ cairo : logi FALSE
## $ fontconfig : logi TRUE
## $ freetype : logi TRUE
## $ fftw : logi TRUE
## $ ghostscript : logi FALSE
## $ jpeg : logi TRUE
## $ lcms : logi TRUE
## $ libopenjp2 : logi FALSE
## $ lzma : logi TRUE
## $ pangocairo : logi TRUE
## $ pango : logi TRUE
## $ png : logi TRUE
## $ rsvg : logi FALSE
## $ tiff : logi TRUE
## $ webp : logi FALSE
## $ wmf : logi TRUE
## $ x11 : logi TRUE
## $ xml : logi TRUE
## $ zero-configuration: logi FALSE
library(magick)
tiger <- image_read_svg('/cloud/project/literate-and-illiterate-world-population (2).svg', width = 2000)
print(tiger)
## format width height colorspace matte filesize density
## 1 PNG 2000 1412 sRGB TRUE 0 72x72
library(magick)
tiger <- image_read_svg('/cloud/project/projections-of-the-rate-of-no-education-based-on-current-global-education-trends-1970-2050 (1).svg', width = 2000)
print(tiger)
## format width height colorspace matte filesize density
## 1 PNG 2000 1412 sRGB TRUE 0 72x72