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
0 answers
9 views

R extension not formating on VScode

I've installed the VScode extensio "R" v2.5.0 by REditorSupport. After some debugging, I had it working so I could Alt + Shift + F and have VScode auto-indent my R code. Then I opened ...
user avatar
  • 113
0 votes
0 answers
7 views

How to arrange R console and callstack vertically in PyCharm?

There is an R plugin for PyCharm IDE. It has R console tool window which is split into two areas - the console and the call stack, plus the environment explorer and/or watch variables. All these are ...
user avatar
  • 101
0 votes
1 answer
16 views

How do you execute a remote script on a remote host in R

I am trying to figure out how to execute a remote .bat file on a remote host on that host, not on the localhost from R. This syntax: bcpImport <- shell("//remotehost/S$/SnowflakeCSV/...
user avatar
1 vote
1 answer
18 views

Does installing RStudio Desktop come with a pre-installed R?

When you install RStudio Desktop, does it also come with a pre-installed R?
user avatar
0 votes
0 answers
84 views

Installing R 'greenbrown' package on Mac in R 4.1.2

I recently switched to Mac from Windows and I need to use the 'greenbrown' package to run some code. However, when I try to install as per the online instructions, I get errors that I think are ...
user avatar
0 votes
2 answers
36 views

Excel: Calculate running balance for different group

I would like to calculate a running balance for a different group. For illustration, my table consists of the the following columns and data/information: Acct_Msisdn Txn_Amount created_on Running ...
user avatar
1 vote
0 answers
12 views

VS Code Jupyter extension running multiple R sessions, hogging up memory

As the heading states, I'm running R in the Jupyter notebook inside VS Code (on Ubuntu 20.04.1 LTS). What I've noticed, is that VS Code or the Jupyter extension initiates multiple R sessions as seen ...
user avatar
0 votes
0 answers
60 views

VSCode R terminal 'source /opt/anaconda3/bin/activate Error: object 'opt' not found' 'conda activate renv Error: unexpected symbol in "conda activate"

As the heading states I get the following output every time I start an R terminal session in VS Code: r$> source /opt/anaconda3/bin/activate ...
user avatar
3 votes
0 answers
21 views

How to get R Help tab to automatically open on the right side in VS Code

As the title suggest, I am trying to get the "R Help" tab that pops up to consistently open in a panel on the right side in VS Code. Essentially, when I want info on a function, I will ...
user avatar
0 votes
0 answers
30 views

Issue installing R-3.4.2 with Docker file

I am using the following Docker file: FROM python:3.7 RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010 CBF8D6FD518E17E1 RUN apt-get update && apt-get ...
user avatar
  • 101
0 votes
0 answers
57 views

Copy folder structure in r without its files

I want to copy some folders with their subfolders but not the files in these folders with R. All i found is file.copy but this also copies the files.
user avatar
  • 15
0 votes
0 answers
14 views

Deploy/Run an R Plumber API on Linux Redhat Centos 8 server

I built an API using R and Plumber and was wondering how to deploy/Run it on Linux Redhat Centos8. It is a simple REST API and it launches Swagger to run when I test it on my computer, but instead of ...
user avatar
0 votes
0 answers
16 views

rJava not working in cron but working directly in root bash

I am facing a unusual problem on CENTOS7 system with R 3.6.x for production purpose. This involves working with rJava Package. Steps i'm taking to run in root, sudo -i changing to root Rscript /opt/...
user avatar
0 votes
0 answers
40 views

identify overlapping intervals in R or excel

I am working on some big data analyses. The entire follow-up duration for my subjects is 150 months, during which they may have some medications exposure. I am wondering how to separate the entire ...
user avatar
  • 1
0 votes
0 answers
70 views

I cannot open R x64 bit

I recently updated my R and RStudio versions to the latest. Since then, I have had to start RStudio using 32bits 'cause x64 is not opening (window opens for a second, freezes, and then shuts down). I ...
user avatar
0 votes
1 answer
192 views

Splitting zip files are incompatible as a zip on Mac?

I have a very large .zip that is 174GB large and 800GB decompressed. I am trying to work with this using the R programming language, however, it is far too large for me to work with. I have found that ...
user avatar
1 vote
0 answers
161 views

R cannot recognise installed library while installing R packages

I was installing openssl, haven, curl, and systemfonts packages in R. They require libraries, but the libraries have already installed. The detailed code and information are below. Thank you in ...
user avatar
  • 11
0 votes
2 answers
879 views

High memory usage, but low CPU usage?

I´m trying to merge large data frames, using R. My computer CPU has 3GHz intel Core i5 Quad-core, with 8GB RAM. I´m using the Reduce function, I´m not using a loop. All data frames are in a list, ...
user avatar
1 vote
0 answers
9 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 ...
user avatar
  • 181
0 votes
1 answer
110 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 ...
user avatar
0 votes
1 answer
62 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 ...
user avatar
2 votes
0 answers
145 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. ...
user avatar
  • 21
-1 votes
1 answer
38 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 ...
user avatar
  • 1
0 votes
2 answers
41 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 ...
user avatar
  • 1
1 vote
2 answers
107 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. ...
user avatar
0 votes
0 answers
16 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 ...
user avatar
  • 215
2 votes
1 answer
734 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 ...
user avatar
  • 29
1 vote
1 answer
125 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 ...
user avatar
  • 11
0 votes
1 answer
153 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 ...
user avatar
4 votes
0 answers
242 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.
user avatar
0 votes
1 answer
69 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 ...
user avatar
0 votes
2 answers
407 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 ...
user avatar
  • 15
0 votes
1 answer
383 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 ...
user avatar
0 votes
2 answers
801 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(...
user avatar
0 votes
1 answer
39 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 ...
user avatar
  • 6,721
1 vote
2 answers
3k 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 ...
user avatar
1 vote
1 answer
573 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 ...
user avatar
1 vote
0 answers
76 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?
user avatar
1 vote
0 answers
151 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: ...
user avatar
0 votes
0 answers
325 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 ...
user avatar
-1 votes
1 answer
72 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 ...
user avatar
0 votes
1 answer
253 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 ...
user avatar
  • 3
4 votes
2 answers
3k 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) > ...
user avatar
1 vote
0 answers
92 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 ...
user avatar
-1 votes
1 answer
634 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(...
user avatar
  • 1
1 vote
2 answers
769 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 ...
user avatar
0 votes
2 answers
2k 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 -...
user avatar
1 vote
1 answer
100 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
user avatar
1 vote
0 answers
306 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 ...
user avatar
  • 11
1 vote
1 answer
41 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. ...
user avatar

1
2 3 4 5 6