Questions tagged [rstudio]

**Do not** use this tag for general R programming problems, just use the R tag. ONLY use for RStudio-specific questions.

0
votes
1answer
16 views

iframe with port :3838 does not work (shinyapp)

I made a shiny app that I am hosting in an ec2 instance, here is the url http://www.derek-corcoran-barrios.com:3838/WhereToLive/ I have a website that I build with R: http://www.derek-corcoran-...
0
votes
0answers
10 views

Rscipt.exe Access Denied

I'm trying to create an Rscript-file from a script I wrote in RStudio. When I open the Rscript.exe I get the following error message : In normalizePath(path.expand(path), winslash, mustWork) : path[...
-1
votes
0answers
15 views

create a looping gif using caTools::write.gif()

I am trying to loop a heatmap for a DTMP (discrete time Markov process). The code works to produce the .gif, I just need it to loop. Didn't think I needed a reprex because it's not a bug. But here's ...
1
vote
0answers
27 views

Connect to Azure SQL - Token Based

I've tried this over on the Rstudio forums and they've suggested i post here/azure support. Azure doesn't seem to be helping right now so if anybody has any suggestions that would be awesome thanks. ...
0
votes
0answers
17 views

export figures with unicode symbology/expression in R

when I export a RStudio generated figure as image it works fine (attached png file) plot(2,3, ylab="cannot export as I see it", xlab= expression(paste(delta^{13}, "C (\u2030)"))) but when I try ...
1
vote
0answers
25 views

How to Draw a three-dimensional graph in R

f(x,y)= (1/25)*(20-x)/x 10<x<20, x/2 <y <x 0 o.t I have to create this image through this expression. but what is wrong?
-4
votes
0answers
19 views

How do you change the x axis of a histogram in R?

If I have a histogram with an x axis as time of the day (e.g. 05:00:00), how do I change the way the x axis increments its intervals. Example: R automatically sets random default time values (e.g. 00:...
0
votes
1answer
25 views

Installing Rtools [duplicate]

Trying to install Rtools 3.4 with R Version 3.5.1 on windows 7 64 bit. When I use find_rtools() in IDE, it says Error in find_rtools() : could not find function "find_rtools" Already installed ...
0
votes
0answers
31 views

Problems using dataframe in R with columns of different width

I have uploaded a csv file, like the following: datamap <- read.csv(file ="TheWorlds50BestRestaurants2018.csv", header = TRUE, sep =",") I want to put that dataset into a data frame. However,...
0
votes
1answer
15 views

How to use seq() to create column of date/times with increments of milliseconds (deciseconds)

My dataframe (df) looks like this: ID CH_1 CH_2 CH_3 CH_4 date_time 1 -10096 -11940 -9340 -9972 2018-07-24 10:45:01.1 2 -10088 -11964 -9348 -9960 <NA> 3 -10084 ...
0
votes
0answers
16 views

Blogdown removing sections

I am working in RStudio and Blogdown. I'm using the Classic Theme. Everything is great but I want to remove a few sections, such as, Talks and Instructions. Probably a real easy answer but I can't ...
0
votes
0answers
22 views

R | Not able to Knitr | ‘stringi’ not available for R-3.4.3

Recently I have updated my Knitr markup with below command as PDF export was not working devtools::install_github('rstudio/rmarkdown') Now I can't create PDF, HTML and Word file from Knitr, getting ...
0
votes
0answers
13 views

How to convert a column of date/times to POSIXct when adding a decisecond character in R?

The header of my dataset is as follows: ID CH_1 CH_2 CH_3 CH_4 date_time 1 -10096 -11940 -9340 -9972 <NA> 2 -10088 -11964 -9348 -9960 <NA> 3 -10084 -11940 -9332 -9956 ...
1
vote
3answers
29 views

Merge two tables with no relation on columns

I would like to merge two tables that has no relations on columns. This are the examples: Table A: Table B: The idea is to merge the tables, creating a row for each row that are in both tables, ...
-1
votes
0answers
13 views

scraping entire article with tm.plugin.webscraping.

I'm trying to import entire articles into R for text analysis. I am using WebCorpus to draw information in. I put this into a data frame which includes 10 articles on that webpage. I get the url ...
-1
votes
0answers
13 views

R studio error message while running knit (markdown)

Trying to run a markdown on some codes that grab some data from a database and transform that to some visual tables and charts. I am getting an error message that reads "Line 2: Columns 'period', '...
0
votes
0answers
7 views

How do I add a custom point to a plot on Rstudio?

I know how to add the points included in the pch data, but I want to add a point that is a shape I have made myself, like the outline of a city or country.
0
votes
0answers
22 views

How to skip error in rstudio loop when error is lexical error:invalid char in json text

I'm working with the crypto package in rstudio and I need to find the 9 month returns of the top 100 coins between Jan 1 and Oct 1. So far I have coinreturns <- data.frame(symbol = character(), ...
0
votes
1answer
16 views

How can I change paper size when using Knit PDF in RStudio throughout a document?

I am looking for ways to change the paper size throughout a pdf document. I know that I can specify classotion: a3paper for the entire document in the yaml header. I also know that I can change ...
0
votes
0answers
3 views

How to add a custom point to a plot on Rstudio

How would you add a custom shape as a point to a plot, something that is not in the pch library, like a more complex polygon shape?
0
votes
0answers
10 views

indepented line scatter3D plot

I am trying to create a 3D plot with scatter3D. I want a line plot where each line shows a indepentend group. My problem is, that the lines are "connected", which means that there a straight lines ...
1
vote
0answers
17 views

Creating a template for projects in RStudio

I want to create a template that creates a project in RStudio with a few non-empty .R files and a directory. So for example, I create a project named 'project1', I want it to create a regular project,...
0
votes
0answers
14 views

How can I change the end of a line in RStudio

I'm ploting a line in RStudio with the function plot and type "l". I want to know if is possible change the beginning and the end of the line, because the line is round at the end and I want the end ...
1
vote
1answer
20 views

Is there a possibilty to close all code breaks in R script at once?

After searching through all kinds of "how to structure code"-threads and not finding an answer to my question I hope there is one existing though. When structuring my code I tend to use a lot of code ...
-2
votes
0answers
19 views

Plotting and define piecewise R

I want to define function in link and plotting using R, any suggestion is welcome
0
votes
1answer
41 views

Displayed Numerical Precision in R / RStudio

I'm having a problem where the displayed precision of a numerical result sometimes reverts to rounded-off integer format. For instance, some days, a simple calculation like this generates the expected ...
0
votes
1answer
24 views

Setting theme options in YAML header for beamer presentation?

I am making a beamer presentation in RStudio, using the Metropolis theme. I would like to use some options, say sectionpage = none, but I don't know where to put the option in the YAML header. I just ...
0
votes
0answers
9 views

mutate() and str_replace() function

I'm trying to remove any strings that contains the word "Seattle" in the column named "County" in the table named Population Population %>% mutate( str_replace(County, "Seattle", "")) It ...
-1
votes
1answer
24 views

Unable to install forecast package in R

When I run the following commmand: install.packages('forecast', dependencies = TRUE) library(forecast) I get the error: Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), ...
0
votes
0answers
9 views

search 2 columns using multiple words in R

Any easier way of doing this using R? col1 = Subject, col2 = Body library(dplyr) library(stringr) scroll <- read.csv("file")%>% filter(str_detect(Subject, "scroll")) Scroll <- read.csv("...
0
votes
0answers
23 views

System command fails in R Studio but works in R from Terminal

I have a system command in R studio which fails whereas the same command works from R using Terminal in Mac. Could someone hint what is wrong here: From RStudio: > system('/bin/qt query -i /var/...
-2
votes
0answers
16 views

Configure Rstudio Server daemon to NOT start at system boot up? [closed]

I'm using ubuntu and whenever I do a system boot, rstudio-server turns active automatically. How can I reconfigure the startup applications to change that and make rstudio open only when I want to?
0
votes
0answers
10 views

Evaluating integrals “upper and lower bounds in Rstudio”

Okay I will write my question as in latek form I hope you dont mind. Suppose I want to evaluate an integral in Rstudio 3.5.1 I have been looking at the example Rcode starts here: f <- function(x) ...
-2
votes
0answers
15 views

opening .rdb and .rdx files in RStudio

I have some problems with opening some files in R studio which are formatted by .rdb and .rdx. How can I open .rdb and .rdx files in RStudio? Do I need special packages for that?
0
votes
1answer
39 views

Shiny app doesn't work on shinyapps.io, but works in rstudio

The app is currently hosted on shinyapps here: https://njed.shinyapps.io/race_seg_gap_map/ There is no error message (I checked shinyapp logs) and memory usage doesn't go above 100mb. The points ...
2
votes
1answer
44 views

Change Title Slide Color in reval.js R Markdown presentation

I am trying to change the color of the title slide of a reveal.js R Markdown presentation. I am aware that I should use a custom CSS sheet with the css: styles.css option, but I couldn't find any ...
0
votes
0answers
37 views

R Studio: Plotting lines for a large dataset with repeating columns

I have huge dataset for which I need to create plot with all the temperature data for a time scale on the same plot. Now, the data frame consists of many repeats of the following structure: Name, Date,...
0
votes
0answers
10 views

After updating to macOS Mojave, RStudio doesn't read xlsx table anymore

after updating to macOS Mojave, read.xlsx doesn't work anymore in RStudio because they apparently changed the "Location" line in the Finder. The old way with / doesn't work either. I hope you can ...
0
votes
1answer
24 views

R unsupported conversion from 'CP1,254' to ' '

I am writing a program on R studio. My program runs well on R studio but, when I try to run it using .bat command, it gives me the following error: Error in file(filename, "r", encoding = encoding) ...
0
votes
0answers
9 views

R studio doesn't recognize language

I'm trying to create a data frame from SQL query. Some of the fields are become gibberish since they're not in english. Any solution of how to fix this?
0
votes
0answers
21 views

unable to install spatialEco in r studio

I am trying to install spatialEco in R The error that was given to me is below: > install.packages("spatialEco", type ="source") also installing the dependencies ‘units’, ‘sf’, ‘rgeos’ ...
0
votes
0answers
13 views

i get an error message: non-numeric argument to binary operator. when I run my code in R

This is my R code: R-code print(m +ggtitle("Density Plot") )+geom_density(na.rm=TRUE) print(m +ggtitle("Rug Plot") )+geom_rug(na.rm=TRUE) I get the error message enter image description here. ...
0
votes
0answers
10 views

How do you make a side by side box plot for a yes/no variable?

I’m working in R and I’m very new to it. I’ve tried a number of things and can’t seem to get it to work. I’m attempting to view income based on yes or no, college or no college.
1
vote
1answer
36 views

Put labels in ggplotly R

I would like to put the labels of my doughnut charts in the middle of those, but I tried a solution and it doesn't appear where I want. It's for a teamwork project so any help would be really ...
0
votes
1answer
97 views

Error on Anaconda 5.3 while installing RStudio , saying offline mode

I downloaded Anaconda 5.3 and am trying to Install RStudio in it. I get the below error always after upgrading. "Some of the functionality of Anaconda Navigator will be limited in offline mode." "...
-1
votes
0answers
20 views

length function automatically converting numbers to date in R

I am very new to R. I am not sure why the length function in R is giving me the wrong result.This is the screenshot from RStudio running in Mac > Blade_Weight <- read_excel("some_file.xlsx", ...
0
votes
1answer
20 views

Conda install r-topicmodels package fail

I am trying to install the topicmodels package for R using conda. According the link I put follow command to console: conda install -c conda-forge r-topicmodels But I have an error: Solving ...
1
vote
2answers
33 views

Error in training an ANFIS model using frbs.learn() in R

I am building an ANFIS model using frbs.learn() in R. Here is my code: library(readxl) library(anfis) library(parallel) library(frbs) Yamuna_final <- read_excel("F:/Downloads/Yamuna_final.xlsx", ...
1
vote
0answers
21 views

dir + file.copy returns “file does not exist” warnings due to non-english characters, how can I fix this?

I have this function in RStudio to synchronize 2 folders on windows. p1 and p2 are paths; fsync<-function(p1,p2){ A<-dir(p1,all.files = T,recursive = T,ignore.case = T, include.dirs = F,...
0
votes
0answers
12 views

fatal error in R studio when call Rtsne package

I have a fatal error which occurs each time I call Rtsne package in Rstudio, I don't know what to do to solve the issue.