Re: [R] How to create a time series object with time only (no date)

2014-12-20 Thread Joshua Ulrich
On Dec 20, 2014 11:11 PM, "ce" wrote: > > > Dear all, > > I want to create a time series object from 00:00:00 to 23:59:00 without dates ? > I can't figure it out with xts ? > You can't create an xts object without a date in the index. If the date doesn't matter, you can just set it to 1970-01-01 (

[R] How to create a time series object with time only (no date)

2014-12-20 Thread ce
Dear all, I want to create a time series object from 00:00:00 to 23:59:00 without dates ? I can't figure it out with xts ? ce __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] Bca confidence intervals for Pearson coefficient, thanks.

2014-12-20 Thread John Fox
Dear varin sacha, I think that you misunderstand how boot() and boot.ci() work. The boot() function in the simplest case takes two arguments, for the data and indices into the data, while boot.ci() takes as its principal argument the object returned by boot(). All of this seems reasonably clear

Re: [R] where are the NEWS for R <3.0.0?

2014-12-20 Thread Duncan Murdoch
On 19/12/2014, 5:48 PM, Ben Marwick wrote: > I'm looking for the NEWS files for versions of R before 3.0.0, does > anyone know where they are? I'm interested in getting the names of > people who have been acknowledged when changes are made to R. > > At the bottom of http://cran.r-project.org/src

Re: [R] Add encoded special characters (greek characters) as text to plot

2014-12-20 Thread Jeff Newmiller
You are welcome, but you have not yet followed the Posting Guide instructions, so you may not have prompted someone familiar with your situation to respond yet. --- Jeff NewmillerThe . ..

Re: [R] how update to latest version of R on mac

2014-12-20 Thread Jeff Newmiller
You might find help more tuned to your environment by also participating on the R-sig-mac mailing list. As always start by reading the archives and posting guide, as well as using a search engine. Note that bioconductor has its own website and support forums. This list is still a good place for

Re: [R] non negativity constraints if else function

2014-12-20 Thread Jeff Newmiller
"if weight element is negative set it to zero, else recalculate the weights again"... this seems like the only way out of this loop is to calculate negative weights... and since you set them to zero at that point they will all be zero when you are done. Somehow I doubt that is what you intended

Re: [R] Add encoded special characters (greek characters) as text to plot

2014-12-20 Thread heyi xiao via R-help
Thank you all for the input. That helps, although I haven’t get the exact solution.. On Thu, 12/18/14, Chel Hee Lee wrote: Subject: Re: [R] Add encoded special characters (greek characters) as text to plot To: "Jeff Newmiller" , "heyi xiao" , "he

Re: [R] non negativity constraints if else function

2014-12-20 Thread Jorge I Velez
What about ifelse(w < 0, 0, w) See ?ifelse for more information. Best, Jorge.- On Sat, Dec 20, 2014 at 3:26 PM, Esra Ulasan wrote: > Hello, > > I have tried the solve the non-negativity constraint "if else function" in > R. But I have done something wrong because it still gives the same > so

Re: [R] how update to latest version of R on mac

2014-12-20 Thread Thomas Adams
Jane, It's possible, since you are using Mac OS X Lion (10.7.5), you need the R version for that, which can be found here: http://cran.r-project.org/bin/macosx/old/R-3.1.1-mavericks.pkg Cheers! Tom On Fri, Dec 19, 2014 at 2:56 PM, Jane Synnergren wrote: > > Hi, > I get following error when tryi

[R] Bca confidence intervals for Pearson coefficient, thanks.

2014-12-20 Thread varin sacha
Hi to everyone, I am trying to calculate the Bca bootstrap confidence intervals for the Pearson coefficient. x=Dataset$math.testy=Dataset$geo.testcor(x,y,method="pearson")[1] 0.6983799 boot.ci(cor, conf=0.95, type=bca)Erreur dans boot.out$t0 : objet de type 'closure' non indiçable I have tried a

[R] Specifying plot area in dotchart2

2014-12-20 Thread Ryan Derickson
Hello, I'm producing multiple dotcharts and I want each plotting area (the area containing the dots only- not the labels) to be the same width. Currently, the width of the area depends on the length of the labels. I've tried different margin arguments but they change the parameter of the whole plo

[R] where are the NEWS for R <3.0.0?

2014-12-20 Thread Ben Marwick
I'm looking for the NEWS files for versions of R before 3.0.0, does anyone know where they are? I'm interested in getting the names of people who have been acknowledged when changes are made to R. At the bottom of http://cran.r-project.org/src/base/NEWS.html it says "Older news can be found in

[R] non negativity constraints if else function

2014-12-20 Thread Esra Ulasan
Hello, I have tried the solve the non-negativity constraint "if else function" in R. But I have done something wrong because it still gives the same solution. I want that, if weight element is negative set it to zero, else recalculate the weights again. These are the codes: for(i in 1:M){ w[,

[R] short-sale constraint with nonpositive-definite matrix in portfolio optimization

2014-12-20 Thread Esra Ulasan
Hello, I want to ask about portfolio optimization in R. I have a nonpositive-definite matrix. I have handled with the singularity. Unfortunately, quadprog etc. optimization packages fail to solve the optimization problem under the constraints. Because these packages takes the covariance matrix

[R] how update to latest version of R on mac

2014-12-20 Thread Jane Synnergren
Hi, I get following error when trying to update the affy package to latest version. Error: cannot remove prior installation of package Œaffy¹ I think it is because affy requires R 3.1.1 and I have 3.0.2 I try to find a guide how I do to upgrade from 3.0.2 to latest version on mac, but cannot fin

Re: [R] list of lists, is this element empty

2014-12-20 Thread Boris Steipe
Thanks. This is what I was referring to: x <- rep(NA, 3) is.na(x) [1] TRUE TRUE TRUE if (is.na(x)) {print("True")} [1] "True" Warning message: In if (is.na(x)) { : the condition has length > 1 and only the first element will be used You are of course right - the warning is generated by if(), n

Re: [R] list of lists, is this element empty

2014-12-20 Thread Duncan Murdoch
This may be out of context, but on the face of it, this claim is wrong: On 20/12/2014, 1:57 PM, Boris Steipe wrote: "Moreover is.na() behaves differently when evaluated on its own, or as the condition of an if() statement." The conditions in an if() statement are not evaluated in special conditio

Re: [R] list of lists, is this element empty

2014-12-20 Thread Bert Gunter
Boris et. al: Indeed, corner cases are a bear, which is why it is incumbent on any OP to precisely define what they mean by, say, "missing", "null","empty", etc. Here is an evil example to illustrate the sorts of nastiness that can occur: > z <- list(a=NULL, b=list(), c=NA) > with(z,{ + c(ident

Re: [R] list of lists, is this element empty

2014-12-20 Thread Boris Steipe
This can be tricky, because depending on what the missing object is, you can get either NULL, NA, or an error. Moreover is.na() behaves differently when evaluated on its own, or as the condition of an if() statement. Here is a function that may make life easier. The goal is NOT to have to pass e

Re: [R] list of lists, is this element empty

2014-12-20 Thread Rui Barradas
Hello, Your list seems to have only 2 elements. You can check this with length(x) Or you can try lapply(x, is.null) Hope this helps, Rui Barradas Em 20-12-2014 15:58, Ragia Ibrahim escreveu: Hello, Kindly I have a list of lists as follow x [[1]] [1] 7 [[2]] [1] 3 4 5 as showen x[[3]] doe

Re: [R] list of lists, is this element empty

2014-12-20 Thread Ben Tupper
Hi, On Dec 20, 2014, at 10:58 AM, Ragia Ibrahim wrote: > Hello, > Kindly I have a list of lists as follow > x > [[1]] > [1] 7 > > [[2]] > [1] 3 4 5 > > as showen x[[3]] does not have a value and it has NULL, how can I check on > this > how to test if x[[3]] is empty. > In general you can

[R] list of lists, is this element empty

2014-12-20 Thread Ragia Ibrahim
Hello, Kindly I have a list of lists as follow x [[1]] [1] 7 [[2]] [1] 3 4 5 as showen x[[3]] does not have a value and it has NULL, how can I check on this how to test if x[[3]] is empty. thanks in advance Ragia [[alternative HTML version dele

Re: [R] How to make Pivot table with two variables in R?

2014-12-20 Thread Chel Hee Lee
You are welcome, I am glad that I was able to help. Chel Hee Lee, PhD Biostatistician and Manager Clinical Research Support Unit College of Medicine University of Saskatchewan On 12/20/2014 03:53 AM, Kristi Glover wrote: Thank you Prof. Lee for your code. I am sorry that I noticed that I sent