-
Notifications
You must be signed in to change notification settings - Fork 20
R programming language
- https://www.kaggle.com/wiki/Tutorials
- Data Camp Introduction to R class: https://www.datacamp.com/courses/introduction-to-r -- theoretical explanation, simple codes, ideal for R beginners who would like to have a look at basics without installing R
- swirl online interactive courses, covering topics like basic R programming, regression models, data collection and cleaning: http://swirlstats.com/students.html
- O'Reilly Code School – Try R: http://tryr.codeschool.com/
- Video tutorial: https://www.youtube.com/watch?v=iffR3fWv4xw
- One-page R cheat-sheets: http://www.datasciencecentral.com/profiles/blogs/one-page-r-a-survival-guide-to-data-science-with-r -- recommended rather if you know exactly what you are looking for, otherwise it is waste of time
- ggplot2 documentation: http://docs.ggplot2.org/current/
- advanced n-dimensional data visualization packages and functions (treemaps, parallel coordinates, steam graphs, correlograms, graphs): http://statacumen.com/teach/SC1/SC1_18_Plots.pdf
R readability rules (at least, one version from the Berkeley): https://docs.google.com/document/d/1esDVxyWvH8AsX-VJa-8oqWaHLs4stGlIbk8kLc5VlII/edit
Advanced R usage: http://adv-r.had.co.nz/ -- advanced topics, like exception handling, metaprogramming or profiling by Hadley Wickham
Data table cheat sheet: https://s3.amazonaws.com/assets.datacamp.com/img/blog/data+table+cheat+sheet.pdf
RStudio cheat sheet: https://www.dropbox.com/s/0moch6xocili6v9/RStudio%20Shortcuts.pdf?dl=0
Check out this tutortial: http://www.r-bloggers.com/installing-r-packages/
Well nothing could be easier. We just fire up an R shell and type:
> install.packages("ggplot2")
In theory the package should just install, however:
* if you are using Linux and don’t have root access, this command won’t work.
* you will be asked to select your local mirror, i.e. which server should you use to download the package.
Quitting from lines 7-7 (plotLines.rhtml)
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
Calls: knit ... write.csv -> eval.parent -> eval -> eval -> write.table -> file
Execution halted
The problem is that R is unable to write to some directory under the site-library
dir.
sudo chown -R $USER:$USER /usr/local/lib/R/site-library/
Use superscripts on the y axis:
ys = -10:10
yvalues = parse(text=paste("10^", ys, sep=""))
On my Mint 18 (Ubuntu 16.04) installation, for both R 3.2.x and 3.4.y, installing tidyverse resulted in the following error:
ERROR: dependencies ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
To fix this, I had to install some packages:
sudo apt install -y libssl-dev libxml2-dev libcurl4-openssl-dev
RBGL can be installed through Bioconductor, which currently (late 2018) requires R 3.5+.
You might also need to install the XML
package separately:
install.packages('XML')
Example snippet:
library(RBGL)
con <- file(system.file("test.gxl", package="RBGL"))
coex <- fromGXL(con)
close(con)
This returns an error:
Error in xmlEventParse(contents, graph_handler(), asText = TRUE, saxVersion = 2) :
Can't parse
In addition: Warning message:
In UseMethod("as.list") : closing unused connection 3 ()
The solution of to drop system.file
, which loads the file from the installation directory of the package. Do not forget to adjust the working directory with setwd
.
library(RBGL)
con <- file("test.gxl")
coex <- fromGXL(con)
close(con)
RStudio does not start on Xubuntu with the following error:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Aborted (core dumped)
Solution (source):
sudo apt-get install libqt5gui5