[R] Read .xlsx and convert date-column value into Dataframe

2015-07-22 Thread R_Antony
Hi, Here i am having a .xlsx file and it contains various columns including date-column[mm/dd/yy]-but it is not in the date format. I have to read this excel[.xlsx] file and need to get in dataframe. So i used xlsx-liabrary and it was fine to read data. But the problem is, values in the date

Re: [R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Sarah Goslee
Please reply to the list, not me. The list doesn't allow most attachments (and most of the list recipients are highly unlikely to open unsolicited binary files anyway). Do see the link I provided for the appropriate way to create reproducible examples, including providing data (hint: use dput(),

Re: [R] Langelier-Ludwig Plots

2015-07-22 Thread Boris Steipe
According to ... http://info.ngwa.org/gwol/pdf/721000139.PDF (Graphical Interpretation of Water Quality Data) ... a Langelier-Ludwig plot is simply a scatterplot of cations vs. anions (in percent). Surely that would be beyond trivial to produce in R. Or am I missing a subtle something?

[R] How to simulate informative censoring in a Cox PH model?

2015-07-22 Thread Daniel Meddings
I wish to simulate event times where the censoring is informative, and to compare parameter estimator quality from a Cox PH model with estimates obtained from event times generated with non-informative censoring. However I am struggling to do this, and I conclude rather than a technical flaw in my

Re: [R-es] ERROR: subscript out of bounds

2015-07-22 Thread Carlos Ortega
Hola, Te adjunto un nuevo código comentado, que funciona y que incluye explicaciones de porqué el error que obtenías: #- library(ape) my.phylo-read.tree(150_BootstrapConsensusTree_Cantabrian_ML.nwk) my.sample - read.delim(my.sample.txt)

Re: [R] Read .xlsx and convert date-column value into Dataframe

2015-07-22 Thread Ivan Calandra
Hi Antony, I am not sure it could work easily with package xlsx. Try using the function read_excel() from package readxl. This function allows for Dates to be read. HTH, Ivan -- Ivan Calandra, ATER University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros

[R] Langelier-Ludwig Plots

2015-07-22 Thread Rich Shepard
My web search for an R package producing Langelier-Ludwig plots found no hits. Has this been implemented in base graphics, lattice, ggplot2, or another package? The reference: Langelier, W., and Ludwig, H., 1942, Graphical methods for indicating the mineral character of natural waters: J.

[R] Error in rownames

2015-07-22 Thread JIALU YAO
Hello, When I type the code *rownames(gene_exp_matrix)-levels(geneidfactor)*,the error happens: Error in rownames-(*tmp*,value=character(0)):can not set object to 'rownames'. I am using Mac OS X10.10.2. How can I fix this problem? Thank a lot. Yao -- View this message in context:

Re: [R] Error in rownames

2015-07-22 Thread Sarah Goslee
Without a reproducible example that includes some sample data (fake is fine), the code you used, and some clear idea of what output you expect, it's impossible to figure out how to help you. Here are some suggestions for creating a good reproducible example:

Re: [R] Read .xlsx and convert date-column value into Dataframe

2015-07-22 Thread John McKown
Those numbers are a serial number of days. A value of 1 maps to Jan 1, 1900. ref: https://support.office.com/en-za/article/DATE-function-e36c0c8c-4104-49da-ab83-82328b832349 A formula such as: as.Date('1900-01-01')+excel_date-1 should convert the serial value to a date value. On Wed, Jul 22,

[R] [R-pkgs] SDR package for Subgroup Discovery on CRAN

2015-07-22 Thread amgv0009
Package SDR for subgroup discovery data mining is available on CRAN now. More info of the package on the CRAN page: https://cran.r-project.org/web/packages/SDR/index.html Ángel. [[alternative HTML version deleted]] ___ R-packages

Re: [R] Error in rownames

2015-07-22 Thread David Winsemius
On Jul 22, 2015, at 12:50 AM, JIALU YAO wrote: Hello, When I type the code *rownames(gene_exp_matrix)-levels(geneidfactor)*,the error happens: Error in rownames-(*tmp*,value=character(0)):can not set object to 'rownames'. I am using Mac OS X10.10.2. How can I fix this problem? The

Re: [R] Read .xlsx and convert date-column value into Dataframe

2015-07-22 Thread jim holtman
forgot the reply to all: These are serial dates within EXCEL. Here is a way of converting them: as.Date(c(42460, 42426), origin = '1899-12-30') [1] 2016-03-31 2016-02-26 Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you

Re: [R] Langelier-Ludwig Plots

2015-07-22 Thread Rich Shepard
On Wed, 22 Jul 2015, Boris Steipe wrote: According to ... http://info.ngwa.org/gwol/pdf/721000139.PDF (Graphical Interpretation of Water Quality Data) ... a Langelier-Ludwig plot is simply a scatterplot of cations vs. anions (in percent). Surely that would be beyond trivial to produce in

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Boris Steipe
Try: qqnorm(log(mydat)) That doesn't look too bad, does it? Now: where is the problem? Cheers, B. On Jul 22, 2015, at 12:41 PM, Amelia Marsh amelia_mars...@yahoo.com wrote: Hello! (I dont know if I can raise this query here on this forum, but I had already raised on teh finance forum,

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Ben Bolker
Amelia Marsh amelia_marsh08 at yahoo.com writes: Hello! (I dont know if I can raise this query here on this forum, but I had already raised on teh finance forum, but have not received any sugegstion, so now raising on this list. Sorry for the same. The query is about what to do, if no

[R] Statistical distribution not fitting

2015-07-22 Thread Amelia Marsh
Hello! (I dont know if I can raise this query here on this forum, but I had already raised on teh finance forum, but have not received any sugegstion, so now raising on this list. Sorry for the same. The query is about what to do, if no statistical distribution is fitting to data). I am into

[R] ggplot2 - Specifying Colors Manually

2015-07-22 Thread Abiram Srivatsa
Hi, Given a data frame, I'm trying to graph multiple lines on one graph, each line being a different color and each colored line corresponding to a specific name in the legend. Here is a very basic data sample to work with: x - seq(0,40,10) y1 - sample(1:50,5) y2 - sample(1:50,5) mydf -

Re: [R] ggplot2 - Specifying Colors Manually

2015-07-22 Thread Hadley Wickham
Try this: ggplot(mydf,aes(x)) + geom_line(aes(y = y1, colour = y1)) + geom_line(aes(y = y2, colour = y2)) + scale_color_manual(values = c(y1 = green4, y2 = blue2)) Note that you don't need to use `mydf` and names in the manual scale should match the values in the aes() calls.

[R] Ordering in Sankey diagram using R and googleVis

2015-07-22 Thread Angela via R-help
Hello, I am trying to figure out if there is a way to order the left side of a Sankey diagram from most frequent to least frequent. I am using R version 3.2.1 and using googleVis version 0.5.9 for the Sankey. I've tried sorting, but that does not work. Is there anyway to force it to arrange

[R] Same results in arules after changing support and confidence

2015-07-22 Thread jckhmmr
Hello, everyone! I'm new to R, so I'm sorry in advance if it's something obvious, but I still can't figure it out. I've started experimenting with apriori and everything was working fine, i.e. I changed support and confidence and results were different depending on combination. But on the next

Re: [R] model non-integer count outcomes

2015-07-22 Thread Don McKenzie
Sorry. Central limit theorem. Enough averaging and you get a normal distribution (simply stated, perhaps too simply). If so others will correct me before long. :-( Sent from my iPad On Jul 21, 2015, at 8:52 PM, Wensui Liu liuwen...@gmail.com wrote: what does CLT stand for? On Tue, Jul

Re: [R] model non-integer count outcomes

2015-07-22 Thread Don McKenzie
Or if there are enough averages of enough counts, the CLT provides another option. On Jul 21, 2015, at 8:38 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 21, 2015, at 8:21 PM, Wensui Liu wrote: Dear Lister When the count outcomes are integers, we could use either Poisson or

Re: [R] model non-integer count outcomes

2015-07-22 Thread Thierry Onkelinx
If you know the number of counts (n) used to calculate the average then you can still use a poisson distribution. Total = average * n glm(total ~ offset(n), family = poisson) ​ ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie

Re: [R] model non-integer count outcomes

2015-07-22 Thread Wensui Liu
Thanks Thierry What if I don't know the n in the offset term? On Wednesday, July 22, 2015, Thierry Onkelinx thierry.onkel...@inbo.be wrote: If you know the number of counts (n) used to calculate the average then you can still use a poisson distribution. Total = average * n glm(total ~

Re: [R] How to make a persistence landscape in R?

2015-07-22 Thread Jim Lemon
Hi lstat, The problem may be that as you are adding your connector triangles there is a fill color. Try reprogramming with col=NA if you are using polygon to draw the connectors. Jim On Wed, Jul 22, 2015 at 12:49 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 21, 2015, at 10:39 AM,

Re: [R] model non-integer count outcomes

2015-07-22 Thread peter dalgaard
On 22 Jul 2015, at 06:48 , Don McKenzie d...@uw.edu wrote: Sorry. Central limit theorem. Or some sort of vegetarian sandwich. Celery, Lettuce, Tomato sounds almost edible with sufficient mayo. ;-) Enough averaging and you get a normal distribution (simply stated, perhaps too simply). If

Re: [R] barplot -issues with axis and labels not appearing

2015-07-22 Thread Jim Lemon
Hi Pierre, I get a reasonable plot using the following code: par(mar=c(6,4,4,2)) barpos-barplot(unlist(GEP.data2), main=Global Portfolio Weights, col.main=gray, col=blues9, cex.axis=1, ylim=c(-1,1), las=2, cex.lab=1, cex=0.8) axis(1,at=barpos,labels=rep(,8)) For one thing, you don't need the

[R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Jomy Jose
How to calculate the sensitivity,specificity,Youden index for 18 factors and their combination (6 factors in each) with an outcome measure. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

[R-es] ERROR: subscript out of bounds

2015-07-22 Thread nuria bs
Buenas, Cuando intento ejecutar el siguiente codigo, me aparece el error Error in dist.mat[com.names, com.names] : subscript out of bounds. Porque me aparece este error? Y como puedo solucionarlo? Gracias!!! CONSOLE: my.phylo-read.tree(150_BootstrapConsensusTree_Cantabrian_ML.nwk)

Re: [R] R version update

2015-07-22 Thread Ista Zahn
On Jul 21, 2015 9:30 PM, kle...@sxmail.de wrote: Dear Ladies and Gentlemen, as a beginner in R, I encountered a sort of naturally given limitsconcerning the process of amending R with packages. I apparently own version 3.0.2 and I principally decided to use R via the RKWard GUI on Linux

[R] Fwd: Warning message with maxLik()

2015-07-22 Thread marammagdysalem
Sent from my iPhone Begin forwarded message: From: Maram SAlem marammagdysa...@gmail.com Date: July 21, 2015 at 11:40:56 PM GMT+2 To: Arne Henningsen arne.henning...@gmail.com Cc: r-help@r-project.org r-help@r-project.org Subject: Re: [R] Warning message with maxLik() Dear Arne, The

Re: [R] Differences in output of lme() when introducing interactions

2015-07-22 Thread Therneau, Terry M., Ph.D.
Type III is a peculiarity of SAS, which has taken root in the world. There are 3 main questions wrt to it: 1. How to compute it (outside of SAS). There is a trick using contr.treatment coding that works if the design has no missing factor combinations, your post has a link to such a

Re: [R] glm help - final predictor variable NA

2015-07-22 Thread Ben Bolker
matthewjones43 matthew.jones at kellogg.ox.ac.uk writes: Hi, I am not a statistician and so I am sure whatever it is I am doing wrong must be an obvious error for those who are...Basically I can not understand why I get NA for variable 'CDSTotal' when running a glm? Does anyone have an

[R-es] web RSelenium

2015-07-22 Thread javier.ruben.marcuzzi
Estimados, les envío un código, el cuál me da error, aunque dudo si está escrito correctamente puesto que muchos ejemplos me están fallando. Agradezco si alguno me informa un error al igual que el informado por mi computadora, no creo que el inconveniente sea por la opción de R que instalé en

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Boris Steipe
So - as you can see, your data can be modelled. Now the interesting question is: what do you do with that knowledge. I know nearly nothing about your domain, but given that the data looks log-normal, I am curious abut the following: - Most of the events are in the small-loss category. But

Re: [R] interactive Map: Popups

2015-07-22 Thread MacQueen, Don
I would start by looking at the Graphics and Web Technologies entries in Task Views on CRAN. In addition, I suspect there might be some packages listed in the Spatial task view that could do this. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA

Re: [R] How to simulate informative censoring in a Cox PH model?

2015-07-22 Thread Greg Snow
I think that the Cox model still works well when the only information in the censoring is conditional on variables in the model. What you describe could be called non-informative conditional on x. To really see the difference you need informative censoring that depends on something not included

Re: [R] Differences in output of lme() when introducing interactions

2015-07-22 Thread Rolf Turner
On 23/07/15 01:15, Therneau, Terry M., Ph.D. wrote: SNIP 3. Should you ever use it [i.e. Type III SS]? No. There is a very strong inverse correlation between understand what it really is and recommend its use. Stephen Senn has written very intellgently on the issues. Terry --- can you

[R] interactive Map: Popups

2015-07-22 Thread Marie-Louise
Hello, I am trying to build a map of a country which shows informations to its regions in a popup window as soon as someone clicks on a region. Thank you -- View this message in context: http://r.789695.n4.nabble.com/interactive-Map-Popups-tp4710226.html Sent from the R help mailing list

[R] R: Re: Differences in output of lme() when introducing interactions

2015-07-22 Thread angelo.arc...@virgilio.it
Dear Terry, I am very grateful to you for such a detailed and helpful answer. Following your recommendation then I will skip the method presented at http://www.ats.ucla.edu/stat/r/faq/type3.htm So far, based on my understanding of R I arrived to the conclusion that the correct way to see if

Re: [R] Differences in output of lme() when introducing interactions

2015-07-22 Thread Marc Schwartz
Hi, In addition to Terry’s great comments below, as this subject has come up frequently over the years, there is also a great document by Bill Venables that is valuable reading: Exegeses on Linear Models http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf Regards, Marc Schwartz On Jul

Re: [R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Sarah Goslee
On Wed, Jul 22, 2015 at 9:50 AM, Jomy Jose infoj...@gmail.com wrote: How to calculate the sensitivity,specificity,Youden index for 18 factors and their combination (6 factors in each) with an outcome measure. www.rseek.org turns up a bunch of references to Youden index, including packages.

Re: [R] calculate adjacent log odds for a table

2015-07-22 Thread Michael Friendly
On 7/21/2015 11:14 AM, Michael Friendly wrote: More generally, for an I x J x K table, where the last factor is the response, my desired result is a data frame of IJ(K-1) rows, with adjacent log odds in a 'logodds' column, and ideally, I'd like to have a general function to do this. Note that

Re: [R] How to make a persistence landscape in R?

2015-07-22 Thread John Kane
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON Canada -Original Message- From: l.shul...@hotmail.com Sent: Tue, 21 Jul 2015 10:39:45 -0700 (PDT) To: r-help@r-project.org