[R] approx with NAs

2019-05-03 Thread Robert Almgren
There is something I do not think is right in the approx() function in base R, with method="constant" and in the presence of NA values. I have 3.6.0, but the behavior seems to be the same in earlier versions. My suggested fix is to add an "na.rm" argument to approx(), as in mean(). If this

[R] Loading EDF files

2019-05-03 Thread Marcelo Mariano Silva
Dear All, I have tried to load an EDF file using the code below and I received the following massage : Error in signals[[sn]]$signal[nextInCSignal[sn]:lastOne] <- samples[[sn]] : replacement has length zero What this massage means? Is there any problem with the EDF file? Code used: hdr <-

[R] One-way ANOVA with replicates

2019-05-03 Thread Senaka Amarakeerthi
Hi All, I have a dataset (attached) with three groups (treatments) namely Neutral , Video, Audio and four output variables. I am planning to check the ANOVA results to show that is a difference in observations when treatment is changed. To generalize the conclusion, I did the same experiment for

Re: [R] randomly sampling and visualizing 100 nodes in a citation network with igraph library

2019-05-03 Thread Rui Barradas
Hello, Maybe you can sample from the vertices subv <- sample(V(G), 100) and then use something like [1] (StackOverflow). [1]https://stackoverflow.com/questions/23682113/creating-subgraph-using-igraph-in-r Hope this helps, Rui Barradas Às 22:02 de 03/05/19, Drake Gossi escreveu: Hello

Re: [R] create a table for time difference (from t3 to t1, so on..)

2019-05-03 Thread Jim Lemon
Hi Marna, You can get the information you need with this: dAT$date<-as.Date(dAT$date,"%d-%b-%y") diffs<-function(x,maxn) return(diff(x)[1:maxn]) initdate<-function(x) return(min(x)) datediffs<-aggregate(dAT$date,list(dAT$Id),diffs,3) I can't do the manipulation of the resulting values at the

Re: [R] stukel function unavailable for some odd reason

2019-05-03 Thread Duncan Murdoch
On 03/05/2019 4:49 p.m., Paul Bernal wrote: Dear friends, I have been fitting a logistic regression and wanted to try a couple of goodness of fit tests on the model. Doing some research, I came across Chris Dardi's stukel and logiGOF functions from package LogisticDx v0.1. The current

[R] randomly sampling and visualizing 100 nodes in a citation network with igraph library

2019-05-03 Thread Drake Gossi
Hello everyone, How would I randomly select 100 nodes to look at out of these approx. 25,? I'm practicing constructing a citation network. edgeList below is an edge list. > head (edgeList) tofrom [1,] "4US6""3US320" [2,] "4US6""4US1" [3,] "6US280" "1US393" [4,]

[R] stukel function unavailable for some odd reason

2019-05-03 Thread Paul Bernal
Dear friends, I have been fitting a logistic regression and wanted to try a couple of goodness of fit tests on the model. Doing some research, I came across Chris Dardi's stukel and logiGOF functions from package LogisticDx v0.1. I tried installing package LogisticDx in different R versions

Re: [ESS] running R remotely via tramp

2019-05-03 Thread Alex Branham via ESS-help
Hi Chris - I'm on my phone now so I haven't tried this, but I think changing ess-directory to default-directory should solve this issue. Alex On May 3, 2019 9:46:58 AM CDT, Chris Wallace via ESS-help wrote: >Dear ESS-help, > >I have just upgraded my ess via melpa, and my ability to run R

[ESS] running R remotely via tramp

2019-05-03 Thread Chris Wallace via ESS-help
Dear ESS-help, I have just upgraded my ess via melpa, and my ability to run R remotely has stopped. I had been doing so via the function (after earlier help from this list https://stat.ethz.ch/pipermail/ess-help/2016-January/010863.html)   (defun Rcpu ()     "Run R on CSD3"    

[R] create a table for time difference (from t3 to t1, so on..)

2019-05-03 Thread Marna Wagley
Hi R User. I have a date set in which I wanted to find the duration (period) between released time and detection time for each individual. Is there any simplest way to create a matrix? I appreciate your help. Thanks, MW -- Here is the example data, dAT<-structure(list(Id =

Re: [R] Loading EDF files

2019-05-03 Thread Bert Gunter
Try samples[["sn"]] ? On Fri, May 3, 2019, 9:53 AM Eric Berger wrote: > Hi Mariano, > The problem appears to be that samples[[sn]] has zero length (or is NULL). > Consider the following code which gives the same error message. > > x <- 1:10 > x[1:5] <- as.numeric(NULL) > Error in x[1:5] <-

Re: [R] Loading EDF files

2019-05-03 Thread Eric Berger
Hi Mariano, The problem appears to be that samples[[sn]] has zero length (or is NULL). Consider the following code which gives the same error message. x <- 1:10 x[1:5] <- as.numeric(NULL) Error in x[1:5] <- as.numeric(NULL) : replacement has length zero HTH, Eric On Fri, May 3, 2019 at 4:32 PM

[R] Loading EDF files

2019-05-03 Thread Marcelo Mariano Silva
Dear All, I have tried to load an EDF file using the code below and I received the following massage : Error in signals[[sn]]$signal[nextInCSignal[sn]:lastOne] <- samples[[sn]] : replacement has length zero What this massage means? Is there any problem with the EDF file? Code used: hdr <-