From danilo.malara83 at gmail.com Mon May 2 02:57:12 2016 From: danilo.malara83 at gmail.com (Danilo83) Date: Sun, 1 May 2016 17:57:12 -0700 (PDT) Subject: [datatable-help] multdrc errorr Message-ID: <1462150632524-4720308.post@n4.nabble.com> Hi all, i'm facing an error using the function multdrc(). My script is: > library(drc) > data = read.csv(file.choose(), header=T) > model1 <- multdrc(Response ~ Treatment, Time, data = data) Error: could not find function "multdrc" i'm using Rstudio and i have the last version just downloaded (02-05-2016). The same proble happen when i do plotraw() function. any help is much appreciated. Danilo -- View this message in context: http://r.789695.n4.nabble.com/multdrc-errorr-tp4720308.html Sent from the datatable-help mailing list archive at Nabble.com. From carlos.falcao.correia at gmail.com Mon May 9 18:27:07 2016 From: carlos.falcao.correia at gmail.com (karl69) Date: Mon, 9 May 2016 09:27:07 -0700 (PDT) Subject: [datatable-help] R: Change X-Axis Plot from days to months - survival functions Message-ID: <1462811227144-4720569.post@n4.nabble.com> Hi, In survival analysis, I have an observation period of 1827 days, and all my plots presents numbers in days in th X-axis. The used functions from survival and relsurv packages are survfit, survexp and rs.surv. Is there a way to present x data in years: 0, 1, 2, 3, 4 and 5? Thanks, CF -- View this message in context: http://r.789695.n4.nabble.com/R-Change-X-Axis-Plot-from-days-to-months-survival-functions-tp4720569.html Sent from the datatable-help mailing list archive at Nabble.com. From carlos.falcao.correia at gmail.com Mon May 9 18:29:08 2016 From: carlos.falcao.correia at gmail.com (karl69) Date: Mon, 9 May 2016 09:29:08 -0700 (PDT) Subject: [datatable-help] R: Change X-Axis Plot from days to months - survival functions In-Reply-To: <1462811227144-4720569.post@n4.nabble.com> References: <1462811227144-4720569.post@n4.nabble.com> Message-ID: <1462811348799-4720570.post@n4.nabble.com> I intended to say YEARS not months ... CF -- View this message in context: http://r.789695.n4.nabble.com/R-Change-X-Axis-Plot-from-days-to-months-survival-functions-tp4720569p4720570.html Sent from the datatable-help mailing list archive at Nabble.com. From statquant at outlook.com Thu May 12 21:06:51 2016 From: statquant at outlook.com (statquant3) Date: Thu, 12 May 2016 12:06:51 -0700 (PDT) Subject: [datatable-help] Do we have a data.table syntax for full outer join ? Message-ID: <1463080011104-4720709.post@n4.nabble.com> Or are we still with merge.data.table(X, Y, all=TRUE) ? -- View this message in context: http://r.789695.n4.nabble.com/Do-we-have-a-data-table-syntax-for-full-outer-join-tp4720709.html Sent from the datatable-help mailing list archive at Nabble.com. From danilo.malara83 at gmail.com Sat May 21 02:03:01 2016 From: danilo.malara83 at gmail.com (Danilo83) Date: Fri, 20 May 2016 17:03:01 -0700 (PDT) Subject: [datatable-help] Dunnet t3 test Message-ID: <1463788981711-4720944.post@n4.nabble.com> Hi all, i have some data where i want to copare controls against my treatment. They are not normal and not having the same variance. I was able to run a Dunnett T3 test using the package DTK in R. however i get result as Diff Lower CI Upper CI. The plot is quite cleare with red plot (statistical defference) and bleck plots (non statistically difference). I have 2 questions and hope some one of you can help me on this. 1) i need to report that control X vs treatment a is statistically different or not, not having a p-value or f-value how i can report it? 2) the plot using DTK.plot(DTK.result) function give me a plot with y labels perpendicular to the yaxis. how i can put the label perpendicular? i tried with las-2 but this package seems not having this function. Sorry for the stupid questions but i'm a new user of R. Thanks in advance Danilo -- View this message in context: http://r.789695.n4.nabble.com/Dunnet-t3-test-tp4720944.html Sent from the datatable-help mailing list archive at Nabble.com. From fperickson at wisc.edu Sat May 21 02:41:04 2016 From: fperickson at wisc.edu (Frank Erickson) Date: Fri, 20 May 2016 20:41:04 -0400 Subject: [datatable-help] Dunnet t3 test In-Reply-To: <1463788981711-4720944.post@n4.nabble.com> References: <1463788981711-4720944.post@n4.nabble.com> Message-ID: This is a mailing list for the data.table package, not for R generally. Maybe you can find a better venue here: https://www.r-project.org/mail.html On Fri, May 20, 2016 at 8:03 PM, Danilo83 wrote: > Hi all, > > i have some data where i want to copare controls against my treatment. They > are not normal and not having the same variance. > I was able to run a Dunnett T3 test using the package DTK in R. > however i get result as Diff Lower CI Upper CI. The plot is > quite cleare > with red plot (statistical defference) and bleck plots (non statistically > difference). > > I have 2 questions and hope some one of you can help me on this. > 1) i need to report that control X vs treatment a is statistically > different > or not, not having a p-value or f-value how i can report it? > 2) the plot using DTK.plot(DTK.result) function give me a plot with y > labels > perpendicular to the yaxis. how i can put the label perpendicular? i tried > with las-2 but this package seems not having this function. > > Sorry for the stupid questions but i'm a new user of R. > > Thanks in advance > > Danilo > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Dunnet-t3-test-tp4720944.html > Sent from the datatable-help mailing list archive at Nabble.com. > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlosalvarezroa at hotmail.com Sun May 22 10:07:44 2016 From: carlosalvarezroa at hotmail.com (CRoa) Date: Sun, 22 May 2016 01:07:44 -0700 (PDT) Subject: [datatable-help] Contrast matrix with a continuous variable Message-ID: <1463904464538-4720966.post@n4.nabble.com> Hi all, I was wondering if someone could help me designing a contrast matrix when you have a continuous variable (Days). My model looks like this: model<-lme(Y~A*B*Days, data=data_over_time) The factor A has two levels (A1 and A2) and factor B has three levels (B1, B2, and B3). I measured the response variable Y every two or three days over 70 days (Days). I need to look at only a few comparisons over the 70 days such us: A1 and B1 vs A2 and B1, A2 and B2 vs A2 and B1, A1 and B2 vs A2 and B2 I could use the function contrast from the package contrast to design the matrix with the three comparisons mentioned above for specific days at a time. However, I need to run the comparison over the 70 days not at individual time points. I was wondering if someone could help me designing this contrast matrix. Any help would be much appreciated Cheers -- View this message in context: http://r.789695.n4.nabble.com/Contrast-matrix-with-a-continuous-variable-tp4720966.html Sent from the datatable-help mailing list archive at Nabble.com. From aragorn168b at gmail.com Sun May 22 12:59:55 2016 From: aragorn168b at gmail.com (Arunkumar Srinivasan) Date: Sun, 22 May 2016 12:59:55 +0200 Subject: [datatable-help] Contrast matrix with a continuous variable In-Reply-To: <1463904464538-4720966.post@n4.nabble.com> References: <1463904464538-4720966.post@n4.nabble.com> Message-ID: This is the mailing list for R?s data.table package. Please post on r-help mailing list. --? Arun On 22 May 2016 at 10:44:29, CRoa (carlosalvarezroa at hotmail.com) wrote: Hi all, I was wondering if someone could help me designing a contrast matrix when you have a continuous variable (Days). My model looks like this: model<-lme(Y~A*B*Days, data=data_over_time) The factor A has two levels (A1 and A2) and factor B has three levels (B1, B2, and B3). I measured the response variable Y every two or three days over 70 days (Days). I need to look at only a few comparisons over the 70 days such us: A1 and B1 vs A2 and B1, A2 and B2 vs A2 and B1, A1 and B2 vs A2 and B2 I could use the function contrast from the package contrast to design the matrix with the three comparisons mentioned above for specific days at a time. However, I need to run the comparison over the 70 days not at individual time points. I was wondering if someone could help me designing this contrast matrix. Any help would be much appreciated Cheers -- View this message in context: http://r.789695.n4.nabble.com/Contrast-matrix-with-a-continuous-variable-tp4720966.html Sent from the datatable-help mailing list archive at Nabble.com. _______________________________________________ datatable-help mailing list datatable-help at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.janssens1 at gmail.com Wed May 25 16:01:21 2016 From: vincent.janssens1 at gmail.com (Fox123) Date: Wed, 25 May 2016 07:01:21 -0700 (PDT) Subject: [datatable-help] For loop acceleration Message-ID: <1464184881184-4721110.post@n4.nabble.com> Is there an alternative method fot this code which is quicker but will have the same result? red <- rood[,1] for (j in 2:(dim(rood)[2])){ red <- c(red, rood[,j]) } rood is 2592x3872 matrix -- View this message in context: http://r.789695.n4.nabble.com/For-loop-acceleration-tp4721110.html Sent from the datatable-help mailing list archive at Nabble.com. From abhishk.dev at gmail.com Sat May 28 14:56:31 2016 From: abhishk.dev at gmail.com (abhishekdev) Date: Sat, 28 May 2016 05:56:31 -0700 (PDT) Subject: [datatable-help] Recursive function that operates on its own preceding output Message-ID: <1464440191620-4721234.post@n4.nabble.com> I have the price for a particular baseline year (in this case for 1993), and the multiplication factor for all the years. Using these known multiplication factor, I want to compute (project) price for all years succeeding and preceding the baseline year. Here is the input data: Year City MultiplicationFactor Price_BaselineYear 1990 New York NA NA 1991 New York 0.9 NA 1992 New York 2.0 NA 1993 New York 0.8 100 1994 New York 0.6 NA 1995 New York 0.8 NA 1996 New York 2.0 NA 1990 Boston NA NA 1991 Boston 1.6 NA 1992 Boston 1.25 NA 1993 Boston 0.5 200 1994 Boston 1.75 NA 1995 Boston 2.5 NA 1996 Boston 0.5 NA The code to construct the input Data: myData<-structure(list(Year = c(1990L, 1991L, 1992L, 1993L, 1994L, 1995L,1996L, 1990L, 1991L, 1992L, 1993L, 1994L, 1995L, 1996L), City = structure(c(2L,2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("Boston","New York"), class = "factor"), MultiplicationFactor = c(NA,0.9, 2, 0.8, 0.6, 0.8, 2, NA, 1.6, 1.25, 0.5, 1.75, 2.5, 0.5),`Price(BaselineYear)` = c(NA, NA, NA, 100L, NA, NA, NA, NA,NA, NA, 200L, NA, NA, NA)), .Names = c("Year", "City", "MultiplicationFactor","Price_BaselineYear"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -14L)) The output I desire (the last column, Price_AllYears): Year City MultiplicationFactor Price_BaselineYear Price_AllYears 1990 New York NA NA 69.4 1991 New York 0.9 NA 62.5 1992 New York 2.0 NA 125.0 1993 New York 0.8 100 100.0 1994 New York 0.6 NA 60.0 1995 New York 0.8 NA 48.0 1996 New York 2.0 NA 96.0 1990 Boston NA NA 200.0 1991 Boston 1.6 NA 320.0 1992 Boston 1.25 NA 400.0 1993 Boston 0.5 200 200.0 1994 Boston 1.75 NA 350.0 1995 Boston 2.5 NA 875.0 1996 Boston 0.5 NA 437.5 Here is what I have so far thanks to @alistaire: myData %>% group_by(City) %>% arrange(Year) %>% mutate(Price_AllYears = ifelse(Year < Year[which(!is.na(Price_BaselineYear))], lead(Price_AllYears) / lead(MultiplicationFactor), ifelse(Year > Year[which(!is.na(Price_BaselineYear))], lag(Price_AllYears) * MultiplicationFactor, Price_BaselineYear)))%>% ungroup() %>% arrange(City) This is the error I get: >Error: object 'Price_AllYears' not found Here is the method I would use if I had to use Excel: A B C D E 1 Year City MultiplicationFactor Price_BaselineYear Price_AllYears 2 1990 New York NA NA E3/C3 3 1991 New York 0.9 NA E4/C4 4 1992 New York 2.0 NA E5/C5 5 1993 New York 0.8 100 D5 6 1994 New York 0.6 NA E5*C6 7 1995 New York 0.8 NA E6*C7 8 1996 New York 2.0 NA E7*C8 9 1990 Boston NA NA E10/C10 10 1991 Boston 1.6 NA E11/C11 11 1992 Boston 1.25 NA E12/C12 12 1993 Boston 0.5 200 D12 13 1994 Boston 1.75 NA E12*C13 14 1995 Boston 2.5 NA E13*C14 15 1996 Boston 0.5 NA E14*C15 -- View this message in context: http://r.789695.n4.nabble.com/Recursive-function-that-operates-on-its-own-preceding-output-tp4721234.html Sent from the datatable-help mailing list archive at Nabble.com.