Questions tagged [rstudio]

1

votes
1

answer
98

Views

Is there an R version of Rstudio's 'find in files'?

I love Rstudio's 'find in files' function, where you can search for text in all files in a specified directory, but I hate the way to specify the directory to search and types of files, you have to click and point, urgh! Does anyone know of a simple way of doing this in R console?
RBA
2

votes
0

answer
22

Views

How do I view syntax-highlighted source code for operators e.g. %in%?

In RStudio, I know that if I press F2 while the caret is on a function name I will be shown the source code for that function as if it was an open R script, which syntax highlighting and everything. How do I do the same for operators like %in% and names like if? These things don't work: Typing %in%...
DuckPyjamas
0

votes
0

answer
16

Views

Keras can't make predictions

We loaded the model we have trained. Then we tried to use predict_generator to make predictions of images. It ran over an hour for one image prediction but no output was generated (It didn't finish running until we interrupted it). Here is the code (similar to this post): enter code here test% predi...
Tao Huang
0

votes
0

answer
3

Views

RStudio and Travis CI build check do NOT match (libudunits2.so)

Travis CI detects and issue which is not found by the Build > Check in RStudio for my lares library (found in Github as laresbernardo/lares). My last "Passed" commit, according to Travis CI, was literally a typo change so the library's code should not be the problem; so, when I run devtools::check()...
Bernardo
1

votes
1

answer
154

Views

During startup - Warning message: Setting LC_CTYPE= failed on Windows

I have the following warning message after upgrading windows 10 whenever I launch Rstudio. During startup - Warning message: Setting LC_CTYPE= failed I'm running currently Microsoft R Open version. Is there a way I could fix this warning message, I found some solutions for Mac at stackoverflow but...
1

votes
0

answer
64

Views

MLR not registering learner in RStudio job

I have an mlr pipeline that requires a custom learner I built. I defined all the required functions and after running them, I can use the learner. However, when I run the script as a separate job in the new RStudio version, mlr doesn't seem to be registering the new learner. Any ideas? A sample scr...
Felipe Gerard
0

votes
0

answer
4

Views

Subset works fine locally but only keeps the last column of the dataframe when deployed in shinyapps.io

I have a shinydashboard app that reads a shapefile and then I create a subset of the shapefile by reading the dbf file associated with the shapefile. Below is a short version of my code (I need the shapefile because in my full code, I am displaying it on a leaflet map and then highlight the selected...
AkbarB
1

votes
2

answer
280

Views

Using sparklyr on local RStudio with an apache cluster

I'm new to Sparklyr and fairly new to R. I'm trying to figure out if I can run sparkly on my local RStudio and connect to an apache spark cluster on the network. All the blog examples talk about running RStudio Server directly on the apache spark cluster. Can anyone validate if this is possible?
Heather
1

votes
1

answer
1.3k

Views

RStudio on Mac OS X 10.13 getting X11 is not available error when trying to use fix()

I have installed XQuartz on my machine using homebrew and then I restarted my machine, when I try to use the fix() command in RStudio I get the following error > College=read.csv("College.csv",header=T,na.strings ="?") > fix(College) Error in edit.data.frame(get(subx, envir = parent), title = subx,...
cod3min3
1

votes
2

answer
170

Views

cron Job Won't Run on R Scripts on Google Compute Engine

Following these instructions I got R-Studio Server running on a Google Compute Instance: http://code.markedmondson.me/launch-rstudio-server-google-cloud-in-two-lines-r/ When I open a terminal from this RStudio-Server I note that man, ps, vi, cron are all absent. bash: ps: command not found My goal...
ixodid
-1

votes
1

answer
11

Views

I want to fill value column of my data frame

I want to fill value in the column of my data frame from P20 by calculating the formula ((max value * CAGR)+max of value). After calculating this i will get value of P20 and replace the 0 value from calculated value.Again P21 is calculated on the basis of P20 using same formula. [Code zz
siddharth singh
1

votes
0

answer
10

Views

old.reddit only giving me 25 posts when using rvest package for R

I'm new to all of this so I'm not entirely familiar with all of the terminology. I'm using this link as an example to scrape the time that posts were published from https://old.reddit.com/. It says to use SelectorGadget tool to bypass learning other languages, so that's what I did. Although my page...
Metehan
1

votes
0

answer
8

Views

How to create bins in sparklyr [spark dataframe]?

I have sample dataframe df in R and rd_3 in sparklyr. I want to create visit_category column in spark dataframe . I know we can use Cut function in R to create same column , but how do I create same in Sparklyr ? For reproducible purpose df% mutate(Visit_Category = factor(Visit_Category, labels =...
Yogesh Kumar
1

votes
1

answer
25

Views

run shiny app for specified amount of time

I want to run a shinyApp only for like a hour and then I want my app to stop automatically running instead of hand-clicking on the red STOP button in Rstudio. Is that possible ?
FFL75
1

votes
2

answer
71

Views

How does `blogdown::serve_site()` setup its local server (Apache/Python/something else)?

If I use the R Studio Addins > Serve Site, or alternatively blogdown::serve_site(), am I setting up an Apache/Python/etc. server on my local machine? Or is something else happening? How does R Studio and/or blogdown setup this local web server? I'm trying to recreate this setup without having to us...
Jason Hunter
1

votes
1

answer
666

Views

read.table acts differently when used in the console vs when used in an R markdown file

I am trying to read in a file (pipe delimited) inside a code chunk in R markdown using RStudio. See below for the R markdown code chunk ```{r} dealInfo
tepedizzle
1

votes
1

answer
4k

Views

Rstudio autocomplete variables

I am new to both R and Rstudio. I like the autocompletion of functions, models and data.frames. My question concerns autocompletion of variables. So lets say I load the well known iris data. I can start typing "ir", click click tab and get the rest of the dataset to autocomplete. I also know can get...
mpg
1

votes
1

answer
533

Views

Why does RStudio show the manually knitted pdf wrong?

I'm running the latest RStudio (0.97.551) and R (3.0.1) version on Mac OS X Mountain Lion 10.8.4. I have the following two files: test.Rnw \documentclass{article} = options(replace.assign=TRUE) opts_chunk$set(external=TRUE, cache=TRUE, echo=FALSE, fig=TRUE) read_chunk('chunks.R') @ \begin{document}...
JerryWho
1

votes
1

answer
186

Views

Rstudio organizing project source files

To me, I really enjoy the tabbing in Rstudio's editor. My statistical projects usually involve several files which separately read in source data, organize analytic data, generate tables and graphics, and occasionally modify databases. I'm often switching between .R files while I code up a project....
AdamO
1

votes
1

answer
286

Views

Error when \% is included in a sectioning command

When I try to input a \% in a \subsection's title and Compile pdf, I get the following error: File ended while scanning use of \@@BOOKMARK. How should I do it? EDIT Here is a reproducible example. The file is encoded in UTF-8 format. \documentclass[a4paper]{article} \usepackage{fontspec} \usepackage...
George Dontas
1

votes
1

answer
629

Views

How to manipulate (using manipulate pkg) ggplot2 with time-stamped axis?

I would like to produce an interactive plot (using the manipulate package which comes with RStudio) which has time as the x-axis. The user should be able to use sliders on this axis to change the x-limits of the plot, but I can't achieve this. Code reproducing the error is: require(manipulate) df
Jehol
1

votes
1

answer
807

Views

Plot output “looks” different in R vs RStudio

Am a newb to R. I tested some code to produce a word cloud. The code works. What is weird is that the output plot "looks" totally different when I run it in R vs RStudio. Ironically in R the output looks really nice. In RStudio it is not. I dont think its the code and suspect it has somet...
user3621202
1

votes
1

answer
67

Views

R knitr html file picture locations when compiling through RStudio

When I make my knitr document, I see the html file in my directory. I load the file and it looks great. However, I'm curious where the pictures are: It gives me locations like: img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAYACAYAAAAjFnetAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQW...
user1357015
1

votes
1

answer
81

Views

Where are the values of this variable coming from? Doesn't seemed to be defined anywhere

I am new to Rstudio and I'm trying to learn how to use R Markdown. When I create a new R Markdown file, I am greeted with the following default document. Note how I've specifically assigned the 'cars' variable a NULL value, yet when running it cars becomes a data frame populated with values. Given...
zipzapboing
1

votes
2

answer
1.5k

Views

Error when installing R package using Rstudio

I want to install http://cran.r-project.org/src/contrib/Archive/mecdf/ using RStudio but when I use > install.packages('C:\\Users\\jandre\\Desktop\\mecdf_0.6.1.tar.gz', repos=NULL, type="source") I get this error: Installing package into ‘C:/Users/jandre/Documents/R/win-library/3.1’ (as ‘lib...
jpcgandre
1

votes
2

answer
876

Views

rga package how to get all Google Analytics profiles

I'm using RStudio and the rga package to extract some Google Analytics data. One issue I'm running into is during the ga$getProfiles() call. I'm getting the first 1000 profiles -- I have more than 1000 profiles but I'm not sure how to specify that I'd like ALL the profile ID's to be pulled down. A...
davids12
1

votes
1

answer
114

Views

Writing code in R markdown but suppressing calculations

I want to create a pdf document using rstudio, knitr. I would like to present code used to obtain results. The problem is that when creating a pdf, everything is calculated. That usually wouldn't be the problem, but I have really complex models on a huge data set, and it takes hours to complete. Is...
enedene
1

votes
2

answer
644

Views

Which code to use for forecasting an arima model in Rstudio

I am trying to forecast an arima model (0,1,1) in Rstudio. Which function can I use to forecast the model?
1

votes
1

answer
2k

Views

How to make a scatterplot matrix in R using subset of data

How can I make a scatterplot matrix in R that shows only a subset of my data (in area A, B, C, or D, as opposed to all 4 aggregated)? I know that the tapply() function allows for a breakdown by subset. For ex: tapply(data$x, data$y, summary) ...would give me a statistics summary for each subset. He...
bubbalouie
0

votes
0

answer
4

Views

Rstudio launch error, pointing to wrong location of R

When Rstudio is launched from the Ubuntu launcher, I got an error "R script path (/usr/lib/R) is a directory rather than a file." My R is installed in /usr/bin/R This is quite strange as everything was fine just few hours ago and I haven't made any change to R or Rstudio. Question is, how to make...
horaceT
1

votes
3

answer
1.5k

Views

Finding the sum in R using conditions

I would like to know how to do a conditional sum in R. Let's say I want only the sum of Store ID = 111111 in the year 2012. How would I do this? YEAR STORE ID AMOUNT 2011 111111 11 2011 222222 12 2012 111111 4 2012 222222 4 2012...
AJC
1

votes
2

answer
1.4k

Views

How to turn off syntax highlighting in R-studio

I am very new to R-Studio. I was used to RGui, where there was no syntax highlight and the letters were very contrasty: In R-Studio, the letters seem to be very dim, even the "black ones" doesn't seem as black as in RGui: I don't have a clue how to change the colors (do you?) so I decided to turn of...
TMS
1

votes
1

answer
46

Views

finding rows which don't have NA in a particular column if it already didn't have any NA

I just observed that if one of the columns in my data frame does not contain any NA values(see col2 below) and I unknowingly, try to find rows which do not have the corresponding col2 value as NA, the below code gives me an empty output. See col1 below where it works since, it has at least one NA va...
IAMTubby
1

votes
2

answer
469

Views

“Hide” functions in RStudio

I am in the painful process of transitioning from MATLAB to R, and still coming to terms with not having a neatly arranged MathWorks website to consult. When writing MATLAB functions, they are stored in a local drive and can be accessed in my source code (as long as the function is in the active dir...
akkp
1

votes
1

answer
506

Views

Include Youtube Video in .Rpres Presentation

How would I embed the following Youtube Video in my RStudio .Rpres presentation? http://www.youtube.com/embed/TR2bHSJ_eck?feature=player_detailpage I could not find any info in the link below: https://support.rstudio.com/hc/en-us/articles/200486468-Authoring-R-Presentations
Chris
1

votes
1

answer
514

Views

Assign a group number based on another column by group in R

This is probably very straight forward, but I can't figure out a way to do this. I have some data that looks like this: domain difference xxxx 0 xxxx 2 xxxx 14 xxxx 3 xxxx 7 xxxx 2 yyyy 6 yyyy 5 yyyy 13 yyyy 10 zzzz 2 zzzz 5 zzzz 1 zzzz 15 zzzz 16 zzzz...
Hillary
1

votes
2

answer
52

Views

convert slash to division

I have a column of type character which looks like (1/1), (2/3), (4/5) etc. I would like to convert this to a vector like 1, 0.66, 0.80 etc. Is there a simple way to do this? The only way I could think of would be something like Pseudocode separate string delimited by slash, as part[1] and part[2] p...
PepperBoy
1

votes
1

answer
352

Views

Error while using rarecurve() in R

I am using vegan::rarecurve on community data. lac.com.data
elduderino260

View additional questions