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

R can't connect to Druid cluster only on rstudio-server

I'm running these lines to get R connected to a Apache Druid cluster: > library("RJDBC") > conn_string = "jdbc:avatica:remote:url=http://<broker_url>:8082/druid/v2/sql/...
Juliano B. Nequirito's user avatar
0 votes
1 answer
100 views

Previous package in R causing errors

Long ago I used a package called gdalUtils. I don't need it currently and it isn't installed on my current version's library, but its absence is causing errors when I try to install other packages: ...
Jim Worrall's user avatar
0 votes
1 answer
105 views

How to count and export duplicate values (example attached)?

I have been scratching my head trying to figure out how to produce a statistic table as formulated in the attached picture: I have about 670k objects (Item_id) divided between around 1000 IDs (FID) ...
Gregory C's user avatar
0 votes
0 answers
186 views

Increase the number of lines that can be pasted in PuTTY

I use R and recently started working with a Linux server for my job. We are using PuTTY to communicate with the server. With our current workflow, we write scripts in RStudio on our local computers/...
degeso's user avatar
  • 1
0 votes
0 answers
43 views

How to maximize the CPU usages at Compute Canada

I want to maximize the CPU usages (%) for one node at Compute Canada. The report shows that there are only 20% CPU usages of my entire run, which is really low. My bash script is like #SBATCH --nodes=...
user avatar
0 votes
1 answer
29 views

R studio, Excel, XLS files

I have 20 excel (.XLS) files. Each excel contains 13 Sheets. All of these excel are in proper format. I wanted to extract sheet no.10 from each excel and paste the data into an Excel sheet. I want ...
siri's user avatar
  • 3
2 votes
0 answers
136 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 ...
Mefitico's user avatar
  • 123
0 votes
1 answer
94 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/...
user3175485's user avatar
1 vote
1 answer
142 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?
Abel Melquiades Callejo's user avatar
0 votes
1 answer
314 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 ...
clare.s's user avatar
0 votes
2 answers
376 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 ...
rshardja's user avatar
  • 101
1 vote
0 answers
52 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 ...
Pål Bjartan's user avatar
4 votes
0 answers
87 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 ...
Pål Bjartan's user avatar
0 votes
1 answer
320 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.
sfetan's user avatar
  • 15
0 votes
1 answer
502 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 ...
Stackbeans's user avatar
1 vote
0 answers
581 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 ...
SDev's user avatar
  • 11
0 votes
2 answers
3k 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, ...
Fabiano Pinheiro Da Silva's 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 ...
Drubbels's user avatar
  • 211
0 votes
1 answer
379 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 ...
Fran Villamil's user avatar
0 votes
1 answer
201 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 ...
rachelette's user avatar
2 votes
0 answers
177 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. ...
kaz272's user avatar
  • 21
-1 votes
1 answer
56 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 ...
Taufiq's user avatar
  • 1
0 votes
2 answers
42 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 ...
Diesel's user avatar
  • 1
1 vote
2 answers
175 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. ...
Michael Pyle's 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 ...
a11's user avatar
  • 265
2 votes
1 answer
868 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 ...
jokoron's user avatar
  • 29
1 vote
1 answer
218 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 ...
Joe_P's user avatar
  • 11
0 votes
1 answer
252 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 ...
Evangelos Con's user avatar
4 votes
0 answers
568 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.
Sophie Lyons's user avatar
0 votes
1 answer
132 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 ...
speed bump's user avatar
0 votes
2 answers
774 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 ...
Deanw1's user avatar
  • 15
0 votes
1 answer
478 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 ...
Vladimír Kunc's user avatar
0 votes
2 answers
2k 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(...
Becky Heath's user avatar
0 votes
1 answer
53 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 ...
Tomas's user avatar
  • 7,249
1 vote
2 answers
5k 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 ...
JourneyDS's user avatar
1 vote
1 answer
631 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 ...
nico1234's user avatar
1 vote
0 answers
230 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?
Embedded_Mugs's user avatar
1 vote
0 answers
207 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: ...
ML_Enthousiast's user avatar
1 vote
1 answer
461 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 ...
Yaseen Ahammed's user avatar
-1 votes
1 answer
130 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 ...
Mark Miller's user avatar
0 votes
1 answer
552 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 ...
Yacila's user avatar
  • 3
4 votes
2 answers
4k 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) > ...
Victor Kong's user avatar
1 vote
0 answers
215 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 ...
Anh Nguyen's user avatar
-1 votes
1 answer
892 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(...
Marc's user avatar
  • 1
1 vote
2 answers
953 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 ...
user2249427's user avatar
0 votes
2 answers
5k 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 -...
Afiq Johari's user avatar
1 vote
1 answer
117 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
Afiq Johari's user avatar
1 vote
0 answers
328 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 ...
queue's user avatar
  • 11
1 vote
1 answer
208 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. ...
Vinicius Hiroki Moriyama's user avatar
0 votes
0 answers
406 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 ...
Dan's user avatar
  • 1

1
2 3 4 5 6