[R] error with 'hash' library

2011-02-22 Thread Albert-Jan Roskam
Hello, I'm using R2.10 on Windows 2000 and I'm having trouble installing the 'hash' library. This is the error I get: library(hash)     _   _      ___  _ __   ___ _ __   __| | __ _| |_ __ _  / _ \| '_ \ / _ \ '_ \ / _` |/ _' | __/ _' | | (_) | |_) |  __/ | | |

[R] now S4 classes and packages

2011-02-22 Thread Laura Smith
Hi again List: This time I have the following: setClass(dog,representation(breed=numeric)) [1] dog woof - function(x=1:10) { + if(!is.numeric(x))stop(Must have numeric data) + y - new(dog,breed=x) + return(y) + } setMethod(plot,dog, + function(x,y,...) { + plot(x@breed,col=blue,type=l) + } + )

Re: [R] Plotting individual trajectories from individual growth model

2011-02-22 Thread dadrivr
Thanks Dennis, The code works for perfectly for the data in the example. For some reason, however, I get the following error message when I use a different data set: preds - expand.grid(age = c(30,36,42), Subject = unique(mydata$id)) predict(lmemodel, preds, na.action=na.omit) Error in

Re: [R] Calculate a mean for several months for several years

2011-02-22 Thread saba
Thank you so much for your help Dennis, Pete and D Kelly! In the meantime I tried to do a loop and came up with this: l-0 for (i in 0:((length(lakewil$Year)/12)-1)) { l[i+1]- mean(lakewil$MeanTemp[((i*12)+7):((i*12)+9)]) } print(l) This gives me the summer averages over the 3 months for each

Re: [R] Interpreting the example given by Prof Frank Harrell in {Design} validate.cph

2011-02-22 Thread vikkiyft
I really appreciate your help Prof Harrell! I followed your instruction and re-ran the second model without strat but with surv=TRUE, time.inc=30, and u=30 to validate, the Dxy was really the same as that in the first model output! But this confused me...shouldn't the Dxy be positive in this

Re: [R] error with 'hash' library

2011-02-22 Thread Prof Brian Ripley
On Tue, 22 Feb 2011, Albert-Jan Roskam wrote: Hello, I'm using R2.10 on Windows 2000 and I'm having trouble installing the 'hash' We've not seen that for a long time, and as Microsoft no longer supports it, we don't test there. library. This is the error I get: library(hash)

Re: [R] problem installing R in Ubuntu 10.04 -HELP

2011-02-22 Thread Graham Williams
I have seen this issue reported by others though I don't know what the root cause is. Others have solved it by removing the .Rdata file causing the problem (there must be one if it says so). It would usually, I think, be in the folder where you start R. Regards, Graham On 20 February 2011

[R] qbeta

2011-02-22 Thread Dr. Alireza Zolfaghari
Hi List, Does any body know how I can see the code behind qbeta function? thanks Alireza [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] mle

2011-02-22 Thread dpender
Hi, I am looking for some help regarding the use of the mle function. I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that have been defined in the the log-likelihood equation as theta0=theta[1], theta1=theta[2] and theta2=theta[3]. My R code for mle is: mle(Poisson.lik,

[R] intervals command

2011-02-22 Thread emj83
Hi, I am fitting a random effects model and I am interested in the 95% confidence interval of the variance components. When I use the intervals() command it gives me the 95% confidence interval of the standard deviation. Is there anyway of getting the 95% confidence interval of the variance?

Re: [R] Species accumulation curves with differential sampling effort

2011-02-22 Thread Jari Oksanen
Vanessa Francisco vanewagen at gmail.com writes: Hello! I'm a PhD student working with coral reef fish diversity in Mexico. I want to do species accumulation curves but I have differential sampling effort for each sample. Do you know or have developed an R script that consider the

[R] Regarding Savitzky-Golay Smoothing Filter

2011-02-22 Thread reynolds pravindev
Hi When we use the sav_gol command in R , it shows an error which says: error in as.matrix. We've downloaded the necessary packages. Kindly help us with this issue. If there is any other function to perform Savitzky-Golay smoothing in R, please let me know. With Regards Reynolds

[R] mle

2011-02-22 Thread dpender
Hi, I am looking for some help regarding the use of the mle function. I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that have been defined in the the log-likelihood equation as theta0=theta[1], theta1=theta[2] and theta2=theta[3]. My R code for mle is: mle(Poisson.lik,

Re: [R] problem installing R in Ubuntu 10.04 -HELP

2011-02-22 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/2011 10:49 AM, Graham Williams wrote: I have seen this issue reported by others though I don't know what the root cause is. Others have solved it by removing the .Rdata file causing the problem (there must be one if it says so). It would

[R] System of related regression equations

2011-02-22 Thread Michael Haenlein
Dear all, I would like to estimate a system of regression equations of the following form: y1 = a1 + b1 x1 + b2x2 + e1 y2 = a2 + c1 y1 + c2 x2 + c3 x3 + e2 Specifically the dependent variable in Equation 1 appears as an independent variable in Equation 2. Additionally some independent variables

[R] read.table

2011-02-22 Thread Santosh Srinivas
Hi Group, I am having a strange problem for this simple task. I am using read.table to read a plan 3 column CSV file . the file is getting read . But the first column has datetime in the csv file in the following format: 20110221.114041 But this is being read as 20110221 only . the

Re: [R] Transforming relational data

2011-02-22 Thread mathijsdevaan
Hi Matthew, thanks for your help. There are some things going wrong still. Consider this (slightly extended) example: library(data.table) DT = data.table(read.table(textConnection(A B C 1 1 a 1999 2 1 b 1999 3 1 c 1999 4 1 d 1999 5 2 c 2001 6 2 d 2001 7 3 a 2004 8 3

Re: [R] read.table

2011-02-22 Thread Philipp Pagel
I am using read.table to read a plan 3 column CSV file . the file is getting read . But the first column has datetime in the csv file in the following format: 20110221.114041 But this is being read as 20110221 only . the time portion (decimal is missing) in the data frame My guess is

Re: [R] qbeta

2011-02-22 Thread Philipp Pagel
On Tue, Feb 22, 2011 at 10:09:51AM +, Dr. Alireza Zolfaghari wrote: Hi List, Does any body know how I can see the code behind qbeta function? As the code seems to be internal, you'll need to download the r-source code and find it in there. In my copy of R it is here:

[R] Adjusting for autocorrelation in a panel model

2011-02-22 Thread Millo Giovanni
Dear David, short answer: no. Although an MA(4) correlation structure makes perfect sense in an econometric panel model, the treatment of (relatively) rich covariance structures in a likelihood framework is done so well in the 'nlme' and 'lme4' packages that we decided not to duplicate

Re: [R] qbeta

2011-02-22 Thread Richard . Cotton
Does any body know how I can see the code behind qbeta function? As the code seems to be internal, you'll need to download the r-source code and find it in there. In my copy of R it is here: R-2.11.1/src/nmath/qbeta.c An alternative is to view the source code online. The code for qbeta is

Re: [R] Regarding Savitzky-Golay Smoothing Filter

2011-02-22 Thread Hans W Borchers
reynolds pravindev reynoldspravindev at gmail.com writes: Hi When we use the sav_gol command in R , it shows an error which says: error in as.matrix. We've downloaded the necessary packages. Kindly help us with this issue. If there is any other function to perform Savitzky-Golay smoothing

Re: [R] now S4 classes and packages

2011-02-22 Thread Uwe Ligges
On 22.02.2011 09:15, Laura Smith wrote: Hi again List: This time I have the following: setClass(dog,representation(breed=numeric)) [1] dog woof- function(x=1:10) { + if(!is.numeric(x))stop(Must have numeric data) + y- new(dog,breed=x) + return(y) + } setMethod(plot,dog, +

Re: [R] Transforming relational data

2011-02-22 Thread Matthew Dowle
With the new example, what is the full output, and what do you need instead? Was it correct for the previous example? Matthew mathijsdevaan mathijsdev...@gmail.com wrote in message news:1298372018181-3318939.p...@n4.nabble.com... Hi Matthew, thanks for your help. There are some things going

Re: [R] read.table

2011-02-22 Thread jim holtman
Use colClasses to specify that the column is character so you don't lose any significance. You are close to the 15 digits of significance for a floating point number. On Tue, Feb 22, 2011 at 6:08 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: Hi Group, I am having a strange problem

[R] Set size of plot: in pdf() or par() ?

2011-02-22 Thread Matthieu Stigler
Hi I want to have a rectangular plot of size 0.5*0.3 inches. I am having surprisingly a difficult time to do it... Since I will export it, I use also pdf(). The plot works fine, but once I specify the size in pdf() I get problems... see: Say I specify my plot as following: par(pin=c(0.5,

Re: [R] Regarding Savitzky-Golay Smoothing Filter

2011-02-22 Thread hiemstra
On 02/22/2011 10:34 AM, reynolds pravindev wrote: Hi When we use the sav_gol command in R , it shows an error which says: error in as.matrix. We've downloaded the necessary packages. Kindly help us with this issue. If there is any other function to perform Savitzky-Golay smoothing in R,

[R] How to find points of intersection

2011-02-22 Thread FMH
Dear All, I'm looking an appropriate way in R to compute/estimate  points of intersection between a line and a curve and will really appreciate for any suggestion or ideas? Thank you, Fir __ R-help@r-project.org mailing list

Re: [R] [r] align xyplot

2011-02-22 Thread Francesco Nutini
Hi Dennis and [R]users! as I said last week, I need more info about xyplot. Is it possible to change the color of the intestation of xyplot? By default is pale-pink, but light-gray is better for a paper. Thanks, Francesco From: nutini.france...@gmail.com To: djmu...@gmail.com CC:

[R] question regarding basic stat question

2011-02-22 Thread Daniel Harris
Hello Is it possible to get summary statistics (inc mean, sd etc) from a text file that has the following info stored in it? Height Frequency 123 5 124 8 125 3 126 9 127 7 etc etc

Re: [R] Species accumulation curves with differential sampling effort

2011-02-22 Thread Scott Chamberlain
Dear Jari, For what it's worth, I could see the need in my own work for species accumulation curves with variable sampling effort. Scott Chamberlain On Tuesday, February 22, 2011 at 2:26 AM, Jari Oksanen wrote: Vanessa Francisco vanewagen at gmail.com writes: Hello! I'm a PhD student

Re: [R] How to find points of intersection

2011-02-22 Thread Uwe Ligges
On 22.02.2011 12:27, FMH wrote: Dear All, I'm looking an appropriate way in R to compute/estimate points of intersection between a line and a curve and will really appreciate for any suggestion or ideas? Sounds like second level school homework. If not, please explain your problem in more

Re: [R] Transforming relational data

2011-02-22 Thread mathijsdevaan
The output for the new example should be: project v 1 0 2 0.5 3 1.5 4 0.5 The output you calculated was correct for the v per year, but the v per group would be incorrect. I think the problem lies in the fact that expand.grid(B,B) doesn't take into account that combinations of B can only

Re: [R] [r] align xyplot

2011-02-22 Thread Francesco Nutini
From: ui...@hotmail.it To: djmu...@gmail.com CC: r-help@r-project.org Subject: RE: [R] [r] align xyplot Date: Tue, 22 Feb 2011 12:23:55 + Hi Dennis and [R]users! as I said last week, I need more info about xyplot. Is it possible to change the color of the intestation of xyplot? By

Re: [R] Interpreting the example given by Prof Frank Harrell in {Design} validate.cph

2011-02-22 Thread Frank Harrell
I think it should be the negative of the first Dxy but this is all why the posting guide says to create the simplest self-defined example that shows the problem. That way I could run it and get to the bottom of this. See the help file for cph which has examples of simulating test data. Try to

Re: [R] question regarding basic stat question

2011-02-22 Thread Uwe Ligges
What about using read.table() and applying summary() on the result? Uwe Ligges On 22.02.2011 13:20, Daniel Harris wrote: Hello Is it possible to get summary statistics (inc mean, sd etc) from a text file that has the following info stored in it? Height Frequency 123

Re: [R] question regarding basic stat question

2011-02-22 Thread Bryan Hanson
Daniel, how is the data stored? The answer to your question may be as simple as df - read.csv(filename.csv) summary(df) See ?read.csv for info on reading various file formats. HTH, Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University 602 S. College

Re: [R] System of related regression equations

2011-02-22 Thread Viechtbauer Wolfgang (STAT)
What you are describing is a path model (e.g., http://bit.ly/f4siTs). You can fit such a model with the sem package (http://cran.r-project.org/web/packages/sem/index.html). Best, -- Wolfgang Viechtbauer Department of Psychiatry and Neuropsychology School for Mental Health and Neuroscience

Re: [R] problem installing R in Ubuntu 10.04 -HELP

2011-02-22 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/2011 02:33 PM, Mike Marchywka wrote: Date: Tue, 22 Feb 2011 11:12:26 +0100 From: r.m.k...@gmail.com To: graham.willi...@togaware.com CC: r-help@r-project.org Subject: Re: [R]

Re: [R] [r] align xyplot

2011-02-22 Thread Francesco Nutini
Sorry, I mean heading. Thanks for the tip. Francesco CC: djmu...@gmail.com; r-help@r-project.org From: dwinsem...@comcast.net To: ui...@hotmail.it Subject: Re: [R] [r] align xyplot Date: Tue, 22 Feb 2011 08:33:07 -0500 I don't know the term intestation, but from context it appears you

[R] cforest() and missing values (party package)

2011-02-22 Thread Florian Kiefer
Dear mailing list, I am using the cforest() method from the party package to train a randomForest with ten input parameters which sometimes contain NAs. The predicted variable is a binary decision. Building the tree works fine without warnings or error messages, but when using the predict()

Re: [R] problem installing R in Ubuntu 10.04 -HELP

2011-02-22 Thread Mike Marchywka
Date: Tue, 22 Feb 2011 11:12:26 +0100 From: r.m.k...@gmail.com To: graham.willi...@togaware.com CC: r-help@r-project.org Subject: Re: [R] problem installing R in Ubuntu 10.04 -HELP -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/2011

[R] Which function in R package Spatstat can help me to get the Cramer-von Mises statistic

2011-02-22 Thread Jeff Fang
Hi all, When I detect the spatial point pattern, I want to use the Cramer-von Mises statistic to assess the curve-wise significance of deviations from null hypotheses. Who can tell me which function in R package Spatstat can do this work? Thanks a lot Jeff [[alternative HTML version

Re: [R] [r] align xyplot

2011-02-22 Thread David Winsemius
I don't know the term intestation, but from context it appears you might need: ?trellis.par.set -- David. On Feb 22, 2011, at 7:23 AM, Francesco Nutini wrote: Hi Dennis and [R]users! as I said last week, I need more info about xyplot. Is it possible to change the color of the intestation

Re: [R] Calculate a mean for several months for several years

2011-02-22 Thread John Kane
--- On Tue, 2/22/11, D Kelly O'Day ko...@processtrends.com wrote: From: D Kelly O'Day ko...@processtrends.com Subject: Re: [R] Calculate a mean for several months for several years To: r-help@r-project.org Received: Tuesday, February 22, 2011, 12:21 AM Pete The original question I

Re: [R] Calculate a mean for several months for several years

2011-02-22 Thread D Kelly O'Day
Yes John My editing mistake. Thanks!! -- View this message in context: http://r.789695.n4.nabble.com/Calculate-a-mean-for-several-months-for-several-years-tp3318363p3319272.html Sent from the R help mailing list archive at Nabble.com. __

[R] Problem with forward prediction using StructTS output

2011-02-22 Thread David Crary
I am having problems with forward prediction using the output of the Basic Structural Model from StructTS. The following snippet illustrates the problem: t_end - 139 nahead - 20 data(AirPassengers) ap - log10(AirPassengers)-2 fit - StructTS(ts(ap[1:t_end], freq=12), type=BSM) p -

[R] Linear Regression on data from FRED

2011-02-22 Thread Stuart Snell
library(zoo) library(tseries) library(quantmod) #for access to FRED require(quantmod) require(TTR) secA - getSymbols(DEXUSEU,src=FRED) secB - getSymbols(DEXUSUK,src=FRED) secA - zoo(DEXUSEU[,1]) secB - zoo(DEXUSUK[,1]) t.zoo - merge(secA, secB, all=FALSE) t - as.data.frame(t.zoo) cat(Date

[R] nrow()

2011-02-22 Thread Sandra Stankowski
Hey there, I tried to count the number of rows, where my data isn't NaN in a certain column. this was my guess: (given is a data frame with 2069 rows and 17 cols) NROW(data[jan,16] != NaN) (jan is defined this way: jan - which(data[,2]==1, arr.ind= TRUE)) but I only get the number of

Re: [R] Plotting individual trajectories from individual growth model

2011-02-22 Thread Douglas Bates
On Mon, Feb 21, 2011 at 10:06 PM, dadrivr dadr...@gmail.com wrote: Thanks Dennis, The code works for perfectly for the data in the example.  For some reason, however, I get the following error message when I use a different data set: preds - expand.grid(age = c(30,36,42), Subject =

Re: [R] problem installing R in Ubuntu 10.04 -HELP

2011-02-22 Thread Mike Marchywka
Date: Tue, 22 Feb 2011 14:53:07 +0100 From: r.m.k...@gmail.com To: marchy...@hotmail.com CC: graham.willi...@togaware.com; r-help@r-project.org Subject: Re: [R] problem installing R in Ubuntu 10.04 -HELP -BEGIN PGP SIGNED MESSAGE-

[R] Weird error (special character) of read.table

2011-02-22 Thread John Edwards
Hi, I have the following input file. $ cat main.txt CEL_A CELL_B 1 4 2 5 2 6 Then I run read.table in R. f=read.table('main.txt', header=T, check.names=F, sep='\t') head(f) \ufeffCEL_A CELL_B 11 4 22 5 32 6 f$CEL_A NULL I'm not sure where the special character

Re: [R] nrow()

2011-02-22 Thread Erik Iverson
Sandra, Please provide a small, reproducible example of this issue. You probably want to use ?is.nan and not the inequality operator. Similar example, contrast: x - NA is.na(x) x == NA Sandra Stankowski wrote: Hey there, I tried to count the number of rows, where my data isn't NaN in a

Re: [R] [r] align xyplot

2011-02-22 Thread Peter Ehlers
On 2011-02-22 05:53, Francesco Nutini wrote: Sorry, I mean heading. Thanks for the tip. I'm not quite certain what you mean by heading, but it sounds to me as though you might want xyplot( ... your stuff ..., par.settings = list( strip.background = list(col =

Re: [R] nrow()

2011-02-22 Thread Peter Ehlers
?is.nan Peter Ehlers On 2011-02-22 07:11, Sandra Stankowski wrote: Hey there, I tried to count the number of rows, where my data isn't NaN in a certain column. this was my guess: (given is a data frame with 2069 rows and 17 cols) NROW(data[jan,16] != NaN) (jan is defined this way: jan-

Re: [R] nrow()

2011-02-22 Thread Mohamed Lajnef
Hi Sandra, What about ?is.na function ? Hope this help Regards, ML Le 22/02/11 16:11, Sandra Stankowski a écrit : NROW(data[jan,16] != NaN) -- Mohamed Lajnef,IE INSERM U955 eq 15# Pôle de Psychiatrie# Hôpital CHENEVIER

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread Duncan Murdoch
On 22/02/2011 10:43 AM, John Edwards wrote: Hi, I have the following input file. $ cat main.txt CEL_A CELL_B 1 4 2 5 2 6 Then I run read.table in R. f=read.table('main.txt', header=T, check.names=F, sep='\t') head(f) \ufeffCEL_A CELL_B 11 4 22 5 32 6

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread Jeff Newmiller
What you describe could be a bug (in which case providing your OS and R version info per the posting guidelines would be a minimum requirement to get it fixed) or a control character that is actually in your file (which you might need a binary editor to see).

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread Henrik Bengtsson
On Tue, Feb 22, 2011 at 7:43 AM, John Edwards jhnedwards...@gmail.com wrote: Hi, I have the following input file. $ cat main.txt CEL_A CELL_B 1 4 2 5 2 6 Then I run read.table in R. f=read.table('main.txt', header=T, check.names=F, sep='\t') head(f)  \ufeffCEL_A CELL_B 1    1      4

[R] image.plot results in different colors than legends

2011-02-22 Thread Manussawee Sukunta
To R community: I've been pulling my hair for the past few days over this issue now, and I may be at the point where I just can't spot my error. So I thought to reach out to the community and hope someone could kindly help me. I'm trying to create a correlation matrix and plot it. However, I'm

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread John Edwards
Thanks for all the people that replied my message. The text file indeed has \uFEFF. I have fixed the text file by using 'gvim -b'. On Tue, Feb 22, 2011 at 10:03 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: What you describe could be a bug (in which case providing your OS and R version

Re: [R] QuadTree

2011-02-22 Thread Kjetil Halvorsen
Did you try RSiteSearch(QuadTree) ? It does seem to give some hits. On Sun, Feb 20, 2011 at 7:54 PM, Jaimin Dave davejaim...@gmail.com wrote: Could any one tell me how to implement QuadTree in R? Or are there any packages avaialble to implement it in R.        [[alternative HTML version

Re: [R] nrow()

2011-02-22 Thread Erik Iverson
Sandra Stankowski wrote: is.na function does'nt seem to work, but maybe I'm just dealing with it in a wrong way. here's an example m - c(2, 3, 5, 6, 3, 7, -99, -99, 6) n - c(1,1,1,1,1,2,2,2,2) so my matrix contains certain missing values Thank you for the example. You're constructing

Re: [R] linear regression and t-distribution

2011-02-22 Thread Kjetil Halvorsen
did you try RSiteSearch(t-regression) ? That seems to give some usefull hits. On Mon, Feb 21, 2011 at 7:42 AM, Rosario Garcia Gil m.rosario.gar...@slu.se wrote: Hello I have a data set with outlier and it is not normally distributed. I would instead like to use a more robust distribution

Re: [R] Transforming relational data

2011-02-22 Thread Gabor Grothendieck
On Mon, Feb 14, 2011 at 12:22 PM, mathijsdevaan mathijsdev...@gmail.com wrote: Hi, I have a large dataset with info on individuals (B) that have been involved in projects (A) during multiple years (C). The dataset contains three columns: A, B, C. Example:   A  B  C 1 1  a  1999 2 1  b  

[R] help on ANOVA, please

2011-02-22 Thread netrunner
Dear all, I need to perform a two-way unbalanced ANOVA on my data set. The unbalancing is due to missing values (NA) for some subjects. My data set concerns the evaluation of 4 different prototypes tested by subjects three times and it is organized as follows (column by column): number of

Re: [R] linear regression and t-distribution

2011-02-22 Thread Peter Ehlers
On 2011-02-21 02:42, Rosario Garcia Gil wrote: Hello I have a data set with outlier and it is not normally distributed. I would instead like to use a more robust distribution like t-distribution. My question is if the coefficients of the regression are different from zero, but assuming a

Re: [R] question regarding basic stat question

2011-02-22 Thread Daniel Harris
Thanks for the replies The file is below Height Frequency 62 3 63 20 64 24 65 40 66 85 67 122 68 139 69 179 70 139 71 107 72 55 73 47 74 22 75 12 76 5 77 1 I use the following data - read.table(file,header=T)

Re: [R] nrow()

2011-02-22 Thread Sandra Stankowski
is.na function does'nt seem to work, but maybe I'm just dealing with it in a wrong way. here's an example m - c(2, 3, 5, 6, 3, 7, -99, -99, 6) n - c(1,1,1,1,1,2,2,2,2) so my matrix contains certain missing values m[m==-99] - NA o - data.frame(m, n) o m n 1 2 1 2 3 1 3 5 1 4 6 1 5

Re: [R] nrow()

2011-02-22 Thread Sandra Stankowski
Thanks. I made it! Best wishes, S. Am 22.02.2011 17:41, schrieb Erik Iverson: Sandra Stankowski wrote: is.na function does'nt seem to work, but maybe I'm just dealing with it in a wrong way. here's an example m - c(2, 3, 5, 6, 3, 7, -99, -99, 6) n - c(1,1,1,1,1,2,2,2,2) so my matrix

Re: [R] Generating uniformly distributed correlated data.

2011-02-22 Thread Erich Neuwirth
You do not need the regions with the double densities near the center (1/2,1/2), you can use just the parallel 45 degree borders in that region also. x-x |/*\\\| |---/***\\| |--/*\| |-/**/|

[R] Discrepancies in run times

2011-02-22 Thread Sébastien Bihorel
Dear R-users, I am in the process of creating new custom functions and am quite puzzled by some discrepancies in execution time when I run some R scripts that call those new functions. So here is the situation: - let's assume I have created two custom functions, called myg and myf; - myg is

Re: [R] formal concept analysis in R?

2011-02-22 Thread Kjetil Halvorsen
You could try install.packages(sos, dep=T) library(sos) h - finfFn(formal concept analysis) h but it does not seem to find anything relevant. On Wed, Feb 16, 2011 at 6:21 PM, Mark Heckmann mark.heckm...@gmx.de wrote: I am looking for an R package for formal concept analysis

Re: [R] Parzen fractional degree of differencing estimator

2011-02-22 Thread Kjetil Halvorsen
searching using library(sos) h - ???Parzen fractional estimator h leads to library(fracdiff) # on CRAN ?fdSperio On Wed, Feb 16, 2011 at 5:19 PM, Fologo Dubois fologodub...@yahoo.com wrote: Does R have a function for Parzen fractional degree of differencing estimator? I am referring to the

[R] identify an element in a column

2011-02-22 Thread Hongwei Dong
Hi, R users, I'm wondering if I can identify an element in a column by an element in another column. For example: x-1:10 y-11:20 z-cbind(x,y) z x y [1,] 1 11 [2,] 2 12 [3,] 3 13 [4,] 4 14 [5,] 5 15 [6,] 6 16 [7,] 7 17 [8,] 8 18 [9,] 9 19 [10,] 10 20 What I want to do is:

Re: [R] identify an element in a column

2011-02-22 Thread Erik Iverson
Is this what you mean? z[which(z[,x] == 5) - 1, y] ?which is probably what you're looking for... Hongwei Dong wrote: Hi, R users, I'm wondering if I can identify an element in a column by an element in another column. For example: x-1:10 y-11:20 z-cbind(x,y) z x y [1,] 1 11 [2,] 2

Re: [R] identify an element in a column

2011-02-22 Thread Dimitris Rizopoulos
try this: x - 1:10 y - 11:20 z - cbind(x, y) ind - x == 5 z[ind, y] - z[ind, y] - 1 z I hope it helps. Best, Dimitris On 2/22/2011 6:18 PM, Hongwei Dong wrote: Hi, R users, I'm wondering if I can identify an element in a column by an element in another column. For example: x-1:10

Re: [R] identify an element in a column

2011-02-22 Thread Jorge Ivan Velez
Hi Gary, Try transform(z, y = ifelse(x == 5, y-1, y)) HTH, Jorge On Tue, Feb 22, 2011 at 12:18 PM, Hongwei Dong wrote: Hi, R users, I'm wondering if I can identify an element in a column by an element in another column. For example: x-1:10 y-11:20 z-cbind(x,y) z x y [1,] 1

Re: [R] identify an element in a column

2011-02-22 Thread Joshua Wiley
Hi Gary, Another possibility besides Erik's (although I suspect his is what you are really after): ## easier way to data z - cbind(x = 1:10, y = 11:20) z[z[,x] == 5, y] - 1 ## To see what is going on, break it into pieces ## logical; does column 'x' of 'z' equal 5? z[, x] == 5 ## all values in

Re: [R] identify an element in a column

2011-02-22 Thread Ivan Calandra
Another way is with ifelse: z-data.frame(x,y) z$y2 - ifelse(z$x==5,z$y-1,z$y) HTH, Ivan Le 2/22/2011 18:27, Erik Iverson a écrit : Is this what you mean? z[which(z[,x] == 5) - 1, y] ?which is probably what you're looking for... Hongwei Dong wrote: Hi, R users, I'm wondering if I can

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread Prof Brian Ripley
And how to read a file with a BOM is actually discussed in detail in the 'R Data Import/Export' manual of 2.12.2 RC. What should be ASCII files with BOMs seem to be cropping up rather frequently these days: the recent culprits are Mac applications with origins on Windows (SPSS was one, some

Re: [R] Plot bivariate density with densities margins

2011-02-22 Thread Eduardo García Portugués
I found an easy way to do it using trans3d() and the transformation matrix. Maybe in the future somebody would ask about it: # For plotting the bivariate gaussian density library(mvtnorm) x-seq(-5,5,by=0.1) y-seq(-3,7,by=0.1) # Joint density f-function(x,y)

Re: [R] question regarding basic stat question

2011-02-22 Thread Peter Ehlers
On 2011-02-22 08:10, Daniel Harris wrote: Thanks for the replies The file is below Height Frequency 62 3 63 20 64 24 65 40 66 85 67 122 68 139 69 179 70 139 71 107 72 55 73 47 74 22 75 12 76 5 77 1 I use the

Re: [R] ROC from R-SVM?

2011-02-22 Thread Max Kuhn
The objects functions for kernel methods are unrelated to the area under the ROC curve. However, you can try to choose the cost and kernel parameters to maximize the ROC AUC. See the caret package, specifically the train function. Max On Mon, Feb 21, 2011 at 5:34 PM, Angel Russo

[R] odfWeave graphics glitch

2011-02-22 Thread Prof. John C Nash
Using R2.12.1 on Ubuntu 10.04.1 I've tried to run the following code chunk in odfWeave fig1, echo=TRUE,fig=TRUE,width=7,height=4= x-seq(1:100)/10 y-sin(cos(x/pi)) imageDefs - getImageDefs() imageDefs$dispWidth - 4.5 imageDefs$dispHeight- 4.5 setImageDefs(imageDefs) X11(type=cairo) plot(x,y)

Re: [R] image.plot results in different colors than legends

2011-02-22 Thread Manussawee Sukunta
By luck I was able to solve my own problem! (Big phw.) As a reference, I simple change my value of z in image.plot to be X[,n:1], where X = t(lower). Everything else remains the same. Cheers, Manussawee On Tue, Feb 22, 2011 at 10:03 AM, Manussawee Sukunta msuku...@illinoisalumni.org

Re: [R] difference in pairs ?

2011-02-22 Thread Vlatka Matkovic Puljic
Well, it should be difference by ID and TIME for q1: something like: for ID 1187 in TIME 1 q1=3 and TIME 2 (for same ID) q1=3 so diff would be 3-3=0 TIME ID q1 1 1187 3 1 1187 3 And I don't know how to make R to find pairs and calculate diff? 2011/2/21 Dennis

[R] Lacunarity in R

2011-02-22 Thread fernando del bon
Dear All, I would like any information about lacunarity analyis in R.  Does anyone know if the sliding-box lacunarity analysis of Allain and Cloitre (1991) or Plotnick et al. (1996) has been implemented by anyone in R?  Or any R package useful for that?  I have seen anything in R mail list

Re: [R] ROC from R-SVM?

2011-02-22 Thread Angel Russo
Hi Max and Andrew, Thanks so much for your reply. Indeed I found your link last night using steps shown below. My first question is if the following two steps are right and AUC is 51% as shown below. My seond question is that currently I am using cost parameter=1 (the default in R-SVM;

Re: [R] ROC from R-SVM?

2011-02-22 Thread Andrew Ziem
In addition's to Max's suggestion about caret, look at ROCR which visualizes ROC charts for any binary classifier. I have an example of e1071::SVN and ROCR here https://heuristically.wordpress.com/2009/12/23/compare-performance-machine-learning-classifiers-r/ -Original Message-

Re: [R] How to find points of intersection between harmonic function and a line

2011-02-22 Thread FMH
Hi, Sorry for the very short explanation about the problem of intersection. I have a wave function monitored from the heart beat in a particular interval of times. Apart fom that, there is a line with positive slope (e.g: y = x+2) which lies across the wave and intersect on a number of

[R] aggregate in R

2011-02-22 Thread Hongwei Dong
Hi, R users, I'm wondering how I can aggregate data in R with different functions for different columns. For example: x-rep(1:5,3) y-cbind(x,a=1:15,b=21:35) y-data.frame(y) I want to aggregate a and b in y by x. With a, I want to use function mean; with b, I want to use function sum. I tried:

Re: [R] How to find points of intersection

2011-02-22 Thread rex.dwyer
How is the curve defined? If the curve is y=f(x) and the line is y=mx+b, you look for the roots of f(x)-mx-b. ?polyroot ?uniroot -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of FMH Sent: Tuesday, February 22, 2011 6:28 AM To:

Re: [R] Discrepancies in run times

2011-02-22 Thread rex.dwyer
My surmise would be that you have not analyzed the situation correctly, and you are making a false assumption about your code. Since you can't show the code, it's pretty hard to figure out what that is. I think you're going to have to produce a simple example that you can share that has the

[R] How to find points of intersection between harmonic function and a line

2011-02-22 Thread FMH
Hi, Sorry for the very short explanation about the problem of intersection. I have a wave pattern monitored from the heart beat in a particular interval of times. Apart fom that, there is a line with positive slope (e.g: y = x+2) which lies across the wave and intersect on a number of

[R] How to find points of intersection between harmonic function and a line

2011-02-22 Thread FMH
Hi, Sorry for the very short explanation about the problem of intersection. I have a wave function monitored from the heart beat in a particular interval of times. Apart fom that, there is a line with positive slope (e.g: y = x+2) which lies across the wave and intersect on a number of

[R] how can I connect paired points within lattice bwplot?

2011-02-22 Thread Cory Champagne
Hello all, my first post to this list. I do a lot of experiments using a paired sampling design and I would get a lot of mileage out of figures like this, if I can make it work! Any advice would be appreciated. my email is: cory.champ...@gmail.com. Thanks! #define dummy variables and a

Re: [R] RCurl HTTP Post ?

2011-02-22 Thread Hasan Diwan
On 19 February 2011 07:24, Duncan Temple Lang dun...@wald.ucdavis.edu wrote: Do you mean that the R variable page gives information about the request error and contains the 500 error code? Not sure what you mean by screen here. Yes that's exactly what I mean Client-server

Re: [R] regsubsets {leaps}

2011-02-22 Thread fgg
I've tried grouping the real and imaginary parts as a single complex number, e.g. z1 - complex(real=r1, imaginary=i1) Although complex variables are not allowed in lm, I can run regsubsets just fine: z - cbind(z1, z2, z3, ..., z10) bestsubs - regsubsets(z, y, nbest=1, nvmax=5, intercept=T,

[R] Advice/suggestions on using a stacked barplot with zoo?

2011-02-22 Thread David Wolfskill
I'm not sure I'm using appropriate tools for what I'm trying to do; a reason for my lack of certainty is that I'm encountering difficulty with what I thought would be fairly simple: labeling the X axis of my graphs with human-readable timestamps. I'm using R 2.12.1, running in a FreeBSD

  1   2   >