r

Fetch data from a large file based on time and date recursively

Fetch data from a large file based on time and date recursively Fetch data based on date(column 1) and time (column 2). Each date has time in column 2. Based on each date in column1 two files are to be generated which will have all the fields based on time 6:00 to 21:50:08 (day) and …

Total answers: 3

SSH session termination on script error when sourcing multiple sub-scripts

SSH session termination on script error when sourcing multiple sub-scripts I’m facing an issue with SSH on a server. Running individual scripts (source s01.sh, etc.) works fine, with errors displayed in the console. However, when using a master script to source these scripts, the SSH connection unexpectedly terminates upon encountering an error. The master script …

Total answers: 1

R Packages won't install via ansible (ALMA Linux 8)

R Packages won't install via ansible (ALMA Linux 8) Problem I would like to use ansible to provision a virtual box. This box will need to do multiple things, but it needs to have R installed as well as some specific packages that aren’t included in base R. I use the vagrant file provided below …

Total answers: 1

error: libcurl >= 7.28.0 library and headers are required with support for https

error: libcurl >= 7.28.0 library and headers are required with support for https I’m sorry for having written such a long question, but given how many times similar questions have been asked, I felt like I had to give a lot more context. In my system, I get. . . checking for curl-config… /usr/bin/curl-config checking …

Total answers: 1

Installing packages of R in UBUNTU

Installing packages of R in UBUNTU i have an R script that looks like this: install.packages("R.utils") library("R.utils") install.packages("vcfR") library("vcfR") install.packages("stringr") library("stringr") install.packages("tidyverse") library("tidyverse") install.packages("dplyr") library("dplyr") gunzip("gnomad.exomes.r2.1.1.sites.21.vcf.bgz", "gnomad.exomes.r2.1.1.sites.21.vcf") vc=read.vcfR("gnomad.exomes.r2.1.1.sites.21.vcf") df=vc@fix data=as.data.frame(df) data_snp=data %>% filter(str_length(ALT)==1 & str_length(REF)==1)#filtering for SNPs data_snp$snp_id <- str_c("chr21","-", data_snp$POS) data_snp$AF_total=str_extract(data_snp$INFO, "(?<=AF=)[^;]+") data_snp$AF_latin=str_extract(data_snp$INFO, "(?<=AF_amr=)[^;]+") data_snp$INFO=NULL data_snp$key=str_c(data_snp$snp_id,"-",data_snp$ALT,"-",data_snp$REF) df_for_filter=read.csv("merged_df.csv") df_x=subset(df_for_filter,df_for_filter$CHROM=="chr21") df_x$snp_id=str_c("chr21","-",df_x$POS) df_x$key=str_c(df_x$snp_id,"-",df_x$ALT,"-",df_x$REF) filter_df=data_snp %>% semi_join(df_x, by …

Total answers: 1

Installing R on Ubuntu 22.04

Installing R on Ubuntu 22.04 I have just updated my device to Ubuntu 22.04 and I wanted to install R following this readme: https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html This worked fine, however, now I get an error when I try to update my packages: ~$ sudo apt update Err:1 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease The following signatures couldn’t be verified because …

Total answers: 1

R not working after installing Citrix Receiver on Ubuntu 22.04

R not working after installing Citrix Receiver on Ubuntu 22.04 My R installation is no longer working after installing Citrix Receiver on Ubuntu 22.04. The Citrix installation comes from here After installing Citrix, I can type R into my terminal, but nothing happens (no warning message even). Out of ideas of what could be interfering …

Total answers: 1

How to solve library dependancy for Rstudio in Ubuntu 22.04

How to solve library dependency for RStudio in Ubuntu 22.04? I have just installed Ubuntu 22.04. I could install R with sudo apt -y install r-base gdebi-core: $ R R version 4.1.2 (2021-11-01) — "Bird Hippie" Copyright (C) 2021 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) But when I try to install Rstudio …

Total answers: 4

Installing R and RStudio in Lubuntu 20.04

Installing R and RStudio in Lubuntu 20.04 I wanted to install R with Rstudio to start learning, but I found many problems in the way, I’ll explain as much as i can below. So I went to the CRAN Project website https://cran.r-project.org/ and followed their instructions to install R on my laptop. # update indices …

Total answers: 2

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

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 404 Not Found [IP: 2600:9000:2045:e400:6:c2d3:f940:93a1 443] E: The repository ‘https://cloud.r-project.org/bin/linux/ubuntu bionic Release’ does not have …

Total answers: 1

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

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 99.90 NA NA 10.90 NA cat2 NA 1.00 …

Total answers: 3

libreadline.so.6 issue in ubuntu 18.04

libreadline.so.6 issue in ubuntu 18.04 I upgraded from Ubuntu 16.04 to Ubuntu 18.04 and cannot get R to run on it. I get the following error: /usr/local/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory This issue seems to have come up before in similar situations: https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu1804ReadlineMess …

Total answers: 5

I am unable to install latest version of R

I am unable to install latest version of R I am trying to install the latest version of R into Ubuntu 16.04. But somehow it installs 3.4.4 even though latest version of R is 3.6.1. I have also read some articles that state “To obtain the latest R 3.6 packages, add an entry like”: deb …

Total answers: 2

error while loading shared libraries; file too short

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 connect to service I checked if R is working properly …

Total answers: 2

How to install a libc6 version >= 2.29?

How to install a libc6 version >= 2.29? When I type sudo apt-get install r-base-core I get the following error The following packages have unmet dependencies. r-base-core : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed Now libc6 as far as I understand is an important library which should not be removed. So …

Total answers: 2

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

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 displayed in interactive …

Total answers: 2

How do I set up the simplest HTTP local server?

How do I set up the simplest HTTP local server? I use the R Studio IDE to do many things, one of which is to serve local websites utilizing the blogdown package which is a fork of hugo. I write the code in R Studio and preview the site utilizing the blogdown::serve_site() command. This is …

Total answers: 7

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

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 tree Reading state information… Done Some packages could not be installed. This may mean …

Total answers: 2

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

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 system? I’m running some large-scale geoprocessing jobs, …

Total answers: 1

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

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 #SBATCH –partition=compute #SBATCH –job-name=test #SBATCH –mail-type=ALL #SBATCH –mail-user=myemail@blabla.com …

Total answers: 2