Re: [R] Need help in using OPTIM / OPTIMIZATION function

2012-06-20 Thread Özgür Asar
rehena wrote Hi Ozgur, Many thanks for your help. May be I am not very strong enough in the OPTIMIZATION field. Can I check with you whether second derivative of the function at global max will be less than 0 and will be greater than 0 at local max? Thanks in advance. Regards,

Re: [R] QQplot normally distributed

2012-06-20 Thread Liviu Andronic
Dear Özgür On Wed, Jun 20, 2012 at 7:37 AM, Özgür Asar oa...@metu.edu.tr wrote: Why do you prefer robust methods in the example of Noor and why you need exact normality here? The idea is that when you do hypothesis testing to check whether a given distribution is normal, the results are

Re: [R] Cholesky decomposition error

2012-06-20 Thread peter dalgaard
On Jun 20, 2012, at 06:17 , nata...@orchidpharma.com nata...@orchidpharma.com wrote: Dear Peter, Thanks for your reply, as per my last post; my current problem is not on positive definite related but to compare the objective function narrated by Kjetil for optimization of parameters Vs

Re: [R] Installing xlsx package on Mac OS X

2012-06-20 Thread Ivan Calandra
It works for me: sessionInfo() R version 2.15.0 (2012-03-30) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached

[R] lmomco in gev estimation

2012-06-20 Thread Al Ehan
Hi guys, I'm trying to use lmomco package. first I did the manual calculation on what is the estimates scale and location parameter given L-CV=0.2, L1=1000 L-moments and k (shape parameter) =- 0.1. so what i get is: location: 821.0445 scale:260.7590 shape:-0.1000 #I assign this as GEV

Re: [R] Replication of linear model/autoregressive model

2012-06-20 Thread Al Ehan
Thanks! On Sun, Jun 17, 2012 at 1:18 AM, Miguel Manese jjon...@gmail.com wrote: Hi Al, Michael, On Sat, Jun 16, 2012 at 11:01 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Fri, Jun 15, 2012 at 6:56 AM, Al Ehan aehan3...@gmail.com wrote: Hi, I would like to make a

[R] Pseudolikelihood Estimation of spatial GLMM using R

2012-06-20 Thread Herrfay
Dear R users, I've been trying to find an R package which does the PL estimation of spatial GLMMs especially with the negative binomial model. so it would be something similar to the proc GLIMMIX with the PL method in SAS. I've looked up some possible packages related to GLMMs, but it doesn't

[R] STRUCCHANGE DETECTING BREAKPOINTS IN A TIME SERIES

2012-06-20 Thread denissearchundia
HI i'm trying to detect breaks points in various flow time series, they all contains seasonality and trend my question is : i have to remove this seasonality and trend before apply the function breakpoints du package strucchange?? another question, the function breakpoints is similar to de

Re: [R] need help with unlist(), losing NULL values

2012-06-20 Thread dinesh
Hi David, Thanks for clarifying and the hints. Now that I know, I have already rewritten it differently and that works. At its core it was quite simply: foo - fromJSON(json_str='{query:{A:10, B:null, C:hello}, query:{A:20, B:null, C:hello again}}') as.matrix(t(sapply(foo, function(s) s)))

[R] ANOVA help

2012-06-20 Thread James Johnson
Hi All, I have a microarray dataset as follows:   expt1 expt2 expt3  expt4 expt 5  gene1    val  val val  val val gene2    val  val val  val    val . . .. gene15000   val   val val  val val The

[R] greedy.wilks

2012-06-20 Thread martanair
I have used the greedy.wilks to stepwise discriminant analysis, but it doesn't work with my dataset. I don't understand which is the problem Could you help me please? Thanks in advance Marta str(data_indiciN2) 'data.frame': 200 obs. of 36 variables: $ gruppo: Factor w/ 2 levels 0,1: 2 2 2

Re: [R] Apply() on columns

2012-06-20 Thread faelsendoorn
Hi, Yes, the columns are related: V1 is related to V6, V2 is related to V7 and so on. The columns V1,V2,V3,V4,V5 contains the number of employees (in a filling team). The columns V6,V7,V8,V9,V10 contains the number of worked hours of the filling team. What I am interested in is the average

[R] Stepwise Discriminant Analysis - greedy.wilks

2012-06-20 Thread martanair
I don't understand which is the problem Could you help me please? Thanks in advance Marta str(data_indiciN2) 'data.frame': 200 obs. of 36 variables: $ gruppo: Factor w/ 2 levels 0,1: 2 2 2 2 2 2 2 2 2 2 ... $ I001N2: num 19.32 8.22 28.35 7.24 14.7 ... $ I002N2: num 2.92 2.54

Re: [R] Date formats

2012-06-20 Thread arun
Hi, Try this:  str1-c(01OCT1928,02OCT1928,03OCT1928,04OCT1928) strptime(str1,%d%b%Y) [1] 1928-10-01 1928-10-02 1928-10-03 1928-10-04 #or you can use this:  x-as.Date(str1,format=%d%b%Y)  x [1] 1928-10-01 1928-10-02 1928-10-03 1928-10-04 A.K. - Original Message - From: Data

[R] Websocket example out of the box failing if running at startup from Rprofile.site

2012-06-20 Thread Lipkind, Ilya (GE Healthcare)
Hello, I run websockets 1.1.1 from R 2.15 without any problems. I would like to deploy R script running automatically for all users when R is starting from Rprofile.site like follow: .First - function() { source(C:\\R\\orig-websockets.R) } This script is from

[R] Using object as literal value in list vector

2012-06-20 Thread LCOG1
Hello all , This is a pretty simple question I think but cannot find an answer on the list or in my brain. I would like to iterate through a loop and use a vector of strings to name a number of list elements. For instance #Create vector of strings Et- c(ACC,RTL,WHL)

Re: [R] Date formats

2012-06-20 Thread arun
Hi, Since you need the monthly averages, I thought it might be helpful to have the month and the year alone in the plot when compared to the whole date. Try this: str2-c(01OCT1928,01NOV1928,01DEC1928,01JAN1929) x1-as.Date(str2,format=%d%b%Y) library(zoo)as.yearmon(x1) [1] Oct 1928 Nov 1928

Re: [R] error in mlogit

2012-06-20 Thread Kazu Nada
Thank you so much for the suggestion. I have tried mlogit's y ~ x | z notation. but not succeed. My formula may have a lot of interaction. Can we use glmer (or glmmML) function to estimate mixed logit model instead of mlogit? Kazz 2012/6/8 Achim Zeileis achim.zeil...@uibk.ac.at On Fri, 8 Jun

[R] exact relative positioning of lattice plots

2012-06-20 Thread John G. Bullock
Hello, I have two lattice plots for which panel.height is fixed. I am trying to position them in a column so that there is exactly half an inch of vertical space between them. This would be a simple task if I were not fixing panel.height. But given that I am, I can't find a way to put

Re: [R] QQplot normally distributed

2012-06-20 Thread Noor.v.d.Assem
Hi, So in my example, I can say that the data comes from a moderate normal distribution because the points more at the right lay straight to a straight line, then the points at the left. Please a confirmation here. But what is the information above (that the data is from a normal distribution)

Re: [R] QQplot normally distributed

2012-06-20 Thread Noor.v.d.Assem
Hi See the file http://www.mijnbestand.nl/Bestand-6ZPTBYDLBZQI.txt here . That file contains the results of a study on breathing resistance in children with asthma and children with cystic fibrosis to investigate wheter there is a relationship between breathing resistance and length in each of

[R] data normalization

2012-06-20 Thread york8866
I have a dataframe such like the following: ID TIMEDV 1 0 0.880146038 1 1 0.88669051 1 3 0.610784702 1 5 0.75604 2 0 0.456263368 2 1 0.369991537 2 3 0.508798346 2 5 0.441037014 3 0

Re: [R] determine size (width and height) of a graphics file via R - how?

2012-06-20 Thread Mark Heckmann
Thanks Ethan, this is helpful! Just for documentation purposes: Daniel Adler (creator of the rdyncall package) send me another useful approach and code snippet. The rdyncall package allows to connect to libraries not included in R (DLLs). To get the image size one may install the SDL library

Re: [R] lmomco in gev estimation

2012-06-20 Thread Özgür Asar
Hi Al Ehan, Alternatively you can gev.fit functions under the packages ismev and extRemes. Hope these help you. Ozgur -- View this message in context: http://r.789695.n4.nabble.com/lmomco-in-gev-estimation-tp4633931p4633941.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] data normalization

2012-06-20 Thread Dimitris Rizopoulos
assuming that the entries for each subject are ordered with respect to TIME and each subject has a measurement at TIME = 0, then you could use the following: Data - read.table(textConnection(ID TIMEDV 1 0 0.880146038 1 1 0.88669051 1 3 0.610784702 1 5 0.75604 2 0

Re: [R] STRUCCHANGE DETECTING BREAKPOINTS IN A TIME SERIES

2012-06-20 Thread Achim Zeileis
On Tue, 19 Jun 2012, denissearchundia wrote: HI i'm trying to detect breaks points in various flow time series, they all contains seasonality and trend my question is : i have to remove this seasonality and trend before apply the function breakpoints du package strucchange?? I would

[R] eval parse question

2012-06-20 Thread Leuzinger Sebastian
Dear all Is there a more efficient way of achieving the following (assigning to an indexed vector in a loop): test5 - 1:10 eval(parse(text=paste(test,5,[,7,]- ,0.435,sep=))) this works, but it is probably very slow. Thanks Sebastian Leuzinger __

[R] Figure title

2012-06-20 Thread Joaquim J.S. Ramalho
Hi, I created several figures and their titles should appear like this: Figure 1: Monte Carlo results for alternative estimators of structural parameters (N = 100, T = 5) Because N and T change across figures, my code includes the following lines: N.set - 100 T.set - 5 mtext(“Figure

[R] Package for Jump detection

2012-06-20 Thread rahul deora
Dear All, Are there any packages in R to carry out the jump detection test and find the jump sizes and its its time of occurence on high frequency data(5 minute interval) using non-parametric approach suggested by Lee and Mykland in their paper Jumps in Financial Markets: A New Nonparametric Test

Re: [R] eval parse question

2012-06-20 Thread Joshua Wiley
Hi Sebastian, Probably, but I suspect the correct answer is simply do not do it that way. Instead of: test1 - 1:10 test2 - 11:20 ... test5 - 41:50 testt5[7] - .435 do test - list(1:10, 11:20, 21:30, 31:40, 41:50) then it is as easy as test[[5]][7] - .435 Cheers, Josh On Wed, Jun 20, 2012

Re: [R] Figure title

2012-06-20 Thread Kehl Dániel
Try ?bquote HTH kd 2012.06.20. 10:36 keltezéssel, Joaquim J.S. Ramalho írta: Hi, I created several figures and their titles should appear like this: Figure 1: Monte Carlo results for alternative estimators of structural parameters (N = 100, T = 5) Because N and T change across

Re: [R] Cholesky decomposition error

2012-06-20 Thread nataraj
Thanks Peter, I guess this is what I was contemplating but some more doubts lingering in my minds hope I can resolve myself if you could little more explicit about your proposed composite function. You mean I have to call optim function for objective2 within a optim function for objective ?

Re: [R] populating a large matrix

2012-06-20 Thread Oliver Ruebenacker
Hello, For an optimization strategy, we need to know more: do you have many variables? do you have many different formulae? do you re-calculate after changing only one variable? Take care Oliver On Tue, Jun 19, 2012 at 11:10 PM, Nick Matzke mat...@berkeley.edu wrote: Hi all,

Re: [R] maptools: using to sets of information (within two shape files) for one plot

2012-06-20 Thread Marion Wenty
Hello Mike, thank you very much for the information about the projections and the R-Sig-Geo mailinglist! For now I solved the problem by getting another shape file with the same projections so I didn't have to reproject the data sets. However, I might need this in the future - if so your

Re: [R] lmomco in gev estimation

2012-06-20 Thread Peter Ehlers
On 2012-06-19 23:33, Al Ehan wrote: Hi guys, I'm trying to use lmomco package. first I did the manual calculation on what is the estimates scale and location parameter given L-CV=0.2, L1=1000 L-moments and k (shape parameter) =- 0.1. so what i get is: location: 821.0445 scale:260.7590

Re: [R] Pseudolikelihood Estimation of spatial GLMM using R

2012-06-20 Thread Prof Brian Ripley
On 19/06/2012 22:29, Herrfay wrote: Dear R users, I've been trying to find an R package which does the PL estimation of spatial GLMMs especially with the negative binomial model. so it would be something similar to the proc GLIMMIX with the PL method in SAS. I've looked up some possible

Re: [R] Figure title

2012-06-20 Thread Joaquim J.S. Ramalho
Thanks. I did not know bquote. This worked immediately: fig.n - 1 N - 100 T - 5 mtext(bquote(paste(Figure ,.(fig.n),: Monte Carlo results for alternative estimators of structural parameters (,N==.(N), and ,T==.(T),))),side=3,outer=T,line=4,cex=0.8) -Original Message- From:

Re: [R] Novice question about getting data into R

2012-06-20 Thread schmaltz
Dear Professor Daalgard, I beginning to participate in one research of statiscal modelling of translators'activity data, and recently install R and try to generate the one Translation Progress Graph, as my colleagues do (with sucess), but in my Windows platform was found the error below.

[R] {Filename?} Returned mail: see transcript for details

2012-06-20 Thread colin_simmonds
(mail.htm.exe) Note to Help Desk: Look on the CYBERNET (antivirus6.cyber.net.pk) MailScanner in /quarantine/MailScanner/quarantine/20120620 (message 21C995F67.0). -- Postmaster Cyber Internet Services Pvt. Ltd. www.cyber.net.pk __ R-help@r

Re: [R] exact relative positioning of lattice plots

2012-06-20 Thread Deepayan Sarkar
On Wed, Jun 20, 2012 at 9:26 AM, John G. Bullock john.bull...@yale.edu wrote: Hello, I have two lattice plots for which panel.height is fixed.  I am trying to position them in a column so that there is exactly half an inch of vertical space between them. This would be a simple task if I

Re: [R] Error when trying to update cpglm model

2012-06-20 Thread Rubem Kaipper Ceratti
Thanks, Peter, it's working perfectly now.  And yes, the function does return 'something'. I just wanted to make the code minimal. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] ANOVA help

2012-06-20 Thread David Winsemius
On Jun 19, 2012, at 5:36 PM, James Johnson wrote: Hi All, I have a microarray dataset as follows: expt1 expt2 expt3 expt4 expt 5 gene1val val val val val gene2val val val valval . . .. gene15000

Re: [R] Using object as literal value in list vector

2012-06-20 Thread Rui Barradas
Hello, Try NewMeans_ - lapply(MeanValues_, `*`, 0.80) That's it. Note also that you could have used, after your loop, names(NewMeans_) - Et But 'lapply' is much better. Hope this helps, Rui Barradas Em 20-06-2012 01:31, LCOG1 escreveu: Hello all , This is a pretty simple question I

[R] What is tthe meaning of Ncells and Vcells?

2012-06-20 Thread Rui Esteves
Hello, When I do gc() I got this return: gc() used (Mb) gc trigger (Mb) max used(Mb) Ncells 288952 15.5 968217 51.8 381338927 20365.7 Vcells 57781947 440.9 180578758 1377.8 551082632 4204.5 What does actually means Ncells, Vcells, used and gc trigger? Thanks, Rui

Re: [R] weird --no 'dimnames' attribute for array-- error for R lordif package

2012-06-20 Thread David L Carlson
You probably need to contact the lordif package maintainer: Maintainer Seung W. Choi s-c...@northwestern.edu -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From:

[R] Latent Class Analysis

2012-06-20 Thread Jim Silverton
Hi, In running a latent class analysis. Do I first check for significant categorical predictors and only use those in the latent class model? For example, if I have a dependent variable that is binary and I have 30 categorical independent variables, should I run a logistic regression first to find

Re: [R] What is tthe meaning of Ncells and Vcells?

2012-06-20 Thread Duncan Murdoch
On 20/06/2012 9:35 AM, Rui Esteves wrote: Hello, When I do gc() I got this return: gc() used (Mb) gc trigger (Mb) max used(Mb) Ncells 288952 15.5 968217 51.8 381338927 20365.7 Vcells 57781947 440.9 180578758 1377.8 551082632 4204.5 What does actually means

Re: [R] Plotting tidal speed and direction in R

2012-06-20 Thread Greg Snow
You can use the 'my.symbols' and 'ms.arrows' functions in the TeachingDemos package to plot arrows at given locations with specified angles, lengths, and colors. On Sat, Jun 16, 2012 at 5:16 AM, zoeita zoe-allc...@live.co.uk wrote: Hi, I have had a look around the forums and I can't seem to

Re: [R] Plotting tidal speed and direction in R

2012-06-20 Thread David L Carlson
Look at package CircSpatial. You can certainly plot wind direction by x and y coordinates. You probably could use color to show speed, but it's not immediately clear from the documentation or examples. You can browse some examples by going to the R Graphical Manual at

[R] Possible bug in is.na.data.frame(): input without columns

2012-06-20 Thread Mikko Korpela
Hello list! Let's construct a matrix / data.frame with 0 columns, but 0 rows, and non-NULL rownames. Then, call is.na() on both the data.frame and the matrix. We find that is.na.data.frame() gives an error. When row.names are removed, is.na.data.frame() returns NULL. I think that the NULL result

Re: [R] Plotting tidal speed and direction in R

2012-06-20 Thread Thomas Adams
Zoe, If you use a Wind Rose diagram (e.g., http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=circular:wind rose), which are available in several packages, you could plot tidal speed and direction Wind Rose diagrams in a x-y plot to plot location. If you used the lattice package, this could give you

Re: [R] lmomco in gev estimation

2012-06-20 Thread Al Ehan
I'm so very happy to receive your email. I've been stuck so long trying to figure out just why! silly me. Thanks a bunch! On Wed, Jun 20, 2012 at 11:50 AM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2012-06-19 23:33, Al Ehan wrote: Hi guys, I'm trying to use lmomco package. first I did the

[R] passing function parameters into a 'with' statement to dynamically pick out columns

2012-06-20 Thread David Marx
Hi, I've built a function to generate plots and would like to be able pass in column names as a parameter. Here's a boiled down version of what I have right now: pmts - data.frame(date=c(1,2,3), all=c(5,6,7),maj=c(4,5,6),ind=c(3,4,5)) perc.mktshare - function(df){ range1 -

[R] Problem with predict?

2012-06-20 Thread Julie Truman
Hello, I am trying to fit a model to some death over time data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and calculate some LD values to use in designing an

[R] Edges and Rasters

2012-06-20 Thread riodementa
Hi everyone! I would like to draw a line surrounding my raster, with i want it in black, and i don't know if its possible to change the colour. A simple example is: r - raster(nrow=30, ncol=30, xmn=0) r[]-NA r[393:409]-99 r[423:439]-99 r[453:455]-99 r[456:460]-30 r[461:469]-99 r[483:499]-99

[R] can not read a table

2012-06-20 Thread york8866
I have a table like the following: TABLE NO. 1 ID TIME 13250 13250 . . . . . . TABLE NO. 1 ID TIME 13250 13250 . . . . . . TABLE NO. 1 ID TIME 13250 13250 . . . . . . TABLE NO. 1 ID

Re: [R] exact relative positioning of lattice plots

2012-06-20 Thread John G. Bullock
In your actual use case, are there any annotations outside the panel (tick marks, labels, etc.)? Things would be much simpler if not (as in your example). In that case, just call the suitable panel function after setting up the proper axis limits (after doing pushViewport or seekViewport or

[R] Conditioned Latin Hypercube Sampling within determined distance

2012-06-20 Thread SergioHGS
Hi all, I am a begginer in R and I have been trying to use the Conditioned Latin Hypercube to choose sample points only in areas close to roads due to the difficult thorough access in the study area. I could use a code to create the points throughout the area, but I need to create a code to make

[R] compute similarity distance

2012-06-20 Thread houcemeddine othman
Hi, I just started to use R for my Phd. I have to write a Formula by witch, given two matrices of vectors (electrostatic potential map) I shall calculate the similarity between them. Could you please tell me if I'am doing it right. The complecte formula is attached to an image file the script

Re: [R] data normalization

2012-06-20 Thread york8866
Thanks for the help, it works very well. -- View this message in context: http://r.789695.n4.nabble.com/data-normalization-tp4633939p4633964.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Conditioned Latin Hypercube Sampling within determined distance

2012-06-20 Thread John Kane
So what have you tried so far? The posting guidelines asks for code and, where possible, data. Have a look at ?dput for a possible way to dupply data. John Kane Kingston ON Canada -Original Message- From: shenr...@hotmail.com Sent: Wed, 20 Jun 2012 07:32:21 -0700 (PDT) To:

Re: [R] Edges and Rasters

2012-06-20 Thread Sarah Goslee
Here's one way to do it, preserving your original approach as much as possible. (Note: I'm not sure how well transparent is supported on other devices or OSs [I'm using Cairo on Linux], but since you don't say what you're using it's impossible to provide a definite solution.)

Re: [R] passing function parameters into a 'with' statement to dynamically pick out columns

2012-06-20 Thread Jeff Newmiller
With is designed for interactive use, so you are right that it is not the answer. You can use list indexing with column names within functions, though, like df[[scaling.column]] or df[[all]]. --- Jeff Newmiller

Re: [R] passing function parameters into a 'with' statement to dynamically pick out columns

2012-06-20 Thread peter dalgaard
On Jun 20, 2012, at 16:45 , David Marx wrote: Hi, I've built a function to generate plots and would like to be able pass in column names as a parameter. Here's a boiled down version of what I have right now: pmts - data.frame(date=c(1,2,3), all=c(5,6,7),maj=c(4,5,6),ind=c(3,4,5))

Re: [R] can not read a table

2012-06-20 Thread jim holtman
try this by reformatting the data and then reading back in: x - readLines(textConnection(TABLE NO. 1 + ID TIME + 13250 + 13250 + TABLE NO. 1 + ID TIME + 13250 + 13250 + TABLE NO. 1 + ID TIME + 13250 + 13250 + TABLE NO. 1 + ID TIME + 13250 +

[R] nearest neighbours and their ID

2012-06-20 Thread Lucie V
Dear R users, I used nndist() to gain the distance of 2 nearest neighbours of the points in my dataset. Is there a way of getting the ID numbers of these nearest neighbours (along with their distances). The command I used: nn2 - nndist(X2, k=1:2). This is the output of the nearest

[R] reshape

2012-06-20 Thread nrm2010
Hello, helpeRs, I am attempting to reshape (either base R or package reshape) multiple .csv spreadsheets from a very unfortunate wide format to long format.  Each spreadsheet looks something like this, after being read in to R: toy - data.frame(year = rep(2007:2008,each = 20), month =

[R] Softmax Action Selection

2012-06-20 Thread Edward Patzelt
R Community - I'm attempting to apply a softmax action selection to a probability generated by a hidden Markov model. I'm having difficulties in how to apply the softmax temperature parameter (beta). Here is my code thus far. I'm thinking the sigmoid function will work but I need this function

Re: [R] passing function parameters into a 'with' statement to dynamically pick out columns

2012-06-20 Thread William Dunlap
What I'd like to do is something like this: perc.mktshare - function(df, scaling.column){ range1 - floor(min(with(df, 100*scaling.column/all))) range2 - ceiling(max(with(df, 100*scaling.column/all))) with(df,plot(date,100*scaling.column/all,ylim=c(range1,range2),ylab=%

Re: [R] reshape

2012-06-20 Thread jim holtman
will this do it for you: require(reshape2) toy - data.frame(year = rep(2007:2008,each = 20), month = rep(1:5,each = 4, length = 40), + day = rep(1:2,each = 2,length = 40), hhmm = rep(1100:1101,length = 40), plot = rep(1,40), + trt=rep(4,40), VWC.B1 = rnorm(40), VWC.B2 = rnorm(40), VWC.T1 =

Re: [R] reshape

2012-06-20 Thread nrm2010
Thank you, but it doesn't quite. It still needs a new column for each measurement type, i.e., a VWC column that contains the VWC measurements for each subject within group at each time point and a Tair column that contains the Tair measurements for each subject within group at each time

Re: [R] reshape

2012-06-20 Thread jim holtman
Is this closer using the same data: dcast(x, year+month+day+hhmm+group+number ~ type, mean) year month day hhmm group number Tair VWC 1 2007 1 1 1100 B 1 0.285404913 1.4337114478 2 2007 1 1 1100 B 2 -0.899893189 1.1004122756 3 2007

[R] formula method with special characters

2012-06-20 Thread Guelman, Leo
Dear List, I'm trying to create a formula method, allowing for a special character in the formula (i.e., similar to for example the gam package with the character s in y ~ s(x)). I've checked and it seems this is done through attr(,specials). However, the section of code below (as an example

Re: [R] Stepwise Discriminant Analysis - greedy.wilks

2012-06-20 Thread Uwe Ligges
Please so not double post. After personal communication it turned out that cor(data_indiciN2$I022N2, data_indiciN2$I025N2) was exactly 1. Hence you cannot use both of them in your model and have to skip one of them. Therefore, gw_obj - greedy.wilks(gruppo ~ . - I025N2, data =

Re: [R] Websocket example out of the box failing if running at startup from Rprofile.site

2012-06-20 Thread Uwe Ligges
On 20.06.2012 02:05, Lipkind, Ilya (GE Healthcare) wrote: Hello, I run websockets 1.1.1 from R 2.15 without any problems. I would like to deploy R script running automatically for all users when R is starting from Rprofile.site like follow: .First- function() {

[R] array complexity for the MH test

2012-06-20 Thread francogrex
If we take the matel-haenszel test on these data of five 2x2 tables stratified along Penicillin.Levels array(c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), dim = c(2, 2, 5), dimnames = list( Delay = c(None, 1.5h),

Re: [R] Apply() on columns

2012-06-20 Thread John Kane
Okay, I think you need to read up a bit on how to use R. Have a look at ?apply. It has nothing to do with graphing data. It is a way to summarize data. What I think you want to do is to select the first 4 columns and then use apply() wih sum to get the total number of worlers and then use

Re: [R] Problem with predict?

2012-06-20 Thread Petr PIKAL
Hi Hello, I am trying to fit a model to some death over time data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and calculate some LD values to use in

Re: [R] Apply() on columns

2012-06-20 Thread Petr PIKAL
Hi Hi, Yes, the columns are related: V1 is related to V6, V2 is related to V7 and so on. The columns V1,V2,V3,V4,V5 contains the number of employees (in a filling team). The columns V6,V7,V8,V9,V10 contains the number of worked hours of the filling team. You shall rather include your

Re: [R] can not read a table

2012-06-20 Thread Petr PIKAL
Hi I have a table like the following: TABLE NO. 1 ID TIME 1325 0 1325 0 . . . . . . TABLE NO. 1 ID TIME 1325 0 1325 0 . . . . . . TABLE NO. 1 ID TIME 1325 0 1325 0 . . . . . . TABLE NO. 1 ID TIME 1325 0 1325 0 . .

[R] Odds Ratios in rms package

2012-06-20 Thread Sebastian Pölsterl
Hi, I'm using the rms package to do regression analysis using the lrm function. Retrieving odds ratios is possible using summary.rms. However, I could not find any information on how exactly the odds ratios for continuous variables are calculated. It doesn't appear to be the odds ratio at 1 unit

Re: [R] reshape

2012-06-20 Thread arun
Hello, If I understand it correctly, this could be formatted as two separate data's for VWC and Tair as the row numbers differ after reshaping. #VWC toymelt1-melt(toy[,7:11]) colnames(toymelt1)-c(VWC,VWC_Response) dat2-data.frame(Group=c(rep(B,80),rep(T,120)),

[R] Tinn-R and R 2.15.0 integration

2012-06-20 Thread Jung,Woon
Hello, This is WJ. I downloaded R(2.15.0) and Tinn-R(2.3.7.1) from http://sourceforge.net/projects/tinn-r/ for my computer (window 7 OS). I want to know how to integrate Tinn-R with R(2.15.0). So far, I was able to find some web-site has step for integration, so I updated the following

Re: [R] can not read a table

2012-06-20 Thread york8866
it seems it will work, however, the last line of code did not work, so I can not check the results. thanks, jholtman wrote try this by reformatting the data and then reading back in: x - readLines(textConnection(TABLE NO. 1 + ID TIME + 13250 + 13250 + TABLE NO. 1 +

Re: [R] array complexity for the MH test

2012-06-20 Thread Richard M. Heiberger
You have a very nice graph of a dose-response function here. library(vcd) library(RColorBrewer) Pen - array(c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), dim = c(2, 2, 5), dimnames = list( Delay = c(None, 1.5h),

Re: [R] can not read a table

2012-06-20 Thread Sarah Goslee
On Wed, Jun 20, 2012 at 12:51 PM, york8866 yu_y...@hotmail.com wrote: it seems it will work, however, the last line of code did not work, so I can not check the results. thanks, What does did not work mean? Your computer exploded? R evaporated? Your file vanished? It gave an error message

Re: [R] Problem with predict?

2012-06-20 Thread Peter Ehlers
On 2012-06-20 08:56, Petr PIKAL wrote: Hi Hello, I am trying to fit a model to some death over time data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and

Re: [R] Odds Ratios in rms package

2012-06-20 Thread David Winsemius
On Jun 20, 2012, at 12:12 PM, Sebastian Pölsterl wrote: Hi, I'm using the rms package to do regression analysis using the lrm function. Retrieving odds ratios is possible using summary.rms. However, I could not find any information on how exactly the odds ratios for continuous variables

Re: [R] can not read a table

2012-06-20 Thread york8866
Thanks, sorry for my post being a little confusing. Jim's code works, I just need to change the last line to y - read.table(file = fileName,header=TRUE) then, I got the dataframe that I needed. thank you all forl your help! -- View this message in context:

Re: [R] Conditioned Latin Hypercube Sampling within determined distance

2012-06-20 Thread SergioHGS
Hi John Kane, I have created a shapefile for the road, I have the rasters that I want to use for creating the cLHS and I have created the points in the area, but I don't know how to condition them to be created within a certain distance from the road. I didn't understand why you meant dupply

Re: [R] Pseudolikelihood Estimation of spatial GLMM using R

2012-06-20 Thread Herrfay
Thanks Prof Ripley, Sorry I didn't make it more clearly, but PL = Psuedo likelihood mentioned in my title. Would you have any recommendation for that? Thanks for your response! Fei He On Wed, Jun 20, 2012 at 4:10 AM, Prof Brian Ripley [via R] ml-node+s789695n4633956...@n4.nabble.com wrote:

[R] need help reshaping table using aggregate

2012-06-20 Thread Tim
I am trying to learn how to reshape my data set. I am new to R, so please bear with me. Basically, I have the following data set: site-c(A,A,B,B) bug-c(spider,grasshopper,ladybug,stinkbug) count-c(2,4,6,8) myf - data.frame(site, bug, count) myf site bug count 1A spider 2

Re: [R] Conditioned Latin Hypercube Sampling within determined distance

2012-06-20 Thread David Winsemius
On Jun 20, 2012, at 1:53 PM, SergioHGS wrote: Hi John Kane, I have created a shapefile for the road, I have the rasters that I want to use for creating the cLHS and I have created the points in the area, but I don't know how to condition them to be created within a certain distance

Re: [R] need help reshaping table using aggregate

2012-06-20 Thread Rui Barradas
Hello, Try library(reshape2) mlt - melt(myf, id=c(site, bug), measure=count) myf2 - dcast(mm, site ~ bug) myf2[is.na(myf2)] - 0 myf2 Hope this helps, Rui Barradas Em 20-06-2012 19:58, Tim escreveu: I am trying to learn how to reshape my data set. I am new to R, so please bear with me.

Re: [R] reshape

2012-06-20 Thread nrm2010
Still working on it...to get your original suggestion to run, I escaped (doubled) the backslashes, so instead of x$type - sub(\..*$, , x$variable) which generated the error message Error: '\.' is an unrecognized escape in character string starting \. I tried x$type - sub(\\..*$, , x$variable)

Re: [R] populating a large matrix

2012-06-20 Thread Nick Matzke
Hi! Thanks for the replies, comments below: On 6/20/12 3:26 AM, Oliver Ruebenacker wrote: Hello, For an optimization strategy, we need to know more: do you have many variables? do you have many different formulae? do you re-calculate after changing only one variable? Take care

Re: [R] need help reshaping table using aggregate

2012-06-20 Thread Rui Barradas
Hello, again. Actually, you don't need to melt the data.frame, you can directly dcast 'myf' using value.var=count. Rui Barradas Em 20-06-2012 20:56, Rui Barradas escreveu: Hello, Try library(reshape2) mlt - melt(myf, id=c(site, bug), measure=count) myf2 - dcast(mm, site ~ bug)

Re: [R] reshape

2012-06-20 Thread nrm2010
Hello, Arun, Thank you for your effort. In this case, I get the groups but lose the time stamps. If I am interpreting your suggestion correctly, I would also have to count all the occurrences of each group and subject in each spreadsheet to make this work on the real data, rather than the

Re: [R] Conditioned Latin Hypercube Sampling within determined distance

2012-06-20 Thread John Kane
Sorry that should be 'supply' data John Kane Kingston ON Canada -Original Message- From: shenr...@hotmail.com Sent: Wed, 20 Jun 2012 10:53:52 -0700 (PDT) To: r-help@r-project.org Subject: Re: [R] Conditioned Latin Hypercube Sampling within determined distance Hi John Kane, I

[R] binary operators that never return missing values

2012-06-20 Thread Anthony Damico
Hi, I work with data sets with lots of missing values. We often need to conduct logical tests on numeric vectors containing missing values. I've searched around for material and conversations on this topic, but I'm having a hard time finding anything. Has anyone written a package that deals

  1   2   >