Re: [R] How to get the SS and MS from oneway.test?

2012-04-09 Thread Tal Galili
>From what I can see the function does not give back this information (either in the print output or the output object structure itself). The thing is that I have never studied the statistic used for this test, so I am not sure how it works and if giving the SS MS is meaningful or not. But if you

Re: [R] How to get the SS and MS from oneway.test?

2012-04-09 Thread Rolf Turner
It is not clear to me how meaningful sums of squares and mean squares are in the context of oneway.test.(). Be that as it may, the short answer is you ***can't*** get at them from the output of oneway.test(). The oneway.test() function simply does not return enough information. If you ***reall

Re: [R] how to add 3d-points to bplot {rms} figure?

2012-04-09 Thread Bert Gunter
Below. -- Bert On Mon, Apr 9, 2012 at 7:39 PM, David Winsemius wrote: > > On Apr 9, 2012, at 6:24 PM, phi771 wrote: > >> Hello! >> I have created a bplot-figure using this code: >> >> *file <- "2dcali_red.ttt" >> ux<-as.matrix(read.table(file, dec = ",")) >> >> mode(ux)<-'numeric' >> >> vel<-ux[

Re: [R] how to add 3d-points to bplot {rms} figure?

2012-04-09 Thread David Winsemius
On Apr 9, 2012, at 10:39 PM, David Winsemius wrote: On Apr 9, 2012, at 6:24 PM, phi771 wrote: Hello! I have created a bplot-figure using this code: *file <- "2dcali_red.ttt" ux<-as.matrix(read.table(file, dec = ",")) mode(ux)<-'numeric' vel<-ux[,1] ang<-ux[,2] x<-ux[,3] y<-ux[,4] dat<- d

[R] How to get the SS and MS from oneway.test?

2012-04-09 Thread lulumecindy
Hello everyone: I'm a new member of this group. I have a question about "oneway.test". When I use "anova(lm())" to analysis the ANOVA, I can get the information about Sum Sq and Mean

Re: [R] how to add 3d-points to bplot {rms} figure?

2012-04-09 Thread David Winsemius
On Apr 9, 2012, at 6:24 PM, phi771 wrote: Hello! I have created a bplot-figure using this code: *file <- "2dcali_red.ttt" ux<-as.matrix(read.table(file, dec = ",")) mode(ux)<-'numeric' vel<-ux[,1] ang<-ux[,2] x<-ux[,3] y<-ux[,4] dat<- data.frame(ang=ang, x=x,y=y) require(rms) ddist2 <- da

Re: [R] How do Sweave users collaborate with Word users?

2012-04-09 Thread Frank Harrell
See http://biostat.mc.vanderbilt.edu/SweaveConvert for several other approaches. The most solid way I've found is to convert PDF to Word. Frank Alexander Shenkin wrote > > Thanks for the heads up, Paul. That's good to know. I happen to be in > academics, as are my collaborators, but I could i

Re: [R] Panel.abline would not show beyond a certain slope value

2012-04-09 Thread Aziz, Muhammad Fayez
Yup. Latest version 2.15.0 for windows solved the problem alright! Thank you Uwe. Regards, Fayez From: Uwe Ligges [lig...@statistik.tu-dortmund.de] Sent: Monday, April 09, 2012 9:56 AM To: Aziz, Muhammad Fayez Cc: r-help@r-project.org Subject: Re: [R] Pan

Re: [R] binned tabulation

2012-04-09 Thread Rui Barradas
Hello, Jean V Adams wrote > > Delia, > > name <- data.frame(Behavior=c(1, 2, 1, 2, 1), Time=c(0, 40, 45, 55, 57)) > > appear <- name$Time[name$Behavior==1] > disappear <- name$Time[name$Behavior==2] > if(length(appear) > length(disappear)) disappear <- c(disappear, 60) > sum(disappear - appear

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Kjetil Halvorsen
see below! On Mon, Apr 9, 2012 at 7:38 PM, Gabor Grothendieck wrote: > We have had Linux users that successfully used Ryacas but if you can't > get yacas to build on your particular system then you could try > running the Windows version under wine.  A Windows binary of yacas is > available so yo

Re: [R] how to convert seconds to 12 hour time format

2012-04-09 Thread cassie jones
Thanks Henrique.It worked!!! I appreciate your help. Cassie On Mon, Apr 9, 2012 at 8:06 PM, Henrique Dallazuanna wrote: > Try this: > > Sys.setlocale(category = "LC_TIME", locale = "US") > format(as.POSIXct('0001-01-01 00:00:00') + x, "%I:%M:%S %p") > > > On Mon, Apr 9, 2012 at 9:38 PM, cass

Re: [R] how to convert seconds to 12 hour time format

2012-04-09 Thread Henrique Dallazuanna
Try this: Sys.setlocale(category = "LC_TIME", locale = "US") format(as.POSIXct('0001-01-01 00:00:00') + x, "%I:%M:%S %p") On Mon, Apr 9, 2012 at 9:38 PM, cassie jones wrote: > > Hello everyone, > > I am wondering if there is any routine in R which can convert time given in > 'seconds' unit to t

Re: [R] quantmod getOptionChain Not Work

2012-04-09 Thread R. Michael Weylandt
On a Unix-alike system, if you have an svn client installed, it suffices to type svn checkout svn://svn.r-forge.r-project.org/svnroot/quantmod/ at a command prompt -- then use R CMD install on the pkg/ directory to install the new version. No idea how to do it on Windows Michael On Sun, Apr

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Gabor Grothendieck
We have had Linux users that successfully used Ryacas but if you can't get yacas to build on your particular system then you could try running the Windows version under wine. A Windows binary of yacas is available so you won't have to build yacas. I don't know if anyone has tried that yet but its

[R] how to convert seconds to 12 hour time format

2012-04-09 Thread cassie jones
Hello everyone, I am wondering if there is any routine in R which can convert time given in 'seconds' unit to the 12 hour time format. For example, suppose the data set looks like x=c(36885,84000,20) #x in seconds I want to get the output as [1] " 11:14:45 AM" [2] " 11:20:00 PM" [3] "12:20:00

Re: [R] Gradients in bar charts XXXX

2012-04-09 Thread ilai
On Mon, Apr 9, 2012 at 12:40 PM, Jason Rodriguez wrote: > Hello, I have a graphics-related question: > > I was wondering if anyone knows of a way to create a bar chart that is > colored with a three-part gradient that changes at fixed y-values. Each bar > needs to fade green-to-yellow at Y=.10 a

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Kjetil Halvorsen
see below! On Mon, Apr 9, 2012 at 3:04 PM, Gabor Grothendieck wrote: > On Mon, Apr 9, 2012 at 4:02 PM, Gabor Grothendieck > wrote: >> On Mon, Apr 9, 2012 at 2:47 PM, Martin Maechler >> wrote: >>> Apropos: >>> >>> I don't have the problems, the OP had, but on my ubuntu >>> notebook, Ryacas does

[R] how to add 3d-points to bplot {rms} figure?

2012-04-09 Thread phi771
Hello! I have created a bplot-figure using this code: *file <- "2dcali_red.ttt" ux<-as.matrix(read.table(file, dec = ",")) mode(ux)<-'numeric' vel<-ux[,1] ang<-ux[,2] x<-ux[,3] y<-ux[,4] dat<- data.frame(ang=ang, x=x,y=y) require(rms) ddist2 <- datadist(dat) options(datadist="ddist2") fitn

[R] Most efficient way to do this...

2012-04-09 Thread Hasan Diwan
I have time-series data looking like this: > dataIn[sample(c(1:nrow(dataIn)), 25),] accelerometer_y id data_block_epoch_time 782 0.8424 201300 133179733 1868 0.3432 202386 1331797384000 1828 0.3510 202346 1331797382000 1026 0

Re: [R] Overall model significance for poisson GLM

2012-04-09 Thread Ben Bolker
Pat Wilkins illinois.edu> writes: > > Greetings, > > I am running glm models for species counts using a poisson link function. > Normal summary functions for this provide summary statistics in the form of > the deviance, AIC, and p-values for individual predictors. I would like to > obtain the

Re: [R] For loops

2012-04-09 Thread David Winsemius
On Apr 9, 2012, at 5:33 PM, Christopher Desjardins wrote: Hi, I am having trouble with syntax for a for loop. Here is what I am trying to do. class=c(rep(1,3),rep(2,3),rep(3,3)) out1=rnorm(length(class)) out2=rnorm(length(class)) out3=rnorm(length(class)) data=data.frame(class,out1,out2,out

Re: [R] For loops

2012-04-09 Thread Jeff Newmiller
class1 <- data[1==data$class,] gets you a subset of the data into a dedicated object, but if you want to handle arbitrarily large amounts of data or class values then the list output of split is really much better to stay with. Also, "data" is a predefined function, so it is not a good idea to

[R] For loops

2012-04-09 Thread Christopher Desjardins
Hi, I am having trouble with syntax for a for loop. Here is what I am trying to do. class=c(rep(1,3),rep(2,3),rep(3,3)) out1=rnorm(length(class)) out2=rnorm(length(class)) out3=rnorm(length(class)) data=data.frame(class,out1,out2,out3) dat.split=split(data,data$class) for(i in 1:3){ sub[i]=da

Re: [R] Pairwise comparison matrix elements

2012-04-09 Thread David Winsemius
On Apr 9, 2012, at 3:17 PM, Kerapi wrote: Hi!, I'm really hoping someone out there will be able to help me. I recently started my MSc dissertation on Population Projection Matrices, which has been going well until now. I am trying to set-up a general script that does a pairwise comparison

Re: [R] binned tabulation

2012-04-09 Thread Jean V Adams
Delia, name <- data.frame(Behavior=c(1, 2, 1, 2, 1), Time=c(0, 40, 45, 55, 57)) appear <- name$Time[name$Behavior==1] disappear <- name$Time[name$Behavior==2] if(length(appear) > length(disappear)) disappear <- c(disappear, 60) sum(disappear - appear) Delia Shelton wrote on 04/09/2012 12:30:23 P

[R] Pairwise comparison matrix elements

2012-04-09 Thread Kerapi
Hi!, I'm really hoping someone out there will be able to help me. I recently started my MSc dissertation on Population Projection Matrices, which has been going well until now. I am trying to set-up a general script that does a pairwise comparison of all elements in my matrices. So for exampl

Re: [R] sdev, variance in prcomp

2012-04-09 Thread Kevin Wright
It is reporting _proportion_ of the total variance. Not the variance. The total variance is the sum of all the squared standard deviations. Only the first 3 standard deviations are shown. Kevin On Mon, Apr 9, 2012 at 3:31 PM, carol white wrote: > Hello, > It might be a trivial question but

[R] linp code for fuzzy regression

2012-04-09 Thread bekir . cetintav
Hi! I study fuzzy regression. Linear Programming(LP) methods are commonly used for fuzzy linear regression (FLR) because they are simple and easy to apply. I should make a simulation study with R and have come a distance. I use "linp" (for instence a part from my codes) "(L<-linp(E=NULL,F=NULL,Cos

[R] sdev, variance in prcomp

2012-04-09 Thread carol white
Hello, It might be a trivial question but I just wanted to find out the relationship between sdev and proportion of variance generated by prcomp. I got the following result from my data set PC1  PC2  PC3 Standard deviation 104.89454 15.40910 9.012047 Prop

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Gabor Grothendieck
On Mon, Apr 9, 2012 at 4:02 PM, Gabor Grothendieck wrote: > On Mon, Apr 9, 2012 at 2:47 PM, Martin Maechler > wrote: >> Apropos: >> >> I don't have the problems, the OP had, but on my ubuntu >> notebook, Ryacas does not return expressions (just the strings), >> and hence >> >>    as.expression(

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Gabor Grothendieck
On Mon, Apr 9, 2012 at 2:47 PM, Martin Maechler wrote: > Apropos: > > I don't have the problems, the OP had, but on my ubuntu > notebook, Ryacas does not return expressions (just the strings), > and hence > >    as.expression( ) > > always gives NULL  and e.g. the   demo(Ryacas-Function) > also f

Re: [R] Listing the contents of an FTP directory via R?

2012-04-09 Thread Jonathan Greenberg
It seems to be choking on NLST: require("RCurl") getURL("ftp://e4ftl01.cr.usgs.gov/MOTA/MCD15A3.005/",verbose=TRUE,ftp.use.epsv=TRUE, dirlistonly = TRUE) ... < 230 Guest login ok, access restrictions apply. > PWD < 257 "/" is current directory. * Entry path is '/' > CWD MOTA < 250 CWD command su

Re: [R] Listing the contents of an FTP directory via R?

2012-04-09 Thread steven mosher
Its kinda gross, but you can just download.file() and then parse the result FTP directory /MOTA/MCD15A3.005 at e4ftl01.cr.usgs.gov FTP directory /MOTA/MCD15A3.005 at e4ftl01.cr.usgs.gov ## ##

Re: [R] Problems with CRAN package Ryacas

2012-04-09 Thread Martin Maechler
Apropos: I don't have the problems, the OP had, but on my ubuntu notebook, Ryacas does not return expressions (just the strings), and hence as.expression( ) always gives NULL and e.g. the demo(Ryacas-Function) also fails: > yacas(expression(deriv(BurrCDF(x,c,k k*c*x^(c-1)*(x^c+1)^

Re: [R] Listing the contents of an FTP directory via R?

2012-04-09 Thread steven mosher
Ya I hit the same error with my code that reads directories. I'll try some other stuff . I think I hit this error before I with usgs. On Mon, Apr 9, 2012 at 11:40 AM, Jonathan Greenberg wrote: > Steven: > > Thanks -- I seem to be running into the problem with the link I sent along: > > > getURL

Re: [R] Listing the contents of an FTP directory via R?

2012-04-09 Thread Jonathan Greenberg
Steven: Thanks -- I seem to be running into the problem with the link I sent along: > getURL("ftp://e4ftl01.cr.usgs.gov/MOTA/MCD15A3.005/",verbose=TRUE,dirlistonly > = TRUE) Error in function (type, msg, asError = TRUE) : RETR response: 550 I'm wondering if it might be a passive ftp issue, but

Re: [R] Appropriate method for sharing data across functions

2012-04-09 Thread John C Nash
Thanks to Hadley, William and Duncan for suggestions. I'm currently implementing a solution that is close to that of William and Duncan (and learning more about environments in the process). I suspect the reference classes are possibly a more reliable long term solution. I'll plead laziness unt

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Prof Brian Ripley
On 09/04/2012 18:52, Bert Gunter wrote: On Mon, Apr 9, 2012 at 9:27 AM, Bazman76 wrote: Yes I agree, there may be something pathalogical in the way at least one of the models handles the data. That's why I was trying to get a better handle on how the two functions spec.prgm() and spec.ar() wor

Re: [R] Listing the contents of an FTP directory via R?

2012-04-09 Thread steven mosher
A couple of ways. using Rcurl you can use the curlOption of dirlistonly. otherwise you can read the page and parse. I've got some code around here to do that. Steve On Mon, Apr 9, 2012 at 11:27 AM, Jonathan Greenberg wrote: > R-helpers: > > I'd like to be able to store all the file informa

[R] Listing the contents of an FTP directory via R?

2012-04-09 Thread Jonathan Greenberg
R-helpers: I'd like to be able to store all the file information from an ftp site (e.g. file and foldernames) through an R command. Any ideas how to do this? Here's an example site to use: ftp://e4ftl01.cr.usgs.gov/MOTA/MCD15A3.005 --j -- Jonathan A. Greenberg, PhD Assistant Professor Depart

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Bert Gunter
On Mon, Apr 9, 2012 at 9:27 AM, Bazman76 wrote: > Yes I agree, there may be something pathalogical in the way at least one of > the models handles the data.  That's why I was trying to get a better handle > on how the two functions spec.prgm() and spec.ar() work. > > The data has been processed by

Re: [R] Overall model significance for poisson GLM

2012-04-09 Thread Bert Gunter
Not really an R question. Post on a statistics site like http://stats.stackexchange.com/ -- Bert On Mon, Apr 9, 2012 at 9:51 AM, Pat Wilkins wrote: > Greetings, > > I am running glm models for species counts using a poisson link function. > Normal summary functions for this provide summary stati

[R] binned tabulation

2012-04-09 Thread Delia Shelton
Hi, I am attempting to tabulate binned data. The '1' represents the appearance of the focal mouse pup, and '2' represents the disappearance of the focal mouse pup. The code written below is intended to calculate the total time spent appeared out of 3600s. For Sample 1, both the hand calculat

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Bazman76
Yes I agree, there may be something pathalogical in the way at least one of the models handles the data. That's why I was trying to get a better handle on how the two functions spec.prgm() and spec.ar() work. The data has been processed by a wavelet analysis, so what you are seeing as the "raw" d

[R] Overall model significance for poisson GLM

2012-04-09 Thread Pat Wilkins
Greetings, I am running glm models for species counts using a poisson link function. Normal summary functions for this provide summary statistics in the form of the deviance, AIC, and p-values for individual predictors. I would like to obtain the p-value for the overall model. So far, I have bee

Re: [R] Appropriate method for sharing data across functions

2012-04-09 Thread Duncan Murdoch
On 05/04/2012 4:20 PM, John C Nash wrote: In trying to streamline various optimization functions, I would like to have a scratch pad of working data that is shared across a number of functions. These can be called from different levels within some wrapper functions for maximum likelihood and ot

Re: [R] Appropriate method for sharing data across functions

2012-04-09 Thread Hadley Wickham
> Make OPCON an environment and pass it into the functions that may read it or > alter it.  There > is no real need to pass it out, since environments are changed in-place > (unlike lists).  E.g., >  > x <- list2env(list(one=1, two="ii", three=3)) >  > x >   >  > objects(x) >  [1] "one"   "three"

Re: [R] Help with Book example of Matrix application

2012-04-09 Thread David Winsemius
On Apr 9, 2012, at 12:32 PM, James Lenihan wrote: I found this example in an Introductory R book in the chapter on Matrices and Arrays The array is m [,1] [,2] [,3] [,4] [,5] [1,]0 12 138 20 [2,] 120 15 28 88 [3,] 13 15069 [4,]8 286

Re: [R] Help with Book example of Matrix application

2012-04-09 Thread Duncan Murdoch
On 09/04/2012 12:32 PM, James Lenihan wrote: I found this example in an Introductory R book in the chapter on Matrices and Arrays You should probably check with the author of the book (there might be an errata page posted somewhere), but it looks like a typo, in your code or the original: T

[R] Help with Book example of Matrix application

2012-04-09 Thread James Lenihan
I found this example in an Introductory R book in the chapter on Matrices and Arrays The array is > m [,1] [,2] [,3] [,4] [,5] [1,]0 12 138 20 [2,] 120 15 28 88 [3,] 13 15069 [4,]8 2860 33 [5,] 20 889 330 The code is

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Bazman76
oops sorry n 08.04.2012 20:39, Bazman76 wrote: > Hi there, > > Can someone explain what the difference between spec.pgram and spec.ar is? > > I understand that they attempt to do the same thing one using an AR > estimation of the underlying series to estimate teh sensity the other > using >

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread peter dalgaard
On Apr 9, 2012, at 16:55 , Uwe Ligges wrote: > > > On 08.04.2012 20:39, Bazman76 wrote: >> Hi there, >> >> Can someone explain what the difference between spec.pgram and spec.ar is? >> >> I understand that they attempt to do the same thing one using an AR >> estimation of the underlying serie

Re: [R] How to find best parameter values using deSolve n optim() ?

2012-04-09 Thread Thomas Petzoldt
On 4/5/2012 6:32 PM, mhimanshu wrote: Hi Thomas, Thank you so much for your suggestion. I tried your code and it is working fine. Now when I change the values of Y in yobs I am getting so many warnings. say, yobs<- data.frame( time = 0:7, Y = c(0.00, 3.40, 4.60 ,5.80, 5.80, 6.00, 6.00 ),

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Uwe Ligges
On 09.04.2012 17:01, Bazman76 wrote: OK so I neeed to understan better what it it they are trying to measure. I understood (incorrectly it seems) that they were simply different methods to get the same result? Yes. Also note this is a mailing list and you are lucky I was able to remember th

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Bazman76
OK so I neeed to understan better what it it they are trying to measure. I understood (incorrectly it seems) that they were simply different methods to get the same result? -- View this message in context: http://r.789695.n4.nabble.com/Difference-between-spec-pgram-spec-ar-tp4541358p4542985.html

Re: [R] Creating a dummy variable

2012-04-09 Thread Uwe Ligges
On 09.04.2012 07:16, arunkumar wrote: HI I want to create a dummy variable for a dataset which has various dates Eg I've one year data. The user can choose any date range startdate : 2012-01-01 enddate: 2012-02-01 dummy <- date >= startdate & date <= enddate Uwe Ligges startdate: 2

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Thank you very much! This worked. -- View this message in context: http://r.789695.n4.nabble.com/Specifying-the-ordering-of-a-vector-tp4542766p4542907.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

Re: [R] Panel.abline would not show beyond a certain slope value

2012-04-09 Thread Uwe Ligges
On 09.04.2012 06:31, Aziz, Muhammad Fayez wrote: Hi, Please find the code and data following. Problem appears in lines 37 - 42 of the code. I am using R.2.13.0 on WinXP. Works for me with a recent version of R (i.e. 2.15.0) / grid and lattice (i.e. 0.20-6). Please always try with recent

Re: [R] Difference between spec.pgram & spec.ar

2012-04-09 Thread Uwe Ligges
On 08.04.2012 20:39, Bazman76 wrote: Hi there, Can someone explain what the difference between spec.pgram and spec.ar is? I understand that they attempt to do the same thing one using an AR estimation of the underlying series to estimate teh sensity the other using the FFT. However when appli

Re: [R] i am not getting time series prediction results?

2012-04-09 Thread Uwe Ligges
On 09.04.2012 13:27, sagarnikam123 wrote: i have attached file, http://r.789695.n4.nabble.com/file/n4542543/1BHP_A.txt 1BHP_A.txt i just want to validate predicting results, i give less 10 digits for prediction& compare results it with previous input data(input file) i<-read.table(file.choos

Re: [R] How do Sweave users collaborate with Word users?

2012-04-09 Thread Alexander Shenkin
Thanks for the heads up, Paul. That's good to know. I happen to be in academics, as are my collaborators, but I could imagine running into problems down the road. The good thing seems to be that it's just the users who want to interact with R who need the software. If collaborators are just tou

Re: [R] How do Sweave users collaborate with Word users?

2012-04-09 Thread Alexander Shenkin
Thanks Rich, While it doesn't tickle me the way sweave/knitr does, SWord sounds more or less like the thing I'm looking for. However, poking around http://rcom.univie.ac.at/ and http://www.statconn.com doesn't reveal any download links. It seems as though SWord has been pulled from their lineup?

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread Duncan Murdoch
On 09/04/2012 9:58 AM, crmnaw wrote: Hi, Thanks for your reply. In the example I gave in the original post, your code works. But for others, it doesn't and I'm not sure why it works for some cases and not for others. For example: x<-c(0.04,0.07,0.20,0.35,0.55,0.70) order(x) [1] 1 2 3 4 5 6 Let

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Uwe Ligges
On 09.04.2012 16:08, Guaramy wrote: Tanks a lot to all of you that take the time to help me. This is a really useful and helpful forum and i will try to help as much as i can Thanks for offering help to the R-help *mailing list*. Please try to use the mailing list interface (rather than Nabb

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Guaramy
Tanks a lot to all of you that take the time to help me. This is a really useful and helpful forum and i will try to help as much as i can Best Regards Jorge -- View this message in context: http://r.789695.n4.nabble.com/Error-in-integrate-int-fn-lower-0-upper-Inf-evaluation-of-function-gave-a

[R] Calculating the overlapping area of ellipsoides

2012-04-09 Thread Steve_Friedman
I'm generating several scatter3d visualizations of vegetation community distribution against a number parameters using the scatter3d function car package, The visualizations are fantastic and they provide great support for the analysis. As far as I can determine, scatter3d does not save the outpu

Re: [R] R problem nls

2012-04-09 Thread Carlos Ortega
Hi, And regarding how to extend the nls algorithm to a larger dataset it is a question of indicating in the nls() functions which data.frame to use. In you example you were using a small set of x's ad y's, so if you want to use a large set put it in a new data.frame and pass it to nls(). And if y

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Hi, Thanks for your reply. In the example I gave in the original post, your code works. But for others, it doesn't and I'm not sure why it works for some cases and not for others. For example: x<-c(0.04,0.07,0.20,0.35,0.55,0.70) order(x) [1] 1 2 3 4 5 6 Let's say I want y to be in the order 1-2

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread Duncan Murdoch
On 09/04/2012 9:38 AM, crmnaw wrote: Hi, I'm trying to create a vector (or matrix row) with a specific ordering. For example, I have the following vector: x<-c(0.1,0.2,0.3,0.4,0.5,0.6) that has order order(x) [1] 1 2 3 4 5 6 I want another vector that has the same values as x, but with a dif

Re: [R] Avoid loop with the integrate function

2012-04-09 Thread Navin Goyal
Hi Berend, I now understand what you were explaining. It works great. Thanks a lot for your time and help. I really appreciate it. Navin Goyal On Mon, Apr 9, 2012 at 1:26 AM, Berend Hasselman wrote: > > On 09-04-2012, at 01:26, Navin Goyal wrote: > > > Hi, > > I am not sure I follow the scala

Re: [R] Comparing 2 means. pls help

2012-04-09 Thread R. Michael Weylandt
You should look up what a t-test is. Michael On Mon, Apr 9, 2012 at 2:58 AM, ali_protocol wrote: > I am interested in the difference of 2 data: > > mat1= c(2.2, 2.3, 2.2,2.5) > mat2= c(2.6, 2.8, 2.7,2.4) > > mat= mat2-mat1 > > I perform an action on both mat1 and mat2, and I get > mat1prime and

[R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Hi, I'm trying to create a vector (or matrix row) with a specific ordering. For example, I have the following vector: x<-c(0.1,0.2,0.3,0.4,0.5,0.6) that has order order(x) [1] 1 2 3 4 5 6 I want another vector that has the same values as x, but with a different ordering. For example, I want

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread peter dalgaard
On Apr 9, 2012, at 14:54 , Guaramy wrote: > I read it believe me . The reason that a i post this is because i am making a > thesis and a i am having this problem for over 2 weeks. > I can´t solve it and its causing me real problems. Well, if you have a function that is not vectorized, i.e. it wo

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Berend Hasselman
On 09-04-2012, at 14:54, Guaramy wrote: > I read it believe me . The reason that a i post this is because i am making a > thesis and a i am having this problem for over 2 weeks. > I can´t solve it and its causing me real problems. You didn't give us a reproducible example. I'm assuming your ori

Re: [R] R problem nls

2012-04-09 Thread Jean V Adams
Your formula could be simplified to y ~ 1 + a * exp(-b * x) Solve this equation for x x = ln[(y - 1)/a]/b Use this equation to find the intersection point at a given value of y. For example, when y = 1.01 x = ln(0.01/a)/b Jean Karen Vandepoel wrote on 04/09/2012 0

Re: [R] Creating Better Table in R

2012-04-09 Thread Carlos Ortega
Hi, Yes, please check package "tables". Regards, Carlos Ortega www.qualityexcellence.es 2012/4/9 bobo > Could anyone please direct me on how to make a nicer table in R? THANKS FOR > ALL THE HELP! > > I would like to make a table with the following in it: estimate, t value, > significance, beta

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Guaramy
I read it believe me . The reason that a i post this is because i am making a thesis and a i am having this problem for over 2 weeks. I can´t solve it and its causing me real problems. Sorry for any inconvenience Thanks -- View this message in context: http://r.789695.n4.nabble.com/Error-in-

[R] R problem nls

2012-04-09 Thread Karen Vandepoel
Hi, I will try to explain what it is I need to do, how far I am in doing it yet and where my problem is: I have a lot of x,y values I need to fit a non linear function through. Subsequently, I need to find the intersection point of this fitted curve with y=1.01 The problem is I have a lot of val

Re: [R] Stepwise procedure with force.in command

2012-04-09 Thread Peter Ehlers
On 2012-04-09 00:44, Hien Nguyen wrote: Dear R-helpers, I am trying to do a stepwise procedure in which I want to force some variables in the model. I have searched around and it seems that only leaps package allows to force the variable in the stepwise procedure. I use the leaps package and use

Re: [R] How do Sweave users collaborate with Word users?

2012-04-09 Thread Paul Bivand
If you're considering SWord, you should remember that the licence is not the normal R licence and in commercial use will require a commercial licence. While some academic disciplines use Word etc, the issue may be more common outside academia. For those of us where such requirements involve a proc

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread David Winsemius
On Apr 8, 2012, at 11:48 PM, Guaramy wrote: Sorry but i didn't understand. The path to understanding is through study and application of the advice in the Posting Guide. -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing l

[R] Help using R 2.14.2

2012-04-09 Thread Kinshuk Nayak
 Sir,  I am a student in biostat and bioinformatics.  I am interested to use R for my research work related to codon usage analysis.This software was used in a publication entitled " Online synonymous codon usage analyses with the ade4 and seqinR packages" and a weblink   http://pbil.univ-lyon1

Re: [R] How do Sweave users collaborate with Word users?

2012-04-09 Thread Richard M. Heiberger
You might want to consider SWord, which provides similar facilities for the Word and R user. Word-oriented co-authors can modify the Word part of the document without impacting the R part of the document. SWord is by Thomas Baier tho...@statconn.com, author of the statconnDCOM interface that is u

[R] i am not getting time series prediction results?

2012-04-09 Thread sagarnikam123
i have attached file, http://r.789695.n4.nabble.com/file/n4542543/1BHP_A.txt 1BHP_A.txt i just want to validate predicting results, i give less 10 digits for prediction & compare results it with previous input data(input file) > i<-read.table(file.choose()) #attached file taking > i<-i$V1 > leng

[R] Shewhart Control Charts for Time Series data (qcc package)

2012-04-09 Thread Alexandr M
Hello everybody! I am trying to apply qcc function to time series data. There is an example from documentation: ### library(qcc) data(pistonrings) attach(pistonrings) diameter <- qcc.groups(diameter, sample) qcc(diameter[1:25,], type="xbar") detach(pistonrings) ### So, we have 5 iteams at each

[R] Creating Better Table in R

2012-04-09 Thread bobo
Could anyone please direct me on how to make a nicer table in R? THANKS FOR ALL THE HELP! I would like to make a table with the following in it: estimate, t value, significance, beta, standard errors, adjusted r squared, and residual standard error (3 decimal points if possible, but I can do it by

[R] Question on harmonic (Fourier) analysis of sinusoidal time series

2012-04-09 Thread holden999
Hello, I will try to explain the problem, sorry if it will be a little long... I'm using R to analyze results of cyclic mechanical testing, like this: - apply quasi-sinusoidal load - measure quasi-sinusoidal vertical and horizontal deformations (quasi-sinusoidal load means that load "should be"

Re: [R] Order sapply

2012-04-09 Thread MSousa
Good Afternoon, I get it, my question was really how the data were organized, I thought I was doing something wrong. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Order-sapply-tp4537496p4542518.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] How to get the confidence interval of area under the time dependent roc curve

2012-04-09 Thread Terry Therneau
On 04/07/2012 05:00 AM, r-help-requ...@r-project.org wrote: It is possible to calculate the c-index for time dependent outcomes (such as disease) using the survivalROC package in R. My question is : is it possible to produce a p-value for the c-index that is calculated (at a specific point in

[R] Stepwise procedure with force.in command

2012-04-09 Thread Hien Nguyen
Dear R-helpers, I am trying to do a stepwise procedure in which I want to force some variables in the model. I have searched around and it seems that only leaps package allows to force the variable in the stepwise procedure. I use the leaps package and use the regsubsets(lm1, force.in = 1, dat

Re: [R] Drawing a line in xyplot

2012-04-09 Thread John Maindonald
PS: The following shows possibilities that are available using latticeExtra layering: ## Best make type and attend factors xdat = data.frame(mortality =c(5, 8,7,5,8,10,11,6,4,5,20,25,27,30,35,32,28,21,20,34,11,15,18,12,15,12,10,15,19,20), type= factor(c(1, 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,

Re: [R] slanted stacked bar graphs?

2012-04-09 Thread Barry Rowlingson
On Mon, Apr 9, 2012 at 7:29 AM, Susanna Makela wrote: > Hello R users, > > I would like to generate "slanted" stacked bar graphs like those on > the bottom of pages 1 and 2 in this document: > http://www.wssinfo.org/fileadmin/user_upload/resources/JMP-Snapshot-SWA-HLM.pdf > . I've also attached th

[R] Comparing 2 means. pls help

2012-04-09 Thread ali_protocol
I am interested in the difference of 2 data: mat1= c(2.2, 2.3, 2.2,2.5) mat2= c(2.6, 2.8, 2.7,2.4) mat= mat2-mat1 I perform an action on both mat1 and mat2, and I get mat1prime and mat2prime: mat1prime= c(2.5, 2.5, 2.3,2.5) mat2prime= c(2.6, 2.8, 2.7,2.6) matprime= mat2prime-mat1prime I want