May 2019
Intermediate to advanced
320 pages
9h 17m
English
There are several ways to run R commands:
>), and press Enter.Note that the > symbol at the beginning of each R command in the R Studio console window is a prompt generated by R.
Type “?” followed by a command name, for example:
> ?library> ?matrix
By setting the working directory in R using command setwd, files can be read from or written to this default location, for example
> setwd("C:/Bayesian") > getwd() > install.packages("mcmcplots") > library(rjags) There are two ways to assign a value to a variable in R:
> x <- 3
or
> x = 3
Both of these commands assign the value 3 to the variable x. When you type x, its value will be shown.
> x[1] 3
> c(1,3,5) ...Read now
Unlock full access