Questions tagged [r]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Linux Centos 7 unable to install png and EBImage package on R

I am fighting to install png and EBImage R package on my linux centos 7 machine. I have always this error message: Error: package or namespace load failed for ‘png’ in dyn.load(file, DLLpath = ...
0
votes
0answers
20 views

Using R on terminal also using apt-offline also purging programmes

So I did something stupid, but deliberately. So I've been using Linux (specifically MX Linux) for a few months, and I'm trying to learn it all in depth. Since coming from Windows 7 I like everything ...
1
vote
1answer
30 views

working directory in gnuplot

How do I specify the working directory for gnuplot in interactive mode? If I want to call a script with "call 'label_loop.gnu'" and do not want to put the script file in the gnuplot installation ...
0
votes
1answer
34 views

Fail to install R on linux Mint 19

I am struggling to install R, I am failing over and over again... At first I just wanted to upgrade from 3.4.4 to 3.4.6 and it failed all the time so I decided to uninstall R completely and install it ...
0
votes
0answers
15 views

Can one do Libreoffice calc sripting by saving file and reload it after the file has been modified?

I have Libreoffice 6.0.7.3 and Ubuntu 18.04. Is is possible to do spreadsheet scripting as follows? When the script starts, it saves the files opened to csv files. Then some programming language like ...
0
votes
0answers
34 views

DiffBind installation failed R version 3.3.2

I am struggling installing R package DiffBind. What I am doing is : source("https://bioconductor.org/biocLite.R") biocLite("DiffBind", dependencies=TRUE) However, some dependencies are not available ...
0
votes
0answers
20 views

How to looping over a column and if pattern matches, count related characters in other columns using R?

I have a data frame with 1000 rows and 21 columns which the first column is miRNA gene names and other columns show each nucleotide in each position: What I want is to make a loop over the first ...
4
votes
2answers
638 views

Downloading from a public server: SSL certificate problem: unable to get local issuer certificate

I want to download a file (https://discovery.ucl.ac.uk/1575442/1/Palmisanoetal.zip) from a public server via the R command temp <- tempfile() utils::download.file(db_url, temp, method = 'curl')...
0
votes
1answer
401 views

Troubles with the installation of R on Ubuntu 18.04

I have this version of Ubuntu Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic on my computer in a dual boot with Windows. I have tried to install R ...
0
votes
1answer
141 views

How one can install pdftools to RStudio on Ubuntu?

Does anyone knows how to install pdftools to RStudio 1.2.5019 that runs on Ubuntu 18.04.3 LTS? I tried: > install.packages("pdftools") Installing package into ‘/home/jaakko/R/x86_64-pc-linux-gnu-...
0
votes
1answer
25 views

Install R on rhel 6

Am getting below error when I do ./configure -with-x=no checking whether zlib support suffices... configure: error: zlib library and headers are required Installation Steps which I follow sudo ...
0
votes
0answers
60 views

Nixos trouble installing R package openssl

I installed nixos recently and am still not familiar with it. I am struggling to install the R package openssl. After I enter the following command nix-shell -p R pkgconfig openssl nix-shell -p gpp ...
0
votes
0answers
25 views

R packages won't install on conda R environment

I am trying to install an R package to an R environment created through conda on an HPC Server where I am doing some bioinformatics. I tried to run the usual R command (which works and install the ...
1
vote
2answers
76 views

Sum occurrences of string for each row of a matrix using awk

I have a very long data frame (~11 million x 130) for which is sparsely filled with percentages (0.00 - 100.00, float). The entries that are missing are labeled "NA", like so: cat1 NA NA ...
-1
votes
1answer
32 views

What is the best way to get the latest version of R? [closed]

A lot of instructions that I find on here give instructions about how to install the latest version of R that either deliver an out of date version, or are very OS-dependent. I just bought a System76 ...
10
votes
3answers
12k views

Installing/updating R 3.6 on Ubuntu 18.04

I've recently acquired a machine with Ubuntu 18.04 on it. I installed R simply with: sudo apt-get install r-base And when I call $ R in console, it starts up with: R version 3.4.4 (2018-03-15) -- "...
1
vote
0answers
37 views

R packages keep asking for update

The following R packages keep asking for updates, each and everyday, even after I update everything! r-cran-kernsmooth r-cran-mgcv r-cran-nnet r-cran-spatial Here they are on the list of OS Updates (...
0
votes
2answers
59 views

merge 1st column and 2nd column; 3rd and 4th column and so on with a separator

I have a text file with 61000 columns and 173 rows. I would like to merge data on every 2 columns i.e., columns 1 and 2 should be merged, 3 and 4 should be merged, 5 and 6 should be merged and so on. ...
0
votes
0answers
14 views

Using R ggplot2 how do I give a unique color based on name start of column, and hue variations for each unique color

I'm using this below code to plot my PCA, however, I want to be more specific with the colouring. In col=Alleles, I have names like: [C_T_29] [A_T_21] [C_A_16] [A_G_20] [C_T_29] I want to give a ...
0
votes
2answers
125 views

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"...
0
votes
0answers
68 views

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 ...
0
votes
0answers
28 views

Combining files by column-paste does not work as intended

I'm trying to combine files together to use in R using terminal since I cannot do it in R due to limit in RAM size. I tried using something like paste * > file using smaller test files so I ...
1
vote
0answers
34 views

Old version of of R Cannot Find Packages on RHEL 7

I am working on a Redhat 7 linux server and utilizing an extremely old version of R (3.0.3 to be exact). I had to install this version of R from a source file. I properly configured the Renviron file ...
0
votes
0answers
25 views

R3.5 intallation error on Linux Mint 19

Since I have got to use R>=3.5 as one of the core prerequisites for my bioinformatics, I've tried to install it on my Linux Mint 19. However, upon strictly following this tutorial, I realised that ...
0
votes
1answer
32 views

Add a part of value from file1 to column in file 2 if there is a match

I have 2 csv files: file (1 column)1: Prokaryote,Caudovirales,Myoviridae Prokaryote,Caudovirales,Podoviridae Prokaryote,Caudovirales,Siphoviridae Prokaryote,Ligamenvirales,Lipothrixviridae ...
5
votes
1answer
4k views

error while loading shared libraries; file too short

I am working on a CentOS 7 workstation. I had installed Rstudio and it was working fine until recently. But now, if I try to launch it at http://localhost:8787/ I get an error that says Unable to ...
0
votes
1answer
69 views

Extract data based on second column [closed]

Now I have a file format like ACTG,CD1,234 BGTY,CD2,561 CFRT,CD3,27 DGTY,CD4,45 EYTG,CD5,23 FJUI,CD1,78 GYHJ,CD2,89 HYHG,CD3,107 IUHJHU,CD4,55 JMJGT,CD5,77 I want my output file like: CD1,ACTG,234 ...
1
vote
1answer
39 views

Uninstall R from Docker image

I have tried: sudo apt-get remove r-base sudo apt-get remove r-base-core delete everything in .libPaths() The thing is, I'm using a Docker container which came with R installed in it. ...
0
votes
0answers
40 views

How to split a bash loop on several nodes with Slurm?

I would like to split this loop : for i in $subset do srun Rscript my_script.R --subset $i done where $subset corresponds to seq 1 number . I would like to execute each value of i on multiple nodes....
0
votes
0answers
30 views

Library path for R

I installed Spark and during the installation I think I changed some settings in .bash_profile. Now, when I try to compile with Markdown I get the following error: Restarting R session... Error: 2:...
0
votes
0answers
81 views

How to run Rscript on multiple files to get table of separated outcomes named as original files?

I have written R script which takes a file from the folder. (CSV. files) The total length of the trajectory of a particular object is computed (one number). I have to do this process on all files in ...
-1
votes
3answers
435 views

How to calculate mean of each 3 columns in data frame?

I have a data frame like this: > head(dat_sg2) DwoC_2318_norm.1 DwoC_2318_norm.2 DwoC_2318_norm.3 DwoC_3395_norm.1 DwoC_3395_norm.2 DwoC_3395_norm.3 DwoC_6154_norm.1 ...
-1
votes
1answer
56 views

Sort based on second column and list from highest to lowest

TGAAACATGCCTTTCACCTCCTGCCATGATTGTGAGGCCT 2 GTGTTGCCCAGGTTGGTTTCAAACTCAGCTCAAGTGATCT 1 GAGACTCCTTCAGGAGACTGGTCCCCTGTCCTCGCCTCTC 3 CATGTTCTCCTGGAAGCCATGTGAGGAAGGCACATCATGG 8 ...
1
vote
1answer
278 views

How to set R to use all of the width of my terminal?

I am running interactive R in terminal, however it doesn't use all of the width of the terminal. It only use 72 characters out of 226. It is very uncomfortable to read any data with a lot of columns ...
1
vote
1answer
515 views

Give a user permissions to start, stop or restart shiny-server

I need to give permission to a user to start, stop and restart Rstudio's shiny-server. Right now, I have been managing the service upon this user's request with sudo service restart shiny-server, but ...
-2
votes
4answers
120 views

Filter specific numbers from multiple files

I have multiple files (apx. 150) that look like this: reconstructed_hap_4_Local_nt_haplo_freq_60.3 ...
1
vote
1answer
92 views

Merge two tables based on value in first column

I have 1 table like this (csv file): p1 p10 p16 p19 p25 p3 p5 p6 p8 p9 con1 567 0 3 0 18 17 8 4 6 7 con3 490 7 6 2 23 26 20 14 12 29 con4 737 1 4 1 ...
0
votes
4answers
48 views

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 ...
0
votes
1answer
1k views

Unmet dependencies: libjpeg8 (>= 8c) but it is not installable when installing R

I'm getting unmet dependencies when trying to install R on Debian 9 (stretch). Specifically, running: $ sudo apt-get install r-base-core results in Reading package lists... Done Building dependency ...
1
vote
3answers
1k views

Does Bash or AWK have IN operator like R programming Language?

In R, We have IN operator to check whether or not the element is present in the specific column. For example: If we have fruits and market dataframe with fruit_name and products as the column name ...
1
vote
0answers
23 views

Cropped plot labels in knitted PDF in Linux

Has anyone experienced having their plot labels cropped in knitted PDF's in Linux? This does not happen in my Windows machine. Here is a minimal r-markdown example to replicate this problem. --- ...
1
vote
1answer
895 views

Cannot download packages on R (neither RStudio nor Terminal)

I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on ...
1
vote
0answers
411 views

R: how to install RCurl on Debian Linux 9 (stretch)?

I have tried all kind of libcurl apt packages and so forth. I need RCurl for h2o in Debian Stretch. How can I install RCurl in Debian? ** R ** data ** inst ** preparing package for lazy loading ** ...
0
votes
2answers
215 views

Match the nearest timestamp in milliseconds

I have a large data.txt file as below; for every timestamp, I need to find the nearest time match 5 minutes later and the value on column 4. Now print both in two new columns. for example for "2018-...
7
votes
1answer
5k views

Lots of red in htop — does that mean my tasks are tripping over each other?

I've read that the color red indicates "kernel processes." Does that mean little daemons that are regulating which task gets to use the CPU? And by extension, transaction costs in an oversubscribed ...
-1
votes
1answer
357 views

Split Large files based on line number, run it and then append the final output into one file

I am using an R package. The input files required to run in the the package are large(as big as 65 Gb of size) So I have decided to split the file in chunks based on line number and then merge the ...
1
vote
0answers
381 views

How to increase memory limit and number of cores that Rstudio uses on a cluster

I launched Rstudio using FastX on Rivanna cluster (CentOS Linux release 7.3.1611 (Core)): https://arcs.virginia.edu/rivanna The main goal for doing that was to significantly increase the speed of ...
-1
votes
4answers
73 views

Extract row with maximum value from multiply represented second variable

I have a problem that I cant seem to solve. I have a massive tab-delimited text file similar to: chr 10 20 20 a chr 30 40 10 b chr 30 40 15 b chr 30 40 11 b What I need is to: 1) extract all ...
0
votes
1answer
2k views

Install ncdf4 R package with shell script

I am trying to install the ncdf4 R package into a remote machine by using an R script ran by a shell script. I tried to install other packages and it works fine but with the ncdf4 package it doesn't. ...
1
vote
1answer
6k views

Running R script via shell script. syntax error near unexpected token `('

I am currently trying to run an R script via a shell script. Here the R script: test = rnorm(1:100, 1000) write.csv(test, 'test.csv') And here the bash script which calls the R one: #!/bin/bash -l ...