Re: [R] gsDesign Pocock & OBF boundary

2017-09-22 Thread Berend Hasselman
> On 23 Sep 2017, at 01:32, array chip via R-help wrote: > > Hi, > > I am learning to use your gsDesign package! I have a question about Pocock > and OBF boundary. As far as Iunderstand, these 2 boundaries require equal > spacing between interim analyses(maybe this is not correct?). But I ca

[R] gsDesign Pocock & OBF boundary

2017-09-22 Thread array chip via R-help
Hi, I am learning to use your gsDesign package! I have a question about Pocock and OBF boundary. As far as Iunderstand, these 2 boundaries require equal spacing between interim analyses(maybe this is not correct?). But I can still use gsDesign to run an analysisbased on unequal spacing:  gsDes

[R] "XLConnect" packages; Excel dates read incorrectly

2017-09-22 Thread John
Hi, I tried to read xlsx files by "XLConnect" packages, but the dates are one day earlier than it is supposed to be. I moved from California to Taiwan (Eastern Asia), and it worked well in California, but not in Taiwan. Even if I adjust my Mac time to California time zone, it gives the wrong da

Re: [R] update numeric values of list with new values...

2017-09-22 Thread Evan Cooch
Thanks! On 9/22/2017 12:34 PM, Bert Gunter wrote: > Well,  that's a bit like driving from Boston to New York by way of > Chicago. > > See ?structure > > test <- list(a=1,b=2,c=3) > new <- c(4,5,6) > test.new <- structure(as.list(new), names=names(test)) > test.new > $a > [1] 4 > > $b > [1] 5 > >

Re: [R] Embedding PDF into RTF document via R language

2017-09-22 Thread Bert Gunter
An obvious question is: why mess with RTF at all, as R and RStudio provide support for document creation with embedded R content (i.e. through knitr and associated)? But be that as it may (i.e. don't answer that), have you tried posting on: https://stackoverflow.com/ ? Seems like this sort

[R] Embedding PDF into RTF document via R language

2017-09-22 Thread Fisher Dennis
R 3.4.1 OS X and Windows Colleagues I have a complicated problem that includes several components: R RTF PDF Using R (and a slew of RTF commands), I assemble a text document with an RTF extension. The document contains text, tables, and images (JPEG format, previously

Re: [R] update numeric values of list with new values...

2017-09-22 Thread Bert Gunter
Well, that's a bit like driving from Boston to New York by way of Chicago. See ?structure test <- list(a=1,b=2,c=3) new <- c(4,5,6) test.new <- structure(as.list(new), names=names(test)) test.new $a [1] 4 $b [1] 5 $c [1] 6 Cheers, Bert Bert Gunter "The trouble with having an open mind is

Re: [R] Subset

2017-09-22 Thread Shane Carey
Super, Thanks On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe wrote: > > a <- c("<0.1", NA, 0.3, 5, "Nil") > > a > [1] "<0.1" NA "0.3" "5""Nil" > > > b <- as.numeric(a) > Warning message: > NAs introduced by coercion > > b > [1] NA NA 0.3 5.0 NA > > > b[! is.na(b)] > [1] 0.3 5.0 > > >

Re: [R] Subset

2017-09-22 Thread Boris Steipe
> a <- c("<0.1", NA, 0.3, 5, "Nil") > a [1] "<0.1" NA "0.3" "5""Nil" > b <- as.numeric(a) Warning message: NAs introduced by coercion > b [1] NA NA 0.3 5.0 NA > b[! is.na(b)] [1] 0.3 5.0 B. > On Sep 22, 2017, at 11:48 AM, Shane Carey wrote: > > Hi, > > How do I extract just n

[R] Subset

2017-09-22 Thread Shane Carey
Hi, How do I extract just numbers from the following list: a=c("<0.1",NA,0.3,5,Nil) so I want to obtain: 0.3 and 5 from the above list Thanks -- Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* [[alternative HTML version deleted]]

Re: [R] rcorr error in R stat

2017-09-22 Thread Chaitanya Ganne
My apologies for the late reply. I had scans after I last messaged you yesterday. Please find attached the ms-dos CSV file which I prepared using microsoft excel. there should be GT1.csv and NPA1.csv. Thanking you From: ruipbarra...@sapo.pt Sent: Thursday, S

Re: [R] Lattice stacked barplot vertical bars

2017-09-22 Thread Luigi Marongiu
Yes, perfect! Thank you L On Fri, Sep 22, 2017 at 2:48 PM, Duncan Mackay wrote: > Hi Luigi > > will this do > > barchart( > D ~ A|E, > DF, > groups = C, > stack = TRUE, > horizontal = F, > main = "Comparison of test results", > xlab = "Count", > col = c("yellow", "

Re: [R] update numeric values of list with new values...

2017-09-22 Thread Evan Cooch
Solved it: test <- list(a=1,b=2,c=3) new <- c(4,5,6) hold <- as.list(new) updated_test <- replace(test,c(1:3),hold) $a [1] 4 $b [1] 5 $c [1] 6 mean.parms <- as.list(mean.parms) mm.parms <- replace(far.parms,c(1:length(far.parms)),mean.parms) On 9/22/2017 10:34 AM, Evan Cooch wrote: Supp

[R] update numeric values of list with new values...

2017-09-22 Thread Evan Cooch
Suppose I have the following: test <- list(a=1,b=2,c=3) I also have a vector (or list, or something else...) with new numbers new <- c(4,5,6) What I'm trying to figure out is how to take the list, and update the numbers from {1,2,3} to {4,5,6} So, in the end,I want the 'update' test list to

Re: [R] Lattice stacked barplot vertical bars

2017-09-22 Thread Duncan Mackay
Hi Luigi will this do barchart( D ~ A|E, DF, groups = C, stack = TRUE, horizontal = F, main = "Comparison of test results", xlab = "Count", col = c("yellow", "orange"), par.settings = list( strip.background = list(col="light grey"), superpose.po

Re: [R] require help

2017-09-22 Thread Joshua Ulrich
On Fri, Sep 22, 2017 at 7:28 AM, yadav neog wrote: > thankx to everyone for your valuable suggestions. one query regarding the > GARCH model. > I have applied the GARCH model for the same data that I send you all . and > my results coming like > > Error in .sgarchfit(spec = spec, data = data, out.

Re: [R] require help

2017-09-22 Thread yadav neog
thankx to everyone for your valuable suggestions. one query regarding the GARCH model. I have applied the GARCH model for the same data that I send you all . and my results coming like Error in .sgarchfit(spec = spec, data = data, out.sample = out.sample, : ugarchfit-->error: function requires a

[R] Lattice stacked barplot vertical bars

2017-09-22 Thread Luigi Marongiu
Dear all, I have made a barplot using lattice in which the bars are stacked horizontally. I would like to stack them vertically, but if I use the parameter 'horizontal = FALSE' I get the error: 'Error in FUN(X[[i]], ...) : invalid 'type' (character) of argument'. The problem I face is that, in draw

Re: [R] Convert data into zoo object using Performance analytics package

2017-09-22 Thread PIKAL Petr
Hi From: Upananda Pani [mailto:upananda.p...@gmail.com] Sent: Friday, September 22, 2017 11:53 AM To: PIKAL Petr Cc: r-help ; Gabor Grothendieck Subject: Re: [R] Convert data into zoo object using Performance analytics package Dear All, Thanks a lot for your help. Would you please let me know

Re: [R] Treating NA in timeSeries package

2017-09-22 Thread PIKAL Petr
Hi see in line > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Upananda > Pani > Sent: Friday, September 22, 2017 11:45 AM > To: r-help > Subject: [R] Treating NA in timeSeries package > > Dear All, > > I am facing problem with NA treatment in my fi

Re: [R] Convert data into zoo object using Performance analytics package

2017-09-22 Thread Upananda Pani
Dear All, Thanks a lot for your help. Would you please let me know if i want to read a csv file as zoo object from my local file rather than directly from the website, how to do that? library(zoo) u <- "https://faculty.washington.edu/ezivot/econ424/sbuxPrices.csv"; fmt <- "%m/%d/%Y" With sincer

[R] Treating NA in timeSeries package

2017-09-22 Thread Upananda Pani
Dear All, I am facing problem with NA treatment in my financial time series data. # data reading aluminum = read.csv(file="alu.csv", header=T, sep=",") fut = aluminum [,2] spt = aluminum [,3] # Missing Value Treatment (Linear Interpolation) spt = interpNA(spt, method = c("linear")) fut = inte