Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 201839 articles
Browse latest View live
↧

Install R package from GitHub in package vignette

I've built an R package and it's available on CRAN. I am updating one of the vignettes and I would like to install a package from GitHub in the vignette. The R CMD Checks ran smoothly on my machine,...

View Article


Would like that a class is more likely to occur in decision tree?

What if we want to make our classifier more confident about predicting a high-income individual, in other words, reduce the number of times when the model predicts high-income for a person who actually...

View Article


How to get started with machine learning after learning python fundamentals?

I just learnt python language fundamentals and willing to get started with machine learning. I want to know how to get started with machine learning and what should be the learning path?

View Article

How to deal with a quadratic model that has too many fitted values?

I'm trying to fit a quadratic regression model to a dataset and then plot the curve on a scatterplot. The dataset is about number of episodes and screentime for characters in a TV show. I plotted a...

View Article

I can't update or install packages

I'm trying to update already installed packages, one of which is pkgconfig if that's relevant. I keep trying to update the package, but it keeps restarting with no end. It gives me this:>...

View Article


Loop to download Google search data for multiple keywords using gtrends in r

I want to download daily Google search data for multiple keywords using the gtrends package in r. I need search data for 30 keywords between 2004-18. Since Google allows to extract daily data only for...

View Article

how can I count the serial number of a vector inside the lapply?

I have a big vactor (3GB) to process thru lapply, and I would like to know how much it has proceeded. It is easier if I can identify which element it is, but what if I can't?In the for loop, I may...

View Article

R postscript command (colormodel cmyk) not working?

I'm producing an EPS image in R, with black (box and axes) and red (points).postscript('test.eps',colormodel='cmyk') plot(1:10,col='red') dev.off() Using ImageMagick's identify, shouldn't it be in CMYK...

View Article


How to cast this sapply use-case as a dplyr?

While working with predict.knn3 I bumped into an interesting data-wrangling-ish use-case. I didn't know I could call predict using the argument type="class" to get the predicted levels, exactly what I...

View Article


problem with drawing graph of sum function in r

Let's take sample 'y' of length 100 from N(0,1) distribution and function g(x)=x^2+7. I want to make a graph of function $h(x)=\sum_{i=1}^{100}g(x-y[i])$So y=rnorm(100,0,1) g=function(x){x^2+7}...

View Article

RStudio keeps loading prior session with no files and wont run commands

Rstudio keeps opening the same three files that I had opened before. Some strange things include: 1. Able to close the files just fine, but can't run any of the code. R just gets stuck. 2. Don't have...

View Article

Matrix multiplication. Error in ... %*% beta : non-conformable arguments

I try to find a beta (initial value) to insert in my formula. But it doesn't work to me. I keep getting the following error:Error in x1 %*% beta : non-conformable arguments I have used a sample in...

View Article

How do you sum consecutive values in a column and create a new column of...

In a data frame I am trying to calculate the total thickness at certain intervals within a stratigraphic column, and create new coulmns of these total thicknesses in the data frame. I am new to using...

View Article


Fit many glm models: improve speed

I am writing a function to fit many glm models. To just give you some ideas about the function, I include a small section of my code. With the help of several SO users, the function works for my...

View Article

How to use NeuralNet to predict future exchange rate

I have the following data set which extends to 500 values and I would like to create a neural network to predict the future prices. I am using the first 400 for training data and the final 100 to test...

View Article


How to sample records from a database without repeating?

Good afternoon , my problem is as follow :I have a database called friends :friends <- data_frame( name = c("Nicolas", "Thierry", "Bernard", "Jerome", "peter", "yassine", "karim"), age = c(27, 26,...

View Article

Coefficient on Variable of Interest Becomes NA after IV is used

May I get your advice? I ran a felm regression in R and the coefficient on the variable of interest, Tax becomes NA after an IV is used (lagged value of the tax variable).felm(formula = log(IFDI) ~ Tax...

View Article


Method dispatch when mixing S3 and S4

I'd like to understand the steps R goes through to find the appropriate function when mixing S3 and S4. Here's an example:set.seed(1) d <- data.frame(a=rep(c('a', 'b'), each=15), b=rep(c('x', 'y',...

View Article

Anybody has dataset in book "A First Course in Bayesian Statistical Methods"?

Does anybody know how can I get the dataset used in book "A First Course in Bayesian Statistical Methods"?I am reading the book "A First Course in Bayesian Statistical Methods" , by Peter Hoff. See the...

View Article

R Docker: Can't connect to local MySQL server through socket

I've used a golem pipeline to package & dockerize my app. For starters, I am trying to deploy the app locally on windows pc using docker (also tried to run it on linux with a same problem). The app...

View Article
Browsing all 201839 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>