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

compute daily average for a certain time period

I have daily data for over 50 years. I need to generate a new dataset with averaged values of daily data.For each day the average should be taken as including daily data from past 10 years and future...

View Article


Workflow for R-Keras on Google Colab

I would like to do machine learning with R (please accept my choice) and was wondering if I could use the IRkernel on google colab to install and run keras and thereby access the tensorflow library in...

View Article


R loop function over time

First off I'd like the apologize for any vague descriptions here. It's my first week on R and I am still getting used to the new lingo.I am trying to show to movement of bike sharing stations over the...

View Article

Decision Tree party package prediction error - Levels do not match

I am building a CART regression tree model in R using party package, but I got error message saying levels do not match when I try to apply the model with testing dataset. I have spent the past week...

View Article

Add (+) 1 to each row that has 0 in dataframe

I have a dataframe that looks like this.df1 <- read.table(text = " REF_CNT.x ALT_CNT.x REF_CNT.y ALT_CNT.y 1 397 0 574 2 2 417 2 219 0 3 537 2 31 0 4 117 5 154 0 5 76 2 52 0 6 238 0 102 2 7 265 0...

View Article


Subsetting my data is not yielding the expected results

I have a dataset of 93 observations. There are only two variables, a factor (size, a number) and it's response (percent, also a number). The factor value ranges from 0-2000. I would like to combine...

View Article

what are the parameters of bayes optimization for tuning parameter?

I am using Bayesian optimization to tune the parameters of SVM for regression problem. In the following code, what should be the value of init_grid_dt = initial_grid ? I got the upper and lower bounds...

View Article

Has the method annotations in R(NLP package) been deprecated or replaced?

I am following this article https://mylearnmachinelearning.com/category/linear-regression/ to create a Named Entity Extractor. Like required, I have installed all the openNLP, NLP, rJava, magrittr and...

View Article


Image may be NSFW.
Clik here to view.

Add text in between multiple plots

I am plotting 5 rasters side by side. The figure represents a linear regression model, and so the plot should represent r1 ~ r2 + r3 + r4 + r5. I am using par() to line up the 5 rasters and would like...

View Article


HTML Parsing help to extract Author Names from URL website in R using getNodeSet

I am having trouble extracting the names of authors as variables form the URL below in R. I understand the basics of the GetNodeSet when looking at the structure of data in xml format, but I don't...

View Article

lapply & unique plot name

I have a list of 18 items (called allDataTestRetest), for all these 18 items I want to make a plot. I made the following function to make a Bland Altman Plot of my data: rater = input[,4] ba.stats...

View Article

Create a scatter plot between multiple variables

Create a scatter plot between flavanoids and phenols. Have the point color and shape reflect the wine origin.given:wineurl <- paste("https://archive.ics.uci.edu/ml/",...

View Article

Not getting all() quicker using Rcpp

As I'm a bit new to Rcpp, I might be missing a trick here.Let's create two matrices:library(Rcpp) library(microbenchmark) P <- matrix(0, 200,500) for(i in 1:500) P[,i] <- rep(rep(sample(0:1), 2),...

View Article


Image may be NSFW.
Clik here to view.

Missing predictor variable computing Bayesian ANOVA using stan_aov from...

I am computing a Bayesian ANOVA to investigate how my heading variable affects FirstSteeringTime. Here is an example of my data set:x <- structure(list(FirstSteeringTime = c(0.433389999999999,...

View Article

R: Include only business day observations in a data frame with observations...

I have a data frame with a date column and two columns of observations. I want to create a new data frame where only the observations that are from business days are included. I tried...

View Article


Poisson distribution in R mixdist package

I think my data might be described by a sum of Poisson distributions and I found out about mixdist package for R. I managed to fit gamma and lnorm distributions, but I can't figure out how to use...

View Article

Image may be NSFW.
Clik here to view.

How do I set the regression line color in the r car scatterplotMatrix function

How do I change the color of the regression line in the r car scatterplotMatrix function?If I run this code:# Load the iris dataset. library(car) data(iris) # Plot #1: Basic scatterplot matrix of the...

View Article


How do I keep as.data.frame.matrix from using my first variable as row names?

I want to create a table of my data so I can sort my values for "gymnasiegrov" according to frequency. I write the following code:#creating table#...

View Article

How to simplify a case_when() inside a mutate()

I have a data frame and I want to add a column. For that purpose, I use dplyr::mutate. However, the values of the column I want to add depend of the value of other column. I use case_when() and the...

View Article

Image may be NSFW.
Clik here to view.

How to interpret Residuals vs. Fitted Plot

I am investigating the effects of weather conditions on restaurant demand. Currently, I am testing the model assumptions for my multiple linear regression model.My model specification (simplified) is...

View Article
Browsing all 205993 articles
Browse latest View live


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