Re: [R] Why aov() with Error() gives three strata?

2017-12-28 Thread peter dalgaard
At any rate: Error(SUBJECT/IV) specifies two random effects: SUBJECT and SUBJECT:IV. This is most easily understood if you conceptually arrange your data in a SUBJECT x IV table: One effect is a set of random errors added to each row, the other is a set of effects added to each cell. If you

Re: [R] Help with script

2017-12-28 Thread Rui Barradas
Hello, Just use ?aggregate. Example <- read.table(text = " ID ABCDEFG a1 0001120 a2 0101221 a2 0112021 a3 0111111 ", header = TRUE) aggregate(. ~ ID, Example , sum)

Re: [R] Help with dates

2017-12-28 Thread Marc Girondot via R-help
Le 28/12/2017 à 18:13, Ramesh YAPALPARVI a écrit : Hi all, I’m struggling to get the dates in proper format. I have dates as factors and is in the form 02/27/34( 34 means 1934). If I use Try this x <- "02/27/34" x2 <- paste0(substr(x, 1, 6), "19", substr(x, 7, 8)) as.Date(x2, format="%m/%d/%Y

Re: [R] Help with script

2017-12-28 Thread Eric Berger
Hi Pablo, There are probably many ways to do this in R. This suggestion uses dplyr. The solution is actually only one line (see the line starting with dat2). The first section simply creates the example data. library(dplyr) # 1. set up the example data m <- matrix( c(0,0,0,0,0,1,1,1,0,0,1,1,1,1,2,

Re: [R] RQuantLib

2017-12-28 Thread Joshua Ulrich
On Thu, Dec 28, 2017 at 6:02 PM, rsherry8 wrote: > > I have recently installed R on my new computer. I also want to install the > package RQuantLib. So I run the following command and get the following > output: > >> install.packages("RQuantLib") > Installing package into ‘C:/Users/rsher/Document

[R] Help with script

2017-12-28 Thread PABLO ORTIZ PINEDA
Hello there. Happy new year for everyone! I need help with a table. This table contains 300 rows and 192 columns. Being the first column the ID of my samples that can have several observations. I need to generate e NEW table that contains a single ID with the sum of the observations by columns

[R] RQuantLib

2017-12-28 Thread rsherry8
I have recently installed R on my new computer. I also want to install the package RQuantLib. So I run the following command and get the following output: > install.packages("RQuantLib") Installing package into ‘C:/Users/rsher/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) --- Please

Re: [R] Help with dates

2017-12-28 Thread Simmering, Jacob E
Your dates have an incomplete year information with 34. R assumes that 00-68 are 2000 to 2068 and 69 to 99 are 1969 to 1999. See ?strptime and the details for %y. You can either append “19” to the start of your year variable to make it completely express the year or check if the date is in the

Re: [R] Why aov() with Error() gives three strata?

2017-12-28 Thread Jorge Fernando Saraiva de Menezes
Bert, thanks for the reply but I feel that my question is less about statistics and more about R interface. Specifically, because the output of R seems different than other programs (systat, for example, gives a between and a within table instead of a three level one). I am familiar with the conne

[R] Help with dates

2017-12-28 Thread Ramesh YAPALPARVI
Hi all, I’m struggling to get the dates in proper format. I have dates as factors and is in the form 02/27/34( 34 means 1934). If I use as.Date with format %d%m%y it gets converted to 2034-02-27. I tried changing the origin in the as.Date command but nothing worked. Any help is appreciated. Tha

Re: [R] Why aov() with Error() gives three strata?

2017-12-28 Thread Bert Gunter
Jorge: FYI, *generally speaking,* queries that are mostly statistical in nature, such as yours, are off topic here -- this list is about R programming help, not statistical help. Having said that, you still may get a useful response here -- the r-help/statistics intersection *is* nonempty. However

[R] Why aov() with Error() gives three strata?

2017-12-28 Thread Jorge Fernando Saraiva de Menezes
Dear list users, I am trying to learn Repeated measures ANOVA using the aov() interface, but I'm struggling to understand its output. According to tutorials on the web, formula for a repeated measures design is: aov(Y ~ IV+ Error(SUBJECT/IV) ) This formula does work but it returns three strata