Questions tagged as 'r'

1
answer

Export package

Personnel I created a package in R, is already with the documentation, with @export in each function, I ask the Rstudio to create the package and everything right. But when I import the package it reads the documents all, it helps...
asked by 28.06.2016 / 04:17
1
answer

How to print / plot a table in #R?

Consider: dat <- matrix(c(1000, 100, 10000, 10000,3.145,1700.42), 2) Where dat refers to loop result data, generating a new dat for each loop. I need to present these results, so I thought I'd export dat to a tabul...
asked by 03.04.2016 / 06:59
1
answer

Creating BoxPlot in ggplot2

I'm doing some simulations on R . When generating data.frame and requesting boxplots printing with small sample size and number of samples boxplot is generated perfectly. The problem is when increasing the sample size...
asked by 04.03.2017 / 18:32
1
answer

Segmented Regression in R

I was studying a little bit about regressão segmentada and some examples executed in R and I'm not sure how segmented works. Do I always need to set where breakpoints should exist? Does R not provide some function...
asked by 18.03.2016 / 15:06
1
answer

How to create a dynamic progress bar in R?

To track the processing status in my routines, I use the progress bars of the pbapply package, but I have not found a dynamic way to track more than one process. To illustrate the problem I considered a list containing three elements of d...
asked by 20.03.2016 / 19:27
1
answer

How to insert the values and their frequency into a data.frame, from a set obtained by SAMPLE?

First get a sequence of random values set.seed(100) estat <- sample(1:20, replace=TRUE) estat [1] 7 6 12 2 10 10 17 8 11 4 13 18 6 8 16 14 5 8 8 14 The idea would be: 1 would be to impose on SAMPLE that the sum of the values o...
asked by 10.01.2017 / 02:50
1
answer

The predict () function does not accept exponential regression in R

Please try to perform parametric survival analysis modeling and the predict() function is returning an error that it does not recognize a variable, but it is there. Here's an example: base=NULL base$DIAS= c(7,6,8,6,5,5,5,6,6,11,6,4,...
asked by 27.04.2016 / 02:09
1
answer

Error loading data in R

I'm learning to fiddle with R , and I was writing a script and everything was fine I suddenly typed read.csv2.ffdf(file="DM_ALUNO.csv",sep="|",first.rows=100000) I pressed ctrl + r and the error below appeared Error in scan(file, w...
asked by 05.02.2016 / 14:33
1
answer

information criterion Akaike time series

I need to check the percentage of times AIC and BIC choose the true model. To do so, you will have to perform a Monte Carlo experiment. Specifically, 1000 AR (2) and ARMA (1,1) processes must be generated. The results of each model should be com...
asked by 13.04.2016 / 01:46
1
answer

How to transform rows into columns, when the number of rows is variable in R

I have a Data Frame like this: Itneedstolooklikethis: Thevariablethatdefinesthecolumncanbecalculatedaccordingtotheimagebelow The sequence starts with every change of the id, in excel it would be easy but I want to learn how to do it in...
asked by 14.04.2016 / 01:40