Questions tagged [r]

R is a programming language and software environment, mostly used for statistical computing and graphics.

R is a programming language and open-source environment for statistical computing and graphics. R packages and resources are available on CRAN.

See also R on Stack Overflow.

173 questions
2
votes
0 answers

Rscript behaving badly

This works: TMPDIR="/tmp/___" export TMPDIR mkdir -p "$TMPDIR" script="$TMPDIR"/myscript cat <<'EOF' > "$script" #!/usr/bin/Rscript --vanilla --slave …
Ole Tange
  • 35,514
2
votes
0 answers

Line plot on replicated data in R

I am trying to do a line plot using ggplot on my replicated data. There are five data sets and each data has five replicates as a1, a2, a3, a4, a5. Similarly for data b, I have b1, b2, b3, b4 and b5. So for data c, d and e. The header of the file…
Gavin
  • 91
2
votes
2 answers

Install missing R packages when running in bash mode

Frequently I am running R scripts in bash mode. My script is called 981_conduct_regression.R. In this script, I call required packages with if(!require()){ install.packages("") library() } Now when I call the script…
MERose
  • 527
  • 1
  • 10
  • 24
1
vote
1 answer

use the R documentation over a local webserver

When I use R on Windows (inside Rgui) and type ?table a browser window opens and show me the documentation about table. This work local without internet connection. When I do this on Debian unstable in R the help text is displayed inside the R…
buhtz
  • 865
  • 1
  • 12
  • 23
1
vote
0 answers

install and run new version of R

an old version of R is already installed on the server I am working with, but it is not really useful for my work. I have tried to install R 3.1.1 on my own directory (/local/data/project/behi) on the server using this command : $ wget…
0
votes
2 answers

How to create a new column based on the values from multiple columns which are matching a particular string?

I have data frame which looks like this: df=data.frame( eye_problemsdisorders_f6148_0_1=c("A","C","D",NA,"D","A","C",NA,"B","A"), eye_problemsdisorders_f6148_0_2=c("B","C",NA,"A","C","B",NA,NA,"A","D"), …
anikaM
  • 177
0
votes
0 answers

Install R package 'xml2' without root access

I would like to install xml2 R package (devtools package requires xml2) on a Red Hat server but I don't have root access, is it possible to install an R package without having root access? Thank you I tried to install the normal way as…
0
votes
4 answers

Replacing with zero values below the treshold, but starting from specific cell

I have a matrix in which I want to replace all values with 0 if they are below 25. I want to keep first row and column. p1 p10 p16 p19 p25 p3 p5 p6 p8 p9 call1 567 0 3 0 18 17 8 4 6 7 call20 4900 7 6 2 …
0
votes
1 answer

Loop over a data frame comparing elements of the first and second row

I want to loop over a dataframe, I want to compare one of the elements of the actual row and the next row. for example, I have a data frame that looks like this: V1 V2 V3 V4 1 chr1 10 1000 …
0
votes
1 answer

Rstudio : openxlsx read loop crashes when no delay added ... why?

I have a loop where I load 10 huge excel 2007 files into a list of data.frame thanks to openxlsx library. This loop crashes at the 4th file when no delay is added. Adding a 500ms delay after each read solves the problem. Can you tell me why? Even if…
Syl33
  • 183