Questions tagged [r]

R is a programming language and software environment for statistical computing and graphics.  Use this tag, together with other appropriate ones, for questions that are incidentally or indirectly related to the R language — for example, how to format data for use in R programs, how to display output, or how to resolve failures when installing or running R.

Filter by
Sorted by
Tagged with
1
vote
0answers
7 views

'python -i' behaviour with R?

I have an R script file `foobar.R'. I want to run the script, and then leave me in the interactive R session when it's done. Calling $ Rscript foobar.R or $ R -e "$(cat foobar.R)" does not ...
0
votes
1answer
20 views

R and shell in macOS Catalina

I just got a new M1 mac with macOS Catalina at my workplace, and I'm having trouble when running R from the command line (actually, when running it from a Makefile). I'm relatively new to the shell so ...
0
votes
0answers
9 views

Spilting dataframe on field with CSV text string [migrated]

I have a dataframe with one of the fields holding a string value. This string value can have zero to many values separated by commas e.g. apple A,C,D,F pear NA plum B,F banana K,P,Z ...
0
votes
1answer
30 views

How to point R to the correct version of curl when upgrading nfrom R 3.6 to R 4.0?

Full disclosure, I have already posted this same question on SO, but on advice am trying this forum instead! I originally posted this issue several months ago in RStudio Community which helped narrow ...
1
vote
0answers
40 views

R Versions 4.0.3+ 64 bit Refuses to Launch on Windows 10

Repost of this question on stack overflow After updating R to 4.0.3, and now 4.0.4, I am unable to launch the 64-bit version. The 32-bit version works fine and previous releases work fine in 64-bit. ...
0
votes
0answers
26 views

geom_point plot continuous values by color or fill, while plotting another measure on the y axis

Reproducible data: df <- data.frame(subject = sort(rep(c(1:85), 8)), number = rep(c(rep(c("singular"),4),rep(c("plural"),4)),85), modifier = ...
0
votes
0answers
15 views

Disabling the R linter in VS Code

all, I'm getting tired of all the errors thrown by the R linter in VS Code. Most of these, IMHO, should be warnings and should not prevent you from running and debugging R scripts. I've checked for ...
-1
votes
1answer
30 views

What is the perfect way to compare Excel column and extract the common data?

I have 4 columns in Excel file. I want to compare col1 with col3 and extract the common item along with col2 and col4, like in the image below. I am familiar with basic R and Python and basic Linux ...
0
votes
1answer
28 views

Reformat Data - Count by Group with either Excel or R

Imagine a data file like this, tab separated, imported either into Excel or R: London A London A London B Paris A Paris B Paris C I want to transform this into 3 separate count tables (3 because the ...
1
vote
2answers
96 views

Notepad++ split line at variable characters preceding symbol

I am looking to split one line of data into a line for each state regarding a senate nomination vote. I have truncated all fifty states' data into two states' worth for the purposes of this question. ...
0
votes
0answers
15 views

R and RStudio suddenly not found any more

I am using Ubuntu 18.04. and I am the only one using the computer, it is a laptop. I am using the latest version of R (4.0.3) and RStudio. I quit RStudio after saving the workspace. In parallel, I was ...
0
votes
0answers
13 views

Shell error when trying to install R from .exe [duplicate]

I'm having trouble installing R. I remember on my old computer I just double-clicked on the EXE (R-3.6.3-win.exe) and no issues. I am getting the following error when I double click: ShellExecuteEx ...
2
votes
1answer
677 views

Turn .sql file into a table

I have an sql file (from the following link). I need to get the table which is supposedly encoded in that file. I have no SQL experience and tried several things that have been suggested elsewhere: I ...
1
vote
1answer
48 views

Simplest cloud backup options for RStudio projects

I'm looking for options for using a cloud service to backup and share projects when using RStudio. I currently use Dropbox as a cloud service for back-up and file sharing of all my files (including my ...
0
votes
0answers
12 views

Anyway to “group” x11 plot windows in gnome's window switcher?

Using gnome3, I find that when drawing multiple x11 plots from command-line data analysis software (e.g. R, Python, octave) it seems that all the x11 windows appear as separate items in the app ...
0
votes
1answer
70 views

Setting up ESS (R)

I am a new emacs user. I am trying to set up my R-environment in spacemacs. I have added the ESS layer in my dotfile, but I cannot get the LSP to connect in order to get completion and etc when I am ...
0
votes
0answers
12 views

How to install Keras ad Tensorflow in R?

I'm trying to install keras and tensorflow packages in R, but everytime I do this I experience problems and difficulties and,finally, fail. First, I do: install.packages ("keras") I get: `...
2
votes
0answers
74 views

Is there a shortcut to insert the pipe operator (%>%) into databricks?

What is the shortcut to insert the pipe operator (%>%) into databricks? For RStudio, it is ctrl+shift+m, which doesn't work in databricks.
0
votes
0answers
83 views

Looking for external links in xlm-files of excel

I am trying to get all the external links in over 50 excel files using an R script. For that I studied the xlm-structure of one excel file (by treating it as a zip file) and found xlm-files with ...
0
votes
1answer
56 views

R “RPostgrSQL” package fails to install on Centos 8 (as `lib` is unspecified)

I want to install the R package RPostgresql to connect to my PostgreSQL database called "crex" on Centos 8. When I run > install.packages("RPostgreSQL") in the terminal I get ...
0
votes
2answers
132 views

Excel/R (?) Pie Chart with Subsections

I have a two long columns of data in an excel spreadsheet. One column has an age value, the other has a number that presents the favourite colour of the person (1-12). e.g. ID AGE FavCol 1 35 ...
0
votes
1answer
122 views

Cannot launch 64 bit version of R on windows 10

I am unable to start 64 bit version of R on windows 10 - I am not getting any error message. If I start directly R.exe/Rterm.exe only blank terminal windows appears (32 bit version works fine), if I ...
0
votes
1answer
284 views

Percentage Overlap of 95% confidence ellipses in a PCA plot

I've generated some plots with the below code: #Remove group label from the dataframe data_just_feats <- data[ , -which(names(data) %in% c("Group"))] # Pca Plot plot_1 <- autoplot(...
0
votes
0answers
210 views

unable to connect to Rserver using docker: “rstudio initialization error” and “r is taking longer to start than usual” messages

I am trying to use this docker image < https://hub.docker.com/r/natverse/r-natverse > which runs in an r server. However, I always get the error "rstudio initialization error, unable to ...
0
votes
0answers
101 views

Why fail to run Rscript with an arg in the bash script on debian 9?

I plan to run a bash script with for loop on debian 9. In the loops, the R script was used with commandArgs, which uses the parameters in the loop. I succeeded it by test one separately, but fail in ...
0
votes
1answer
33 views

How to set file association which was lost (for an already installed program)?

In my R (Rgui 3.6.1), I lost the file association to .Rdata files after I uninstalled older versions of R (this probably is a bug and shoudln't happen! The association was referring to version 3.6.1 ...
0
votes
0answers
148 views

How to install R kernel in JupyterLab from a different conda environment?

There are many descriptions on how to install the R kernel in JupyterLab available such as this. However, all these descriptions use the same environment for Python and R. That can lead to many ...
1
vote
1answer
1k views

Remote server - “screen [-d] -r [pid.]tty.host” to resume one of them

I am having some troubles reconnecting to a session I was working on. This is the first time I was doing it and I seem to have been kicked out of the session while the system is still running on ...
0
votes
0answers
14 views

RStudio requires internet access to exit. How to I change this?

RStudio 1.2.5033 refuses to exit if I am not connect to the internet (often). It took a while for me to figure out what was causing the problem. This is not 100% repeatable, but enabling an internet ...
1
vote
1answer
476 views

Merge 3 .csv into one file with different number of columns

I have 3 .csv files and I want to merge them together to one .csv file which can be in R or Matlab. The files are: 1597 obs of 167 variables; 160 obs of 167 variables; 533 obs of 146 variables I ...
1
vote
0answers
31 views

How do I bind the escape key to something else for the vim keybindings in Rstudio

I usually use jk or kj in vim as the keybinding for escape to enter normal mode. How do I do this for the vim keybinds in Rstudio?
1
vote
0answers
91 views

Launch multiple RStudio sessions from Docker on EC2

I managed to install RStudio through Docker, running on port 8787 on my EC2 instance. I wanted to add another RStudio session (not necessarily sharing the same volumes), so I tried the following: ...
0
votes
0answers
217 views

R INSTALL ON SERVER ERROR “bzip2 library and headers are required” despite being already installed

I keep getting the error checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required when trying to install R onto a server environment. I installed bzip2 ...
-1
votes
1answer
34 views

Disconnecting PuTTY with Amazon Web Services EC2

I am using PuTTY to submit a bash file to Amazon Web Services EC2 to run R files. The cursor in PuTTY disappears when I submit the bash file and does not reappear until all of the R files have ...
0
votes
1answer
197 views

How to plot longitudinal data in R

I am trying to plot longitudinal data in R. My data frame has this form: participant_ID group S1 S2 S3 S4 S5 S6 S7 S8 1 ctrl 14.00 14.00 13.00 13.00 7.00 8.00 4.00 1.00 2 ...
4
votes
2answers
2k views

Unable to knit to PDF using TinyTeX: Missing *.sty file

I've installed TinyTeX and am now trying to knit the generic "Untitled.Rmd" file to PDF, > install.packages("tinytex") > tinytex::install_tinytex() > options(tinytex.verbose = TRUE) > ...
1
vote
0answers
78 views

DLL file could not be located when loading RStudio

I got this message after installing the latest R and RStudio and trying to load RStudio: Procedure Entry Point modf could not be found in dynamic link library in qt5positioning.dll I tried to ...
-1
votes
1answer
311 views

Unable to access R caret function

Good evening, I installed R (version 3.5.1) and I work with RStudio (version 1.1.456) on a 64 bits Windows 7 Home Premium with 4.00 GB (RAM). I downloaded the caret package and I loaded it (library(...
1
vote
2answers
596 views

Installing rJava on Ubuntu 18.04.3

I cannot get rJava to install (see log below). I have scoured google and have attempted to resolve this by installing the following packages to no avail: libxml2-dev libcairo2-dev libsqlite-dev ...
0
votes
2answers
460 views

Falling to install Remi repo: RHEL 7.4

How to force subscription manager to accept REMI repo? I'm not sure how to proceed. I've already spent 3 hours looking for a solution. What I want in the end is to be able to install R (yum install -...
0
votes
1answer
75 views

Installing R on RHEL 7.4

I've checked this one Installing R on RHEL 7 but it's not solving my problem. When I run yum install R I ended up with some dependencies error as below
1
vote
0answers
263 views

Problems running R from SQL Server

I am running a standard piece of code from the MS SQL manual to test R functionality and am getting the error below. I'm thinking this is a setup issue of some kind since I am running code used as an ...
1
vote
1answer
34 views

Creating 0 entries for missing values in a date sequence for a unique set of columns in Excel

I have been struggling to fix a database that contains market size information. Because it is internal data I can't share the original file. The original file is just the example but much much bigger. ...
0
votes
0answers
242 views

ggplot2 Installation on R [32bit - 64 bit mismatch]

I am a beginner in R. I am able to install "tidyverse" and "rlang" but when I type in "library(ggplot2) and execute it, I get the following error, library(ggplot2) Error: package or namespace ...
0
votes
0answers
967 views

How to convert parquet timestamp for AWS Athena to query?

I am having trouble querying a table that I have created in AWS Athena. The problem column is the timestamp column. I have the data stored in parquet format in S3. I am using the Arrow package in R ...
0
votes
2answers
3k views

RStudio: Trouble uploading an Excel file. "No package called 'pkgconfig'

I was able to import an excel spreadsheet into RStudio and work on it while at work, so I decided to email myself the same spreadsheet and work on it at home as well. When I downloaded the excel file ...
0
votes
1answer
53 views

title-match on application pinned to windows taskbar

Q: How do I add command-line arguments to a pinned application and still have it match? My habits/workflow have a number of apps "pinned" to the windows taskbar, so that Win-# will "...
0
votes
1answer
910 views

Installation of R version 3.3.2 Error - caught segmentation fault address 0x0, 'cause' memory not mapped

I currently can run the most recent version 3.6.1 of R on my mac however I need to install an older version (specifically version 3.3.2) in order to run analysis in a different application (nSolver). ...
0
votes
0answers
80 views

Unable to install Rattle on maOS Mojave running R 3.6.1

Followed all the 4 install options as prescribed in the mentioned link: https://rattle.togaware.com/rattle-install-mac.html Every time I try to open Rattle: in Rstudio, it restarts with a message "R ...
0
votes
1answer
121 views

installing sampleSelection package in R

I am currently running R 3.2.4 on windows 10. I have been trying for several days to install the sampleSelectio package without success. i am new in R and I don't know what else to do. i have ...

1
2 3 4 5 6