Re: [R] question on FARIMA innovations&In-Reply-To=<[EMAIL PROTECTED]>

2008-09-04 Thread Tony Cricenti
Hi Ferebee, I am also working on a similar problem. Have you solved it? I am trying to write a function to to determine the innovations. However, I think that the Farma package may do this. I haven't succeeded in getting Farma to work. It requires OX. Can you let me know if you have made any prog

[R] reading and parsing gzipped files

2008-09-04 Thread Dmitriy Skvortsov
Hi all,I have large compressed text tab delimited files, I am trying to write efficient function to read them, I am using gzfile() and readLines() zz <- gzfile("exampl.txt.gz", "r") # compressed file system.time(temp1<-readLines(zz )) close(zz) which work fast, and create vector of strings

Re: [R] Derived classes

2008-09-04 Thread Gabor Grothendieck
Try this: # constructor for Square makeSquare <- function(name, side) structure(list(name = name, side = side), class = c("Square", "Shape")) # generic getName <- function(shape) UseMethod("getName") # Shape method getName.Shape <- function(shape) shape$name # generic getArea <- function(shape)

[R] how to write a escape sequences in to a file

2008-09-04 Thread Kurapati, Ravichandra (Ravichandra)
Hi Str1<-"hai " Str2<-"hru" I want to write these 2 strings in a file separated by newline. How can I get this. Thanks K.Ravichandra [[alternative HTML version deleted]] ___

Re: [R] algorithm to create unique identifiers

2008-09-04 Thread Christos Hatzis
It might be an overkill for what you need, but take a look at package Ruuid. -Christos > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Ralph S. > Sent: Thursday, September 04, 2008 11:44 PM > To: r-help@r-project.org > Subject: [R] algorithm to cr

[R] Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)

2008-09-04 Thread Dylan Arena
Hi there, I'm in the following directory: ~/Documents/Rstuff/diceFiles/dice_1.1 The directory "dice" is in this directory, with all the usual build files (DESCRIPTION, NAMESPACE, etc). I'm trying to run the following command: R CMD check dice (where "dice" is the name of the package I'm chec

[R] library/function that estimates parameters of well known distributions from empirical data?

2008-09-04 Thread Ted Byers
I found this a few months ago, but for the life of me I can't remember what the function or package was, and I have had no luck finding it this week. I have found, again, the functions for working with distributions like Cauchy, F, normal, &c., and ks.test, but I have not found the functions for

Re: [R] Maximum likelihood estimation

2008-09-04 Thread toh
Yes I'm trying to optimize the parameters a, b, p and lambda where a > 0, b > 0 and 0 < p < 1. I attached the error message that I got when I run mle. > t <- c(1:90) > y <- > c(5,10,15,20,26,34,36,43,47,49,80,84,108,157,171,183,191,200,204,211,217,226,230, + 234,236,240,243,252,254,259,263,264,

[R] smoothing with the Gaussian kernel

2008-09-04 Thread dxc13
useR's, Does anyone know what function or package allows one to specify use of the Gaussian kernel to smooth a data set, or is this just the default for most functions? Thanks, dxc13 -- View this message in context: http://www.nabble.com/smoothing-with-the-Gaussian-kernel-tp19323294p19323294.h

Re: [R] algorithm to create unique identifiers

2008-09-04 Thread Henrik Bengtsson
On Thu, Sep 4, 2008 at 8:44 PM, Ralph S. <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am trying to create a unique identifier for each row, combining numbers > from three columns. > > Do you know if there is a general formula to do this (or some manual where I > can read about this)? > > I figure

[R] Derived classes

2008-09-04 Thread rkevinburton
Coming from a C++ and C# background I would like to know how inheritance works with 'R'. The classical example is I can define an abstract class 'Shape' and have an array of 'Shape's but each instance could be a Circle, Square, Triangle, etc. because they all derive from 'Shape'. At runtime if I

[R] algorithm to create unique identifiers

2008-09-04 Thread Ralph S.
Hi all, I am trying to create a unique identifier for each row, combining numbers from three columns. Do you know if there is a general formula to do this (or some manual where I can read about this)? I figure I can use the numeric entries of the columns as "coordinates" and multiply them wi

[R] help for color parameter

2008-09-04 Thread Zheng Lu
Dear all: I attached the dataset with this email and post codes as below. My questions is related to the 'col=temp.col' for the line and pch in my code, I have 4 IDs, 10 DIDs and each ID include different DIDs, for example, first ID has 3 DIDs, then the color is the first three colors(bla

Re: [R] isoMDS and dist

2008-09-04 Thread stephen sefick
I don't know for sure about isoMDS, but package vegan is a good place to start with a very good viginette. Stephen On Thu, Sep 4, 2008 at 5:02 PM, Carolyn A. Pucko <[EMAIL PROTECTED]> wrote: > > I am starting with a matrix in which rows are vegetation plots and columns > are various characteristi

[R] how to deal with NaN in "boot" object

2008-09-04 Thread Jinsong Zhao
Hi there, I use boot() to do bootstrap simulation on my statistic, I get a boot object, named "obj". For certain reasons, there are some "NaN" in obj$t. Now, I hope to get confidence interval using boot.ci(), it give the following error: Error in if (const(t, min(1e-08, mean(t)/1e+06))) { : mis

Re: [R] (with subject)

2008-09-04 Thread Gabor Grothendieck
I assume the problem is that you want the axis to have all 12 months but your data is much shorter. Try this: mos <- seq(as.Date("2008-01-01"), length = 12, by = "month") plot(range(mos), range(rawData$y), type = "n", xaxt = "n") lines(rawData$Date, rawData$y) axis(1, mos, month.abb) On Thu, Se

Re: [R] modeling interval data, a.k.a. irregular timeseries

2008-09-04 Thread Rolf Turner
It seems to me you that have a sequence (``series'') of random times, rather than a sequence of values of a random variable observed at a irregularly spaced times. Hence I would say that point process modelling, rather than time series modelling, would be more appropriate. You could consi

Re: [R] using complete.cases() with nested factors

2008-09-04 Thread Gabor Grothendieck
See ?subset and ?ave and try this: subset(DF, ave(year, year, FUN = length) == 12) On Thu, Sep 4, 2008 at 5:04 PM, Andrew Barr <[EMAIL PROTECTED]> wrote: > Hello, > > This maybe a newbie question. I have a dataframe that looks like the sample > at the bottom of the email. I have monthly precip

Re: [R] using complete.cases() with nested factors

2008-09-04 Thread hadley wickham
On Thu, Sep 4, 2008 at 4:19 PM, Ken Knoblauch <[EMAIL PROTECTED]> wrote: > Andrew Barr gmail.com> writes: >> This maybe a newbie question. I have a dataframe > that looks like the sample >> at the bottom of the email. I have monthly > precipitation data from several >> sites over several years.

Re: [R] Building a time series.

2008-09-04 Thread Achim Zeileis
On Thu, 4 Sep 2008, [EMAIL PROTECTED] wrote: I have a need to build a time series and there are a couple of aspects about the time series object that are confusing me. First it seems that ts.union is not doing what I would expect. For example: x0 <- rep(0,10) x1 <- rep(1,10) xt0 <- ts(x0, fr

Re: [R] Plotting the complex fft in 3D?

2008-09-04 Thread Oliver Bandel
Zitat von Duncan Murdoch <[EMAIL PROTECTED]>: > On 04/09/2008 4:44 PM, Oliver Bandel wrote: > > Zitat von Duncan Murdoch <[EMAIL PROTECTED]>: > > > >> Oliver Bandel wrote: > >>> Hello, > >>> > >>> [...] > plot3d doesn't support that directly, but you could plot with > type='n', > then use segmen

Re: [R] showing the image

2008-09-04 Thread Greg Snow
Here is one approach: > tmp <- scan(what='') 1: "#44" "#44" "#434343" "#404040" "#3D3D3D" "#3D3D3D" "#3E3E3E" 8: "#414141" "#414141" "#414141" "#404040" "#3F3F3F" "#3F3F3F" "#3F3F3F" 15: "#3E3E3E" "#3E3E3E" "#3F3F3F" "#404040" "#404040" "#404040" "#404040" 22: "#3E3E3E" "#3D3D3D" "#3E3

Re: [R] using complete.cases() with nested factors

2008-09-04 Thread Ken Knoblauch
Andrew Barr gmail.com> writes: > This maybe a newbie question. I have a dataframe that looks like the sample > at the bottom of the email. I have monthly precipitation data from several > sites over several years. For each site, I need to extract years that have > a complete series of 12 mon

[R] Building a time series.

2008-09-04 Thread rkevinburton
I have a need to build a time series and there are a couple of aspects about the time series object that are confusing me. First it seems that ts.union is not doing what I would expect. For example: x0 <- rep(0,10) x1 <- rep(1,10) xt0 <- ts(x0, frequency=10) xt1 <- ts(x1, frequency=10) st2 <-

Re: [R] Plotting the complex fft in 3D?

2008-09-04 Thread Duncan Murdoch
On 04/09/2008 4:44 PM, Oliver Bandel wrote: Zitat von Duncan Murdoch <[EMAIL PROTECTED]>: Oliver Bandel wrote: Hello, I'm new to R (using it since about two weeks), but absolutely a fan of it from the beginning on. :-) Best tool for working with data I found. :-) I tried using the fft() an

[R] using complete.cases() with nested factors

2008-09-04 Thread Andrew Barr
Hello, This maybe a newbie question. I have a dataframe that looks like the sample at the bottom of the email. I have monthly precipitation data from several sites over several years. For each site, I need to extract years that have a complete series of 12 monthly precipitation values, while ex

[R] isoMDS and dist

2008-09-04 Thread Carolyn A. Pucko
I am starting with a matrix in which rows are vegetation plots and columns are various characteristics including ID# and elevation. I removed elevation and ID columns to avoid having those characteristics influence the distances between points which I calculated using the "dist" command.

Re: [R] Plotting the complex fft in 3D?

2008-09-04 Thread Oliver Bandel
Zitat von Duncan Murdoch <[EMAIL PROTECTED]>: > Oliver Bandel wrote: > > Hello, > > > > > > I'm new to R (using it since about two weeks), > > but absolutely a fan of it from the beginning on. :-) > > > > Best tool for working with data I found. :-) > > > > I tried using the fft() and other funcit

Re: [R] Possible R graphics devices

2008-09-04 Thread stephen sefick
I think being able to say lable your points with a third column of data would be cool (which I am sure is already do-able), and also to be able to hover over a point and find out the value. On a huge wishlist that I don't have a clue how to implement- a zoom window function close to kaliedagraphs

[R] showing the image

2008-09-04 Thread rostam shahname
Hi everyone, I have a matrix containing color values of an image same as following, [1,] "#44" "#44" "#434343" "#404040" "#3D3D3D" "#3D3D3D" "#3E3E3E" [2,] "#414141" "#414141" "#414141" "#404040" "#3F3F3F" "#3F3F3F" "#3F3F3F" [3,] "#3E3E3E" "#3E3E3E" "#3F3F3F" "#404040" "#404040" "#404040

Re: [R] (with subject)

2008-09-04 Thread Felipe Carrillo
Is this what you want? library(ggplot2) rawData <- data.frame(Date = c("2008-03-01", "2008-03-21", "2008-03-23", "2008-04-08", "2008-04-20", "2008-05-10", "2008-06-20"), y = c(4, 6,8, 5, 7, 2 ,1)) rawData$Date <- as.Date(rawData$Date) qplot(Date,y,data=rawData,geom="line",xlim=c(as.Date("2008

Re: [R] adding NA to "subset"

2008-09-04 Thread Sherri Heck
Fantastic! Each suggestion worked beautifully. Thanks so much. Henrique Dallazuanna wrote: Try this: is.na (spdco2[,2]) <- which(spdco2[,2] < 4.7) spdco2 On Thu, Sep 4, 2008 at 4:21 PM, Sherri Heck <[EMAIL PROTECTED] > wrote: Hi All- I hav

Re: [R] adding NA to "subset"

2008-09-04 Thread Henrique Dallazuanna
Try this: is.na(spdco2[,2]) <- which(spdco2[,2] < 4.7) spdco2 On Thu, Sep 4, 2008 at 4:21 PM, Sherri Heck <[EMAIL PROTECTED]> wrote: > Hi All- > > I have a data set (spdco2) > > > spdco2 > [,1] [,2] [,3] > [1,]1 5.4 382.4212 > [2,]2 5.1 383.0315 > [3,]3 4.8 383.9520 > [4,

Re: [R] adding NA to "subset"

2008-09-04 Thread Duncan Murdoch
Sherri Heck wrote: Hi All- I have a data set (spdco2) > spdco2 [,1] [,2] [,3] [1,]1 5.4 382.4212 [2,]2 5.1 383.0315 [3,]3 4.8 383.9520 [4,]4 4.7 384.4376 [5,]5 4.7 384.5929 [6,]6 4.4 384.8864 [7,]7 4.1 385.2156 [8,]8 3.8 385.2919 [9,]

Re: [R] adding NA to "subset"

2008-09-04 Thread Jorge Ivan Velez
Dear Sherri, Perhaps: spdco2=matrix(scan(),ncol=3,byrow=TRUE) 1 5.4 382.4212 2 5.1 383.0315 3 4.8 383.9520 4 4.7 384.4376 5 4.7 384.5929 6 4.4 384.8864 7 4.1 385.2156 8 3.8 385.2919 9 3.7 385.5925 10 3.9 385.6801 spdco2[,2]<-ifelse(spdco2[,2]>=4.7,spdco2[,2],NA) spdco

Re: [R] [R-SIG-Mac] Error with update.packages()

2008-09-04 Thread Brant Inman
Thank you for your suggestion. I did as you suggested and switched from USA (NC) to USA (IA). Again, the packages seemed to download OK but this time a single error message appeared: -- .. == downloaded 168 Kb trying URL 'http

[R] adding NA to "subset"

2008-09-04 Thread Sherri Heck
Hi All- I have a data set (spdco2) > spdco2 [,1] [,2] [,3] [1,]1 5.4 382.4212 [2,]2 5.1 383.0315 [3,]3 4.8 383.9520 [4,]4 4.7 384.4376 [5,]5 4.7 384.5929 [6,]6 4.4 384.8864 [7,]7 4.1 385.2156 [8,]8 3.8 385.2919 [9,]9 3.7 385.5925 [10,] 10

Re: [R] Plotting using 'if' statements

2008-09-04 Thread Steve Murray
Thanks again Henrique - that's really useful to know! _ Discover Bird's Eye View now with Multimap from Live Search __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

Re: [R] Plotting the complex fft in 3D?

2008-09-04 Thread Duncan Murdoch
Oliver Bandel wrote: Hello, I'm new to R (using it since about two weeks), but absolutely a fan of it from the beginning on. :-) Best tool for working with data I found. :-) I tried using the fft() and other funcitons for analysing time series. What I would be glad to have, would be a conven

Re: [R] (with subject)

2008-09-04 Thread Dr Eberhard W Lisse
Dirk, Gabor, thanks for your advice, I have now tried to study these vignettes, but I must say, as an aging Gynecologist, I am facing an enormous learning curve :-)-O. This works nicely: rawData <- data.frame(x = c("2008-03-01", "2008-03-21", "2008-03-23", "2008-04-08", "2008-04-20", "2008-05

Re: [R] [R-SIG-Mac] Error with update.packages()

2008-09-04 Thread Prof Brian Ripley
Try another mirror: this is not the first time we've seen problems at www.ibiblio.org. On Thu, 4 Sep 2008, Brant Inman wrote: R-helpers: I just updated from R 7.0 to R 7.2.2 today. I am using MAC OS X version 10.5.4 on a Macbook to run R. > sessionInfo() R vers

[R] Plotting the complex fft in 3D?

2008-09-04 Thread Oliver Bandel
Hello, I'm new to R (using it since about two weeks), but absolutely a fan of it from the beginning on. :-) Best tool for working with data I found. :-) I tried using the fft() and other funcitons for analysing time series. What I would be glad to have, would be a convenient way to display the

[R] Possible R graphics devices

2008-09-04 Thread Jeffrey Horner
Hello all, I've been working on a new R Graphics device that targets Adobe's Shockwave Flash format (SWF for short). It uses http://www.libming.org/ on the backend. Here are some example outputs so far: http://160.129.129.41/~hornerj/plots/ Once you click on the above, choose a directory lik

Re: [R] combning rows

2008-09-04 Thread jim holtman
Read your data in, parse off the ID, split the records (using 'split') and then combine the like values. Since you did not read the posting guide, it is hard to give explicit help. On Thu, Sep 4, 2008 at 1:42 PM, kayj <[EMAIL PROTECTED]> wrote: > > I do have a txt file where each row is a recor

Re: [R] Error in table lookup

2008-09-04 Thread jim holtman
Your IF statement (if (x >= 3:6)) does not work as you probably expect it since it does not test for the range. You probably want to use "cut" to convert a value to a bucket in a range: > x <- 3.5 > cut(x, breaks=seq(-3,5,.2), labels=FALSE) [1] 33 > seq(-3,5,.2) [1] -3.0 -2.8 -2.6 -2.4 -2.2 -2.0

Re: [R] Stepwise

2008-09-04 Thread Frank E Harrell Jr
Also consider the redun function in the Hmisc package, which does not use the response variable but uses flexible nonlinear additive models to predict each predictor variable from all the others, using a stepwise procedure in a formal redundancy analysis. Frank Ben Bolker wrote: Peter Flom

[R] Error in table lookup

2008-09-04 Thread PDXRugger
I am trying to lookup a value in 1 of 10 loaded two column-data sets (Bins) by displaying the value of the second column based on the value of the first. For instance in Bin1_Acres Bin1_parprobBin1_TAZ [1,] 0.0004420.978 356 [2,] 0.0004530.954

[R] combning rows

2008-09-04 Thread kayj
I do have a txt file where each row is a record and the first element of each record is an id for an individual. I am looking into combing the records into one row if the id is the same and save as a txt file. Notice that the rows may not have the same length in the result file that I want to cre

Re: [R] Stepwise

2008-09-04 Thread Ben Bolker
Peter Flom brainscope.com> writes: > > Robin Williams wrote > > Is there any facility in R to perform a stepwise process on a model, > which will remove any highly-correlated explanatory variables? I am told > there is in SPSS. I have a large number of variables (some correlated), > which I

[R] Error with update.packages()

2008-09-04 Thread Brant Inman
R-helpers: I just updated from R 7.0 to R 7.2.2 today. I am using MAC OS X version 10.5.4 on a Macbook to run R. > sessionInfo() R version 2.7.2 (2008-08-25) i386-apple-darwin8.11.1 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packa

Re: [R] help on jarque test

2008-09-04 Thread Ben Bolker
giov libero.it> writes: > > > Hi all, > I used the function jarque.test (in the moments package) on my data set and > I obtained something like this: > > Jarque-Bera Normality Test > > data: x > JB = 4.8381, p-value = 0.089 > alternative hypothesis: greater > > or > > Jarque-Bera Nor

[R] Hazard Rate Confidence Intervals

2008-09-04 Thread Alan Cox
Hello, Is it possible to create confidence intervals for hazard rates?  I'm creating two muhaz objects: haz1 <- muhaz(NumDaysCustomer[cRV=="true"],status[cRV=="true"]) haz2 <- muhaz(NumDaysCustomer[cRV=="false"],status[cRV=="false"]) and plotting them.  There are many, many more observat

Re: [R] Interpolation Function f(y)

2008-09-04 Thread ermimi
Thank you very much, You have helped me to resolve the problem. Thank you!! A greetings, Luismi Henrique Dallazuanna wrote: > > I think that you can use the splinefun function: > > f <- splinefun(x, y) > > f(15) > > On Thu, Sep 4, 2008 at 1:52 PM, ermimi <[EMAIL PROTECTED]> wrote: > >>

Re: [R] Interpolation Function f(y)

2008-09-04 Thread Henrique Dallazuanna
I think that you can use the splinefun function: f <- splinefun(x, y) f(15) On Thu, Sep 4, 2008 at 1:52 PM, ermimi <[EMAIL PROTECTED]> wrote: > > Hello friends!!! > > I have a list of values called y. > The list is y=c(221.0, 212.0, 206.0, 202.7, 198.4, 195.1, 192.2, 189.7, > 187.6, 185.8); > y

[R] Interpolation Function f(y)

2008-09-04 Thread ermimi
Hello friends!!! I have a list of values called y. The list is y=c(221.0, 212.0, 206.0, 202.7, 198.4, 195.1, 192.2, 189.7, 187.6, 185.8); y is f(x) and x=c(10,20,30,40,50,60,70,80,90,100). I only have x and y. I don´t know f(x). I would like interpolate f(x) to obtain other values as f(15), f(2

[R] R base 2.7.2 packaged for Mandriva 2008.1 x86_64: anyone interested?

2008-09-04 Thread Corrado
I have packaged R base 2.7.2 for Mandriva 2008.1 x86_64 who should I send it to so that it can be made available to everybody? It is my first attempt and it works well on my computer, but it will need some testing. Best, -- Corrado Topi Global Climate Change & Biodiversity Indicators Ar

Re: [R] Plotting using 'if' statements

2008-09-04 Thread Henrique Dallazuanna
Use '&': plot(January[January[,3] > 0 & January[,3] < 2, 3:4]) On Thu, Sep 4, 2008 at 1:47 PM, Steve Murray <[EMAIL PROTECTED]> wrote: > > Ah that's great, thank you very much. > > As a follow-on, in the same format, how would I plot where column 3 is > greater than 0 *but also less than 2*? > >

Re: [R] Plotting using 'if' statements

2008-09-04 Thread Steve Murray
Ah that's great, thank you very much. As a follow-on, in the same format, how would I plot where column 3 is greater than 0 *but also less than 2*? Once again, any help is much appreciated. Thanks, Steve Date: Thu, 4 Sep 2008 13:39:12 -0300 From: [EMAIL PROT

Re: [R] saving an object

2008-09-04 Thread Henrik Bengtsson
Alternatively you can use saveObject() and loadObject() of R.utils - that will not hardwire the name of the loaded object avoiding name conflicts, e.g. library("R.utils"); foo <- 1:10; saveObject(foo, file="foo.RData"); bar <- loadObject("foo.RData"); /HB On Thu, Sep 4, 2008 at 8:44 AM, Williams

Re: [R] Plotting using 'if' statements

2008-09-04 Thread Henrique Dallazuanna
Try this: plot(January[January[,3] > 0, 3:4]) On Thu, Sep 4, 2008 at 1:28 PM, Steve Murray <[EMAIL PROTECTED]> wrote: > > > Dear all, > > I have a dataset of four columns, and I wish to plot (as a scatter graph) > the values of the third column where the values are greater than zero, and > the f

Re: [R] table and colnames

2008-09-04 Thread Gabor Grothendieck
See http://gsubfn.googlecode.com for more on the gsubfn package. Below we use strapply to pick out every string of digits and decimal points converting each to numeric returning a list of pairs and rbinding that list into a matrix. > x <- c("[10.839,10.841]", "(10.841,10.843]", "(10.843,10.846]",

[R] Plotting using 'if' statements

2008-09-04 Thread Steve Murray
Dear all, I have a dataset of four columns, and I wish to plot (as a scatter graph) the values of the third column where the values are greater than zero, and the fourth column. I tried doing this via the plot command itself, but got into a bit of a mess (resulting in errors!). My dataframe

Re: [R] A ternary graph's scales

2008-09-04 Thread Marcin Kozak
Thank you, Greg. After all I noticed that in ternaryplot it can be easily made by setting a 'scale' parameter. Thanks, Marcin On Thu, Sep 4, 2008 at 6:00 PM, Greg Snow <[EMAIL PROTECTED]> wrote: > There is also the tri function in the cwhtool package, triax.plot in the > plotrix package, and tri

Re: [R] table and colnames

2008-09-04 Thread jim holtman
Here is one way: > y <- levels(cut(x,5)) > y [1] "(0.0124,0.209]" "(0.209,0.405]" "(0.405,0.601]" "(0.601,0.797]" "(0.797,0.993]" > sapply(y, function(x) sub(".*,(.*)]", "\\1", x)) (0.0124,0.209] (0.209,0.405] (0.405,0.601] (0.601,0.797] (0.797,0.993] "0.209""0.405""0

Re: [R] table and colnames

2008-09-04 Thread Henrique Dallazuanna
Try this: v <- as.numeric(gsub("]|\\)", "", unlist(lapply(strsplit(names(tb), ","), "[", 2 Where tb is your table On Thu, Sep 4, 2008 at 10:20 AM, Trubisz, Joseph < [EMAIL PROTECTED]> wrote: > I have a table statement that returns the following: > > > > [10.839,10.841] (10.841,10.843] (10.8

Re: [R] A ternary graph's scales

2008-09-04 Thread Greg Snow
There is also the tri function in the cwhtool package, triax.plot in the plotrix package, and triplot in the TeachingDemos package (I think it is between this plot and progress bars as to what functionality is reproduced in the most packages). One of the others may do what you want, or be modif

[R] table and colnames

2008-09-04 Thread Trubisz, Joseph
I have a table statement that returns the following: [10.839,10.841] (10.841,10.843] (10.843,10.846] (10.846,10.848] (10.848,10.85] 0 0 0 0 1 (10.85,10.852] (10.852,10.854] (10.854,10.857] (10.857,10.859] (10.859,10.861]

Re: [R] for 1:length and removing rows

2008-09-04 Thread Ted Harding
On 04-Sep-08 15:33:06, Markus Mühlbacher wrote: > Hello everyone, > I have a problem using a for-loop to go through a matrix. I want to > remove all rows with a sum of 0. > What I do is basically: > > for(i in 1:length(data)) > { >if(sum(add(data[i,]) == 0) >{ > data <- data[-i,] >

Re: [R] Stepwise

2008-09-04 Thread Peter Flom
Robin Williams wrote Is there any facility in R to perform a stepwise process on a model, which will remove any highly-correlated explanatory variables? I am told there is in SPSS. I have a large number of variables (some correlated), which I would like to just chuck in to a model and perform

Re: [R] saving an object

2008-09-04 Thread Williams, Robin
?save I assume you can connect to it from within the script, presumably by supplying the path of the object to the appropriate argument in your script. I'm no expert though. HTH, Robin Williams Met Office summer intern - Health Forecasting [EMAIL PROTECTED] -Original Message- From:

[R] saving an object

2008-09-04 Thread Rajasekaramya
Hi there, I have a dataset stored in an object which has very huge volume of rows.I want to reuse it for comparing with other datasets.I dont want it to reload every time i run the script.Is there a way of saving a particular loaded object in the workspace and reusing it. Kindly help me. Ramya

[R] for 1:length and removing rows

2008-09-04 Thread Markus Mühlbacher
Hello everyone, I have a problem using a for-loop to go through a matrix. I want to remove all rows with a sum of 0. What I do is basically: for(i in 1:length(data)) { if(sum(add(data[i,]) == 0) { data <- data[-i,] } } I get a error message: "Error in `[.data.frame`(data, i) : un

[R] help on jarque test

2008-09-04 Thread giov
Hi all, I used the function jarque.test (in the moments package) on my data set and I obtained something like this: Jarque-Bera Normality Test data: x JB = 4.8381, p-value = 0.089 alternative hypothesis: greater or Jarque-Bera Normality Test data: x JB = 2.6018, p-value = 0.2723

[R] Stepwise

2008-09-04 Thread Williams, Robin
Hi, Is there any facility in R to perform a stepwise process on a model, which will remove any highly-correlated explanatory variables? I am told there is in SPSS. I have a large number of variables (some correlated), which I would like to just chuck in to a model and perform stepwise and see what

Re: [R] pass data to log-likelihood function

2008-09-04 Thread Duncan Murdoch
On 9/4/2008 10:54 AM, Jinsong Zhao wrote: Hi there, When I do bootstrap on a maximum likelihood estimation, I try the following code, however, I get error: Error in minuslogl(alpha = 0, beta = 0) : object "x" not found It seems that mle() only get data from workspace, other than the boot.fun()

[R] pass data to log-likelihood function

2008-09-04 Thread Jinsong Zhao
Hi there, When I do bootstrap on a maximum likelihood estimation, I try the following code, however, I get error: Error in minuslogl(alpha = 0, beta = 0) : object "x" not found It seems that mle() only get data from workspace, other than the boot.fun(). My question is how to pass the data to ml

Re: [R] nls convergence trouble

2008-09-04 Thread Gabor Grothendieck
> # 1. Supplying the derivatives results in convergence: > lgmg <- function(a, b, C0, m, V) { + e <- expression((V + b * m * a + C0 * V * b - ((C0 * V * b)^2 + 2 * + C0 * b * V^2 - 2 * C0 * V * m * a * b^2 + V^2 + 2 * V * m * + a * b + (b * m * a)^2))/(2 * b * m)) + val <- eval(e) + attr(val, "gra

[R] 3 Courses*** R/Splus Fundamentals and Programming Techniques: September 2008 at 3 locations by XLSolutions Corp

2008-09-04 Thread [EMAIL PROTECTED]
rXLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce our*** R/Splus Fundamentals and Programming Techniques***course at 3 USA locations for September 2008. (1) R/Splus Fundamentals and Programming Techniques http://www.xlsolutions-corp.com/Rfund.htm * San Francisco

Re: [R] Correct for heteroscedasticity using car package

2008-09-04 Thread Achim Zeileis
On Thu, 4 Sep 2008, Carrasco-Torrecilla, Roman R wrote: Dear all, Sorry if this is too obvious. I am trying to fit my multiple regression model using lm() Before starting model simplification using step() I checked whether the model presented heteroscedasticity with ncv.test() from the CAR packa

[R] A ternary graph's scales

2008-09-04 Thread Marcin Kozak
Hi all, I am drawing a ternary graph. Everything is fine with both ternaryplot (package vcd) and triangle.plot (package ade4), but I want to present scales in neither percents nor from 0 to 1 (this is actually the only option I found in both functions). I want the scales to be in a natural scale (

Re: [R] Correct for heteroscedasticity using car package

2008-09-04 Thread John Fox
Dear Roman, You can use the coefficient-covariance matrix returned by hccm() for calculating "corrected" standard errors for the coefficients. Alternatively, if you know the pattern of heteroscedasticity [as you probably do if you used ncv.test()], you could try to correct for it by a transformati

Re: [R] how to reduce stress value in isoMDS?

2008-09-04 Thread stephen sefick
no I mean maybe use a higher dimension solution- the other thing you may wish to check out is package vegan which has an mds function and very good viginettes, and is my favorite package for doing ordination analysis (metaMDS uses isoMDS). hope this helps On Wed, Sep 3, 2008 at 9:03 PM, 陈武 <[EMAI

Re: [R] Installing rgl

2008-09-04 Thread Kevin E. Thorpe
Duncan Murdoch wrote: > On 03/09/2008 4:34 PM, Kevin E. Thorpe wrote: >> Hello. >> >> I'm having trouble installing rgl. I have a theory as to the problem. >> First, the error message and session info. >> >>> install.packages("rgl") >> trying URL 'http://probability.ca/cran/src/contrib/rgl_0.81.ta

Re: [R] Projecting Survival Curve into the Future

2008-09-04 Thread Prof Brian Ripley
On Thu, 4 Sep 2008, [EMAIL PROTECTED] wrote: I have a survivor curve that shows account cancellations during the past 3.5 months. Â Fortunately for our business, but unfortunately for my analysis, the survivor curve doesn't yet pass through 50%. Â Is there a safe way to extend the survivor curve

Re: [R] Adding a legend to R graph device with several plots (no to individual plots!)

2008-09-04 Thread Duncan Murdoch
On 9/4/2008 9:35 AM, Nelson Villoria wrote: Dear Users, I already posted this question: it either went unnoticed, or it is to basic (if this is so, please sent me a hint). I would like to know if there is a way to add a common legend to an arrangement of plots. In the example below, I get four pl

Re: [R] Projecting Survival Curve into the Future

2008-09-04 Thread Robert A LaBudde
You might consider a probit analysis using ln(Time) as the "dose". At 09:24 AM 9/4/2008, [EMAIL PROTECTED] wrote: > I have a survivor curve that shows account cancellations during the > past 3.5 months. Â Fortunately for our business, but unfortunately > for my analysis, the survivor curve doesn

[R] Adding a legend to R graph device with several plots (no to individual plots!)

2008-09-04 Thread Nelson Villoria
Dear Users, I already posted this question: it either went unnoticed, or it is to basic (if this is so, please sent me a hint). I would like to know if there is a way to add a common legend to an arrangement of plots. In the example below, I get four plots in my device. each one has a density for 1

Re: [R] printing name of object inside lapply

2008-09-04 Thread Steve Powell
Thanks Prof Ripley! How obvious in retrospect! Prof Brian Ripley wrote: On Thu, 4 Sep 2008, Steve Powell wrote: Dear list members, I am trying, within a lapply command, to print the name of the objects in list or data frame. This is so that I can use odfWeave to print out a report with a secti

Re: [R] nls convergence trouble

2008-09-04 Thread Christian Ritz
Hi Benoit, another way of making Petr's point is by looking at the profile log likelihood function for b; that is, only estimating the a parameter for a grid of b values: ## Defining mean function for fixed b lgma <- function(b){ function(C0, m, V, a){ (V + b * m * a + C0 * V * b - ((C0 *

Re: [R] Projecting Survival Curve into the Future

2008-09-04 Thread Richard . Cotton
> I have a survivor curve that shows account cancellations during the > past 3.5 months. Â Fortunately for our business, but unfortunately > for my analysis, the survivor curve doesn't yet pass through 50%. > Â Is there a safe way to extend the survivor curve and estimate at > what time we'll h

[R] Correct for heteroscedasticity using car package

2008-09-04 Thread Carrasco-Torrecilla, Roman R
Dear all, Sorry if this is too obvious. I am trying to fit my multiple regression model using lm() Before starting model simplification using step() I checked whether the model presented heteroscedasticity with ncv.test() from the CAR package. It presents it. I want to correct for it, I used hccm(

Re: [R] read.table error

2008-09-04 Thread Steve Murray
Thanks Prof. Ripley! I knew it would be something simple - I'd missed the "\t" from the read.table command! I won't be doing that again...!! Thanks again, Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Projecting Survival Curve into the Future

2008-09-04 Thread Alan Cox
Hello, I have a survivor curve that shows account cancellations during the past 3.5 months.  Fortunately for our business, but unfortunately for my analysis, the survivor curve doesn't yet pass through 50%.  Is there a safe way to extend the survivor curve and estimate at what time we'll hit

Re: [R] restricted bootstrap

2008-09-04 Thread Grant Gillis
Hello Professor Ripely, Sorry for not being clear. I posted after a long day of struggling. Also my toy distance matrix should have been symmetrical. Simply put I have spatially autocorrelated data collected from many points. I would like to do a linear regression on these data. To deal with t

Re: [R] read.table error

2008-09-04 Thread Prof Brian Ripley
On Thu, 4 Sep 2008, Steve Murray wrote: Dear all, I have a tab-delimited text (.txt) file which I'm trying to read into R. This file is of column format - there are in fact 3 columns and 259201 rows (including the column headers). I've been using the following commands, but receive an error

[R] read.table error

2008-09-04 Thread Steve Murray
Dear all, I have a tab-delimited text (.txt) file which I'm trying to read into R. This file is of column format - there are in fact 3 columns and 259201 rows (including the column headers). I've been using the following commands, but receive an error each time which prevents the data from bei

Re: [R] nls convergence trouble

2008-09-04 Thread Petr PIKAL
Well, the model you try to fit is almost independent of "b" try plot(Qe,fff1(364,0.0126)) points(Qe,fff1(364,1), col=2) So you can quite freely choose b without any substantial improvement to fit. I am not an expert in nonlinear fitting but seems to me that your data does not follow your m

Re: [R] printing name of object inside lapply

2008-09-04 Thread Prof Brian Ripley
On Thu, 4 Sep 2008, Steve Powell wrote: Dear list members, I am trying, within a lapply command, to print the name of the objects in list or data frame. This is so that I can use odfWeave to print out a report with a section for each object, including the object names. I tried e.g. a=b=c=1:5 li

[R] printing name of object inside lapply

2008-09-04 Thread Steve Powell
Dear list members, I am trying, within a lapply command, to print the name of the objects in list or data frame. This is so that I can use odfWeave to print out a report with a section for each object, including the object names. I tried e.g. a=b=c=1:5 lis=data.frame(a,b,c) lapply( lis, function

Re: [R] nls convergence trouble

2008-09-04 Thread Benoit Boulinguiez
Hi, I agree with you that Excel is not the best tool for fittings, that's why I try to handle R. But I need to use this specific model ("LgmAltFormula") and not a polynomial expression with the different parameters even if your method produced correct fitting. The parameters "a" and "b" are the

  1   2   >