Re: [R] Experiment Design

2014-06-13 Thread Chatcher
Thanks for the comments. I think i phrased my question incorrectly but the following gave me what I wanted. 18 treatments(plants) , 3 blocks, a total of 54 plots. I could not figure out exac library(agricolae) trt- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18) design.rcbd(trt, 3, serie = 2,

Re: [R] Experiment Design

2014-06-13 Thread Denis Haine
I guessed you mean 2 treatment groups, N=18 and 3 blocks (so n=6 per block): blocks - 3 ngroups - 2 groupsize - 3 group - NULL; block - NULL; set.seed(911) for (i in 1:blocks){ foo - sample(rep(c('A', 'B'), groupsize)) group - c(group, foo) block - c(block, rep(i, groupsize*ngroups))

[R] Simulating spatio-temporal marked ETAS point process

2014-06-13 Thread Ferra Xu
Hello all I am searching for a package or code that is used for generating data for spatio-temporal marked ETAS processes. I saw that spatial ETAS function in PtProcess package doesn't work with simulate function... Thank you in advance, Ferra [[alternative HTML version deleted]]

[R] no x label using axis.Date

2014-06-13 Thread MKN
I have tried multiple different methods to figure out how to get a date axis of my preference (start date of each month). Any assistance would be appreciated. The below section is not producing a date axis: plot(totaldays$totaldays,totaldays$y,type=n,ylim=c(0,Emax),xaxt=n)

[R] Extracting data from density plots

2014-06-13 Thread Parimal Lokhande
I have a dataframe ​df ​ with 3 columns. Details ​of df are ​ as follows summary(df) DateTestVartype Min. :2002-05-10 00:00:00 Min. :-3.8531 Bottom: 313 1st Qu.:2005-05-09 12:00:00 1st Qu.:-0.7773 Other :2501 Median :2008-05-07

[R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Pascal Oettli
Dear list, Please consider the following example: library(plotrix) barp(c(2,3,4,5,6,7,8), ylim=c(-10,10)) How to force the bars to start at 0? I could not find the way to do it. Regards, Pascal __ R-help@r-project.org mailing list

Re: [R] Add points to subplots

2014-06-13 Thread Luca Cerone
Thanks David, I already did this, but in case the code gets updated I will have to re-add the annotation, which I do not think it is ideal. I was just wondering if there is an easy solution to this. Thanks a lot for the help, Cheers, Luca 2014-06-13 3:12 GMT+02:00 David Winsemius

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Jim Lemon
On Fri, 13 Jun 2014 06:50:59 PM Pascal Oettli wrote: Dear list, Please consider the following example: library(plotrix) barp(c(2,3,4,5,6,7,8), ylim=c(-10,10)) How to force the bars to start at 0? I could not find the way to do it. Hi Pascal, You are right, I had not considered the

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Jorge I Velez
Hi Pascal, Perhaps I am missing something, but what about changing passing ylim = c(0, 10) to barp()? Best, Jorge.- On Fri, Jun 13, 2014 at 7:50 PM, Pascal Oettli kri...@ymail.com wrote: Dear list, Please consider the following example: library(plotrix) barp(c(2,3,4,5,6,7,8),

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Pascal Oettli
Hi Jim, Thank you for the suggestion. I will try it. Pascal On Fri, Jun 13, 2014 at 7:09 PM, Jim Lemon j...@bitwrit.com.au wrote: On Fri, 13 Jun 2014 06:50:59 PM Pascal Oettli wrote: Dear list, Please consider the following example: library(plotrix) barp(c(2,3,4,5,6,7,8), ylim=c(-10,10))

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Pascal Oettli
Hi Jorge, It is in order to have different barplots with the same range of limits, to keep them easily comparable. Some have negative values, some others no. Pascal On Fri, Jun 13, 2014 at 7:11 PM, Jorge I Velez jorgeivanve...@gmail.com wrote: Hi Pascal, Perhaps I am missing something, but

[R] Defining default method for S3, S4 and R5 classes

2014-06-13 Thread Luca Cerone
Dear all, I am writing a script implementing a pipeline to analyze some of the data we receive. One of the steps in this pipeline involves clustering the data, and I am interested in studying the effects of different clustering algorithms on the final results. I am having issues making my code

Re: [R] Rscript fails where Rterm works

2014-06-13 Thread Bond, Stephen
Hadley, You are a genius. Stephen B -Original Message- From: Hadley Wickham [mailto:h.wick...@gmail.com] Sent: Thursday, June 12, 2014 5:18 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Rscript fails where Rterm works Explicitly load the methods package:

[R] Release of R 3.1.1 scheduled for July 10

2014-06-13 Thread Peter Dalgaard
Just a quick notice that we intend to have a patch release on July 10. Nickname is still undecided. Due to calendar conflicts, the binaries for some platforms may be delayed by a week or so. -pd -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3,

Re: [R] Extracting data from density plots

2014-06-13 Thread Adams, Jean
I don't know if you can get the information from the plot, but you can certainly get it from the density() function directly. For example, # fake data TestVar - rnorm(60) type - rep(c(Bottom, Other, Top), 20) # density of TestVar for each type, estimated at 100 points along range of TestVar d -

[R] data format setting

2014-06-13 Thread eliza botto
Dear R family, I hope you all be doing great. I have a dataset of following format. The data file is of the following format. st year month day discharge 1 A 2004 1 1 6.752828 2 A 2004 1 2 7.602053 3 A 2004 1 3 5.583619 4 A 2004 1 4 5.019562

Re: [R] data format setting

2014-06-13 Thread Clint Bowman
?sort, ?unique, and subset come to mind. Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600FAX:(360)

Re: [R] no x label using axis.Date

2014-06-13 Thread MacQueen, Don
I'd suggest a different strategy for calculating your axis. You may also be using the axis.Date() function incorrectly. See this example: tmpd - data.frame(dt=seq.Date( as.Date('2014-1-7'), as.Date('2014-08-13'), len=15), y=runif(15) ) xax -

Re: [R] data format setting

2014-06-13 Thread eliza botto
Thanks dennis, It worked but I had to do some simple modifications to get to the ultimate format. Now I have a list in the following format $A 2004200520062007200820092010 .. ... ... .. ... $AY 196719682000... some columns had 365 rows and some

[R] Error message in varimp function: Party package

2014-06-13 Thread Roxanne Snook
Dear R community, I’m trying to use the “party” package to view variables that are important in my data frame (FIM_RS4). My data has a combination of ordinal, nominal, categorical, and continuous data. I’ve written my code below, with my predictor variables being 2:36, and my response

Re: [R] data format setting

2014-06-13 Thread Jeff Newmiller
As always, you are requested to post in plain text and to provide a reproducible example. Messed things up is quite vague. FWIW: In general, processing in sequence is best done BEFORE you cast your data to wide format. ---

Re: [R] no x label using axis.Date

2014-06-13 Thread Duncan Mackay
Dates are a problem in any language because they are irregular As you have not provided a reproducible example here are 2 solutions totaldays - seq.Date(as.Date(2013-11-01), by = 7, length = 10) str(totaldays) Date[1:10], format: 2013-11-01 2013-11-08 2013-11-15 2013-11-22 2013-11-29

Re: [R] Add points to subplots

2014-06-13 Thread Jim Lemon
On Fri, 13 Jun 2014 12:02:34 PM Luca Cerone wrote: Thanks David, I already did this, but in case the code gets updated I will have to re-add the annotation, which I do not think it is ideal. I was just wondering if there is an easy solution to this. Thanks a lot for the help, Hi Luca, I

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Pascal Oettli
Hi Jim, I tried your fix. This one works: barp(c(2,3,4,5,6,7,8), ylim=c(-10,10)) This one fails: barp(c(2,3,4,5,6,7,8)) Regards, Pascal On Fri, Jun 13, 2014 at 7:09 PM, Jim Lemon j...@bitwrit.com.au wrote: On Fri, 13 Jun 2014 06:50:59 PM Pascal Oettli wrote: Dear list, Please consider the

Re: [R] data format setting

2014-06-13 Thread Frede Aakmann Tøgersen
Hi Eliza To me it seems like that you're not thinking before you messing about with the data before an analysis. The years with data for 366 days is leap years. It happens every fourth year and the extra day falls on the 29th of februar. I guess it is the results from the dcast function that

Re: [R] barp {plotrix} Start bars at 0 with a vector of positive values

2014-06-13 Thread Jim Lemon
On Sat, 14 Jun 2014 12:57:12 PM you wrote: Hi Jim, I tried your fix. This one works: barp(c(2,3,4,5,6,7,8), ylim=c(-10,10)) This one fails: barp(c(2,3,4,5,6,7,8)) Regards, Pascal Hi Pascal, Right again. This seems to work for both and I think handles the problem correctly:

Re: [R] I have a question

2014-06-13 Thread Jim Lemon
On Sat, 14 Jun 2014 10:59:07 AM 오건희 wrote: Hi I got a wrong graph when I typed qplot(names(termFrequency),termFrequency, geom=bar, xlab=Terms,stat=bin)+coord_flip() The frequency weren't displayed on the graph. what's the problem? I attached the screen shot to this e-mail. Hi 오건희 ,

Re: [R-es] p values con LMER

2014-06-13 Thread Marcelino de la Cruz
Para obtener el pvalue de un t-test, lo que puedes hacer es (1-pt(abs(tval), df=dftval))*2 donde tval es el valor de tu estadístico t (el que te sale en el summary) y dftval son los grados de libertad del test. La discusión sobre los p-valores en los modelos mixtos tiene que ver con cómo

Re: [R-es] p values con LMER

2014-06-13 Thread Miguel Lázaro
Sí, en efecto, aunque es muy extraño porque lo ahbía mirado. Me faltaba unas comillas. Ahora lo veo ahí bien claro. Como decís hay una enorme discusión sobre esto de los valores y supongo que si no los dan directamente en lmer será porque decidieron no hacerlo. En todo caso el tema de

[R-es] Crear matriz binaria

2014-06-13 Thread Rolando Valdez
Hola, Estoy tratando de crear una matriz cuadrada, binaria y no tengo idea por dónde comenzar. Los datos que tengo son patentes e inventores por patente, las patentes las identifico por su código y a los inventores por nombre y también los tengo codificados. Deseo hacer una matriz de nxn en

Re: [R-es] Crear matriz binaria

2014-06-13 Thread Rolando Valdez
Hola, Esta es una tabla dinámica que cree, en donde los renglones son los inventores y las columnas son patentes, las entradas de la matriz tienen 1 en aquellos inventores que participan por patente. https://www.dropbox.com/s/b8gx0hei6w91ko0/tabla_din.xlsx Esta es otra tabla es un arreglo