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

Unable to Update R on Linux Mint 18

I originally posted this on the Stack Overflow site. I understand that it is inappropriate to ask the same question on multiple sites, but they were unable to help and I was told to come here. I am ...
0
votes
0answers
25 views

Structure needs cleaning error in R

Working in 64bit CentOS 7 Wanted to install MetaIntegrator package in RStudio which requires R > 3.6 So upgraded R using command sudo yum update R Restarted RStudio and attempted installation of ...
1
vote
1answer
42 views

Cannot install 'stringi' R package — C compiler problem?

> install.packages("stringi") [...] * installing *source* package ‘stringi’ ... ** package ‘stringi’ successfully unpacked and MD5 sums checked ** using staged installation checking for ...
0
votes
1answer
344 views

The repository 'https://cloud.r-project.org/bin/linux/ubuntu bionic Release' does not have a Release file

My computer has Linux Mint 19.1 Tessa with R version 3.6.3. I am trying to do sudo apt-get update and I am having this error: Err:21 https://cloud.r-project.org/bin/linux/ubuntu bionic Release ...
1
vote
1answer
55 views

How to solve “Error: (converted from warning) Setting LC_CTYPE failed, using ”C"?

I am trying to install a library in R and I have a this message Error: (converted from warning) Setting LC_CTYPE failed, using "C" What I saw is some solutions but for mac User, like this ...
0
votes
0answers
24 views

How to ask a question in R when running the R script in linux?

I wrote a code in R which has 2 variables in it: rep & x the code is written in a way that I should go inside the script to change the values for X and rep variables depends on the input data. I ...
1
vote
0answers
14 views

How to pass code to attached screen

I am running an R script using a Linux Workstation. I am new to Linux - thanks for your patience! I first ran screen before running my R script, Rscript myRscript.R After checking in on my script ...
2
votes
0answers
144 views

Vim-based alternative for Emacs tramp-mode

I'm currently using vim (actually neovim) as my IDE for writing and executing GNU R-code (using the Nvim-R-plugin, see also https://github.com/jalvesaq/Nvim-R, which serves as my REPL), which works ...
1
vote
0answers
19 views

View multiline code chunks when browsing command history

I do datascience an use R frequently. The way that probably 99% of R users interact with R is RStudio, an IDE with a lot of great features. I'm increasingly working in the cloud, so Im trying to ...
1
vote
0answers
250 views

Updating of R 3.5.3 to 4.0.2 on Ubuntu 18.04 LTS (bionic)

I have been trying to move from this version for a while, however all attempts have failed. The steps I am following: sudo apt-get remove r-base r-base-dev sudo add-apt-repository 'deb https://cloud.r-...
1
vote
1answer
23 views

R Version in screen different than expected

Invoking R in a new terminal session loads R version 4.0.0, but if I go into a screen and invoke R, version 3.4.3 is loaded. How can I set the version of R invoked in screen to always be the version ...
0
votes
0answers
21 views

Cron Job is running outside of defined schedule

I have a question and am relatively new to scheduling Cronjobs in R Studio. I have an R script that I would like to run every Monday - Friday, every 1 minute, and between the hours of 9 - 16 (9 am to ...
0
votes
0answers
28 views

What are the equivalent data objects in Bash in comparison to R?

R was the first programming language I learned. It is always a pleasure to learn a new language associated with the first language. Here comes my question. What are the equivalent data objects in ...
0
votes
0answers
9 views

Black and white georeferenced raster image to true color raster image

Is it possible to convert a black and white photo to True color (colored) preserving the geolocation in imagemagick or magick library in R?
0
votes
3answers
686 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
22 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
321 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
93 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
22 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
74 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
22 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
2k 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
2k 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
431 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
35 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
160 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
45 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
96 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 ...
12
votes
4answers
24k 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
39 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
63 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
2answers
654 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
99 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 ...
1
vote
0answers
42 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
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
10k 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
72 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
62 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

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:...
-1
votes
3answers
1k 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
131 views

Sort based on second column and list from highest to lowest

TGAAACATGCCTTTCACCTCCTGCCATGATTGTGAGGCCT 2 GTGTTGCCCAGGTTGGTTTCAAACTCAGCTCAAGTGATCT 1 GAGACTCCTTCAGGAGACTGGTCCCCTGTCCTCGCCTCTC 3 CATGTTCTCCTGGAAGCCATGTGAGGAAGGCACATCATGG 8 ...
1
vote
1answer
541 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 ...
2
votes
1answer
662 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
161 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
130 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
2k 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 ...
2
votes
3answers
2k 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. --- ...