How to implement multi-branch regression trees in R
Is it possible to do the multi branch regression trees(non binary split) using R?
View ArticleHow do I get my shinyApp to read in my data file?
I have my server.R, ui.R and csv file all in my github repo. When I run my shinyapp from R using shiny::runGitHub("st558projectfinal","cgcomora") I get an error that object 'crimes' can't be found. Any...
View ArticleHow to create a function that plots radials in R?
I have never plotted a radial in R before, so I have no idea what I am doing. Is there a different type of plot I should be using? Also I have a list of r's and theta's, however I am not sure how to...
View ArticleHow do I extract estimates and standard errors as a measure of linear...
Let's say I have data:data = data.frame(xdata = 1:10, ydata = 6:15) I look at the datadata xdata ydata 1 1 6 2 2 7 3 3 8 4 4 9 5 5 10 6 6 11 7 7 12 8 8 13 9 9 14 10 10 15 Now I want to include a third...
View ArticleAdding comment to a JIRA issue ticket using REST API in R
I would like to add more comments to an existing JIRA ticket using REST API pro grammatically from RI tried the following based on this link in this forum but did not work:library(httr)...
View ArticleIs there a way to handle the first lapply element differently? or prepend it...
Is there a way to handle the first lapply element differently? or prepend it to the lapply result on the subsequent elements?For example, I have the following:mapping <- c("a", "b", "c") # this...
View ArticleAdd a new level of a variable and asign it the mean value of other variables...
I want to add a level of a variable in a data frame and asign it the average value of other levels in the same variable. I dont know how to do this. So, I want to add the level "base" in the variable...
View ArticleAssigning plot to a variable in a loop
I am trying to create 2 line plots.But I noticed that using a for loop will generate two plots with y=mev2 (instead of a plot based on y=mev1 and another one based on y=mev2).The code below shows the...
View ArticleAlternate elements of a vector with multiple NAs
I have a character vector in R, and want to make a new vector with multiple NAs between the elements of the character vector. To simplify, the character vector is:cv <- c( "A", "B", "C" ) Let's say...
View ArticleSeperating columns with a vertical line and adding a footnote in an Xtable...
I was wondering if anyone knows how to add a footnote beneath an Xtable, as well as seperating each column with a vertical line to make this table look a bit neater.I would like my footnote to say...
View ArticleHow to make a time series in R by counting entries from a given vector?...
This question already has an answer here:Counting unique / distinct values by group in a data frame 10 answersHow do I group my date variable into month/year in R? 6 answersI have a vector like...
View ArticleHow do I fit a Gaussian curve to this data? [duplicate]
This question already has an answer here:Fitting a normal distribution in R 2 answersHow to fit normal distribution with respect to frequency and intensity in R? 1 answerI'm new to R and am trying to...
View ArticleHow to save a `quosure` to be used in another session?
What's the best way to save a quosure so that it can be run on another session? Consider the below, which uses the {rlang}'s quosure concept to quote an expression x+2 and captures its environment...
View ArticleTaking for loop results to a dataframe
Im running this code:#Importar los datos boyanza <- read_excel("Desktop/Tesina - Boyanza del ITBIS/Data/Data ITBIS:PIB Trimestral.xlsx") boyanza <-...
View Articlelinear regression for time series in r- efficiently
Customer date sales1 sales2 c1 2019-01-01 67 35 c1 2019-01-07 70 32 c1 2019-01-14 72 40 c2 2019-01-01 100 12 c2 2019-01-07 134 20 c2 2019-01-14 174 23 Making date column as number for forecasting...
View ArticleCounts of rows in data table based on values
I want to rank each hour value within each individual id. The hour values that equal each other will be the same rank. I attempted to do this with the row count function (.N) in data.table. I was...
View ArticleGrouped Bar Chart Plotly
I am trying to use plotly to make a bar chart using the following data:Any help on this is appreciated. I want it to look similar to this graph but instead of men and women it has the year or income as...
View ArticleHow to calculate RMSE of a vector of parameters?
I have a model with 4061 parameters in which there are 6 number of 10x1 vectors, 2 number of 2000x1 vectors and a scalar parameter.For each vector (or scalar) parameter, I do have a true vector and an...
View ArticleHow to fix incompatible arguments mvrnorm?
So I have to impute data for my Stats course. This works like a charm with the example we did in class. But the second I do it with this data, I get an "incompatible arguments" with the mvrnorm...
View Articledo.call(rbind, list) for uneven number of column
I have a list, with each element being a character vector, of differing lengths I would like to bind the data as rows, so that the column names 'line up' and if there is extra data then create column...
View Article