Re: [R] how to automatically create objects with names from a string list?

2008-06-04 Thread Simon Blomberg
Or with mapply name - c(foo, bar, baz) val - 1:3 mapply(assign, name, val, pos=1) Cheers, Simon. On Tue, 2008-06-03 at 22:24 -0700, Moshe Olshansky wrote: You can use either assign or eval. Something like name - c(foo, bar, baz) for (i in 1:length(name)) assign(name[i],i) ---

Re: [R] merging two data sets with no column header

2008-06-04 Thread David Winsemius
Thanks for your reply. In your last step If I create a duplicate ( two similar records ) # create a duplicate vv[8,1] - 7 vv[8,2]-'g' and then I merge vv with vv2 ,both duplicates are merged. Is there a way to tell R to merge only the unique records. -- I don't think merge will do what

[R] ignoring environment value of R_HOME error when installing packages

2008-06-04 Thread tub78
I am troubled by what appears to be a glitch in the current distribution, or in its installation on our system. I've traced it, and found a work- around. Is this normal? Is there a cleaner solution? The problem: During a package installation, the warning message WARNING: ignoring

Re: [R] R-2.7.0 make check failure

2008-06-04 Thread Prof Brian Ripley
This indicates a serious problem with your build (a segfault). Unfortunately as R is very well tested on Linux and we have never seen this one reported, we have no clue as to why. You've told us very little (what architecture, what compilers?) so although it seems to be something specific to

Re: [R] unable to get plot in R

2008-06-04 Thread Prof Brian Ripley
On Tue, 3 Jun 2008, Duncan Murdoch wrote: On 03/06/2008 6:53 PM, Chin-Cheng Su wrote: Hi everyone, I use R to plot my data set (x,y) in Windows XP, but keep getting error message like follows, ... plot(x, y) Error in windows() : unable to start device devWindows How can I solve this

[R] problems with variogram

2008-06-04 Thread Laura Saltyte
Hello, I have data at 10 locations, in each location there are time series (T=56). Question is: when I’m fitting variogram what happens with those measures in each location? Are they taken as repeated measures? It's very important for my to know this Thanks a lot

Re: [R] Model simplification using anova()

2008-06-04 Thread Dieter Menne
ChCh jmo101 at student.canterbury.ac.nz writes: Hello all, I've become confused by the output produced by a call to anova(model1,model2). First a brief background. My model used to predict final tree height is summarised here: Df Sum Sq Mean Sq F value

[R] random time serie

2008-06-04 Thread jessica . gervais
Dear all, I would like to create an random time serie of POSIXct elements inside a certain range of dates and time. For example a sequences of date/time of 400 elements, randomly choosen, with all dates between 2002-12-01 and 2002-12-31 and all time between 07:00:00 and 23:00:00. Would anyone

Re: [R] matlab eigs function in R

2008-06-04 Thread Frede Aakmann Tøgersen
Thomas As far I can see eig (matlab) and eigen (R) both uses LAPACK as the engine, so no differences apart from rounding errors should be expected. You are not being particular friendly, since you have not told the whole story about how you use eigs in matlab (you are giving some options to

[R] missing data imputation - simulation

2008-06-04 Thread Birgitle
My dataset contains missing data and I would like to do something like an EM algorithm or a Markov Chain Monte Carlo approach to get rid of the missing data. Is there a function for imputation or simulation of missing data apart from those in the randomForest library? Thanks in advance Birgit

Re: [R] splitting data frame based on a criteria

2008-06-04 Thread Petr PIKAL
Hi the other possible option is to use split with suitable graphing technique or with lapply and appropriate function e.g. boxplot(split(X, Y0)) histogram( ~ X|Y) gives Marvin [EMAIL PROTECTED] napsal dne 03.06.2008 21:11:29: ?by may be helpful here eg if dat is your data.frame and yf is

[R] Odp: column and row

2008-06-04 Thread Petr PIKAL
Hi use str(object) to see what is a structure of object then use standard selecting by [..., ...] In your case you shall probably use extracting function coef(fit1)[1,] for the first row and similarly for the second. Regards Petr [EMAIL PROTECTED] 724008364, 581252140, 581252257 [EMAIL

[R] data frame titles

2008-06-04 Thread Chris Arthur
I'm new to R so please forgive the newbie question; but i can't seem to find a definitive answer to this. I am wanting to do a PLS regression on some data. Which takes a formula of the type responseACC ~ dataACC where dataACC is multivariate in nature and responseACC is a single value. I

Re: [R] missing data imputation - simulation

2008-06-04 Thread Chuck Cleland
On 6/4/2008 5:32 AM, Birgitle wrote: My dataset contains missing data and I would like to do something like an EM algorithm or a Markov Chain Monte Carlo approach to get rid of the missing data. Is there a function for imputation or simulation of missing data apart from those in the

Re: [R] missing data imputation - simulation

2008-06-04 Thread Ulrike Grömping
Birgit, not knowing your data, I would recommend R-package mice or function aregImpute from R-package Hmisc as good multi-purpose tools. Regards, Ulrike -- View this message in context: http://www.nabble.com/missing-data-imputation---simulation-tp17642736p17643601.html Sent from the R help

[R] A little test -- please forgive!

2008-06-04 Thread Ted Harding
Sorry for the noise -- but I want to see what happens to this message when it gets to tyhe archives. Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 04-Jun-08

Re: [R] missing data imputation - simulation

2008-06-04 Thread Birgitle
Many thenks to both of you: Will have a look. Birgit Chuck Cleland wrote: On 6/4/2008 5:32 AM, Birgitle wrote: My dataset contains missing data and I would like to do something like an EM algorithm or a Markov Chain Monte Carlo approach to get rid of the missing data. Is there a

[R] Comparing two regression lines

2008-06-04 Thread Christoph Scherber
Dear R users, Suppose I have two different response variables y1, y2 that I regress separately on the same explanatory variable, x; sample sizes are n1=n2. Is it legitimate to compare the regression slopes (equal variances assumed) by using lm(y~x*FACTOR), where FACTOR gets y1 if y1 is the

[R] Odp: data frame titles

2008-06-04 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 04.06.2008 10:57:26: I'm new to R so please forgive the newbie question; but i can't seem to find a definitive answer to this. I am wanting to do a PLS regression on some data. Which takes a formula of the type responseACC ~ dataACC where dataACC is

Re: [R] Minimizing the negative log likelihood function...

2008-06-04 Thread Karl Ove Hufthammer
François Aucoin: I have tried several R's functions for optimization but the results I yield are not correct. Is there anybody who can help me? I couldn't get it to estimate the correct values either, so I guess either your random number generator 'rkappa' is wrong, or your 'Neg.Log.Like'

[R] Using library in an example

2008-06-04 Thread Jim Lemon
Hi all, I've been trying to include a nice example in the Rd file for a function and cannot work out how to get it through R check. If I use: if(require(maps,quietly=TRUE)) { ... Warning message: 'Sys.putenv' is deprecated. Use 'Sys.setenv' instead. See help(Deprecated) The warning message

[R] not meaningful for factors

2008-06-04 Thread Philip Twumasi-Ankrah
I am trying to define groupings from levels of factor variables and this the warning message that R give not meaningful for factors. The nature of my task is this. I have a variable stage which has the levels (1B, 2A, 2B) - these are the AJCC TNM stages of cancer, and another variable

Re: [R] request: An array declarion problem

2008-06-04 Thread jim holtman
When I run your code, I get a different error: j=10; ss=150; r=array(0 , c( j , ss )); rr=array(0 , c( j , ss )); r1=array(0 , c( j-1 , ss )); r2=array(0 , c( j-1 , ss )); r3=array(0 , c( 2 , ss )) for(i in 1:j-1){ +r1[ i , ] - r[ j+1, ]-r[ j, ]; r2[ i , ] - rr[ j+1,

Re: [R] not meaningful for factors

2008-06-04 Thread jim holtman
What exactly are you trying to do? In the first case you are making a logical comparison and that is legal for . In the second you are trying to do a logical operation () between two factors and that operation is not defined. This is what the error message is saying. Also you first attempt is

Re: [R] Using library in an example

2008-06-04 Thread Duncan Murdoch
On 6/4/2008 8:09 AM, Jim Lemon wrote: Hi all, I've been trying to include a nice example in the Rd file for a function and cannot work out how to get it through R check. If I use: if(require(maps,quietly=TRUE)) { ... Warning message: 'Sys.putenv' is deprecated. Use 'Sys.setenv' instead.

Re: [R] not meaningful for factors

2008-06-04 Thread Philip Twumasi-Ankrah
It works. Thanks Jim. I guess this will be a lots of coffee morning kinda day. jim holtman [EMAIL PROTECTED] wrote: What exactly are you trying to do? In the first case you are making a logical comparison and that is legal for . In the second you are trying to do a logical operation ()

Re: [R] problems with variogram

2008-06-04 Thread Jon Olav Skoien
Laura Saltyte wrote: Hello, I have data at 10 locations, in each location there are time series (T=56). Question is: when I’m fitting variogram what happens with those measures in each location? Are they taken as repeated measures? It's very important for my to know this Thanks a lot Hi

Re: [R] Comparing two regression lines

2008-06-04 Thread John Fox
Dear Christoph, If I've understood properly what you intend to do, no, it doesn't make sense. I assume from your description that you don't have two independent samples, but rather you really have n observations and that the variables x, y1, and y2, are measured on the same individuals. If that's

[R] sum of unknown number of matrices

2008-06-04 Thread Shubha Vishwanath Karanth
Hi R, I have a list of matrices. I need to get the sum of all the matrices in the list. Example: a=b=c=d=matrix(1:4,2,2) l=list(a,b,c,d) I need: a+b+c+d [,1] [,2] [1,]4 12 [2,]8 16 Something like do.call(+,l) is not working...why is this? I may not

Re: [R] boxplot with text and symbols on x

2008-06-04 Thread Birgit Lemcke
Thanks Greg. A useful solution. Birgit Am 02.06.2008 um 23:13 schrieb Greg Snow: An alternative way to draw the symbols (or some approximation of them) is to use the my.symbols function from the TeachingDemos package along with ms.male and ms.female (or your improvement of these, also

Re: [R] sum of unknown number of matrices

2008-06-04 Thread Dimitris Rizopoulos
try a simple for loop, it will be fast enough in this case, e.g., matSums - function (lis) { out - array(data = 0, dim = dim(lis[[1]])) for (i in seq(along = lis)) out - out + lis[[i]] out } a - b - c - d - matrix(1:4, 2, 2) l - list(a, b ,c, d) matSums(l) I hope it helps.

Re: [R] sum of unknown number of matrices

2008-06-04 Thread Barry Rowlingson
Shubha Vishwanath Karanth wrote: I need: a+b+c+d [,1] [,2] [1,]4 12 [2,]8 16 Something like do.call(+,l) is not working...why is this? Because do.call constructs a function call with the elements of l as arguments, so you end up with: +(1:4, 1:4, 1:4, 1:4) but

Re: [R] sum of unknown number of matrices

2008-06-04 Thread John Fox
Dear Shubha, This problem was coincidentally used as an illustration in the Help Desk column in the current R News. Actually, the brute-force method of using a loop to accumulate the sum works quite well; a more elegant alternative, recently brought to my attention by Kurt Hornik, uses the

Re: [R] sum of unknown number of matrices

2008-06-04 Thread Shubha Vishwanath Karanth
Thanks all...Reduce() is the new function I learnt today... Thanks... BR, Shubha Shubha Karanth | Amba Research Ph +91 80 3980 8031 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com -Original Message- From: Barry Rowlingson

Re: [R] sum of unknown number of matrices

2008-06-04 Thread Berwin A Turlach
G'day Shubha, On Wed, 4 Jun 2008 20:23:35 +0530 Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Something like do.call(+,l) is not working...why is this? Well, as the error message says, + is either a unary or a binary operator, i.e. it takes either one or two arguments, but not more. I

[R] Constructing groupedData objects in nlme - a little problem

2008-06-04 Thread Toby Marthews
Dear R-help, I am trying to create groupedData objects using the nlme library. I'm missing something basic, I know: Here is the first example in ch.1 of Pinheiro Bates (2000): library(nlme) x2=Rail$travel;x1=Rail$Rail;eg1=data.frame(x1,x2);eg1gd=Rail print(eg1gd) x11();print(plot(eg1gd))

Re: [R] wildcard symbol or character

2008-06-04 Thread john.polo
Bill Venables responded and got me what i wanted with this: [EMAIL PROTECTED] wrote: cv - scan( textConnection(CW-W730 CW-W720 CW-W710 CW-W700 CW-W690 CW-W680 CW-W670 CW-W660 CE-W997 CE-W987 CE-W977 CE-W967 CE-W956 CE-W944 CE-W934 CE-W924 7W-W760

[R] mathematical expression of probability function?

2008-06-04 Thread J S
Dear R forum, I have a concern regarding a mathematical expression of the probability function (see below). I know how to write it for only one index i, but we have two : i (country) and j (year). We have a set of N observations of country year ij (or ith country in jth year). Basically, I

Re: [R] Constructing groupedData objects in nlme - a little problem

2008-06-04 Thread Hank Stevens
HI Toby, I think that the problem is that you have not specified using Rail and travel in the model statement, but rather are still using x1 and x2. It also does not realize that you want x1 to be a factor. Try x1=factor(c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6))

Re: [R] how to automatically create objects with names from a string list?

2008-06-04 Thread Greg Snow
Mark, Others have given answers to the question that you asked, in the spirit of fortune(108) I am going to answer some of the questions that you should have asked: Q1: Should I ever do this? Short answer: No Less short answer: probably not Longer answer: You should only do this once you fully

Re: [R] Constructing groupedData objects in nlme - a little problem

2008-06-04 Thread Dieter Menne
Toby Marthews Toby.Marthews at lsce.ipsl.fr writes: Dear R-help, I am trying to create groupedData objects using the nlme library. I'm missing something basic, I know: Here is the first example in ch.1 of Pinheiro Bates (2000): ... ...but, as you can see, the coefficients I get at

Re: [R] Constructing groupedData objects in nlme - a little problem

2008-06-04 Thread Hank Stevens
Hi Dieter, I never really used groupedData objects at all. I can imagine that if you become even more immersed in nlme and lattice, groupedData could reduce your typing, and sometimes simplify your life, but it was not a hurdle I chose willingly. Hank On Jun 4, 2008, at 1:15 PM, Dieter

[R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data, normalized to unit circle x - jitter(seq(-2*pi, 2*pi,

Re: [R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
On Wednesday 04 June 2008, Dylan Beaudette wrote: Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data,

[R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data, normalized to unit circle x - jitter(seq(-2*pi, 2*pi,

[R] Creating a simple Radar/Spider Plot from Statgraphics

2008-06-04 Thread Albert Crosby
I'm new to R - and trying to create a plot similiar to the spider plot at http://www.statgraphics.com/eda.htm#radar . I can't figure out several things... most of which I would think would be straightforward How can I change the lines for each series plotted instead of creating a filled

[R] possible bug in flexclust

2008-06-04 Thread Gary Lewis
Hi - Writing to see if someone can suggest whether a problem warrants a bug report. It concerns the use of stepFlexclust in the flexclust package. The problem concerns the size of clusters returned. Versions: R-2.7.0 on Windows XP; RODBC_1.2-3 code snippet: r8 -

[R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-04 Thread Jim Price
My apriori apologies if this is felt to be the wrong list for this issue - although it starts with R, it's a combination of programs that creates the problem. Currently we are using windows metafile format for in-text tables for reports created in Word. However, we've discovered some artifactual

[R] dotchart

2008-06-04 Thread Nair, Murlidharan T
I am trying to plot the following data using dotchart intersect.data-structure(list(X = structure(c(1L, 3L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 2L, 4L, 5L, 6L, 7L), .Label = c(1-100, 1001-1100, 101-200, 1101-1200, 1201-1300, 1301-1400, 1401-1500, 201-300, 301-400, 401-500, 501-600, 601-700,

Re: [R] merge two data sets

2008-06-04 Thread kayj
since they are not in data1 , I do not want them to be in the merge result. Moshe Olshansky-2 wrote: Where do you want to place ID's which are in data2 but NOT in data1? --- On Wed, 4/6/08, kayj [EMAIL PROTECTED] wrote: From: kayj [EMAIL PROTECTED] Subject: [R] merge two data sets

Re: [R] merging two data sets with no column header

2008-06-04 Thread kayj
Thanks a lot for your help, I appreciate it. David Winsemius wrote: Thanks for your reply. In your last step If I create a duplicate ( two similar records ) # create a duplicate vv[8,1] - 7 vv[8,2]-'g' and then I merge vv with vv2 ,both duplicates are merged. Is there a way

Re: [R] [Rd] An issue happens Embed R and redirt png file

2008-06-04 Thread Dirk Eddelbuettel
Wrong list, so re-directing to r-help. Consider r-sig-debian for Debian questions too, but subscribe or else your posts bounce. On 4 June 2008 at 07:18, Rongrong wrote: | | I am a new R user and I have a question of embedding R to generate png | On Debian, I installed R by source code. | |

Re: [R] dotchart

2008-06-04 Thread Nair, Murlidharan T
Thanks! I put the labels as follows dotchart(as.matrix(intersect.data[-1]), labels=intersect.data[,1], cex=0.8) Murli From: Henrique Dallazuanna [EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 1:49 PM To: Nair, Murlidharan T Cc: r-help@r-project.org

[R] ggplot questions

2008-06-04 Thread Thompson, David (MNR)
Hello, A few questions about the following examples: 1. Why do the two plotting versions not produce the same result? 2. Is the 'scale_x_continuous' (or *_y_* or *_*_discrete) geom the best way to setup grids (as in visual guide-lines) in polar (or for that matter, any) coordinate system? 3. Why

Re: [R] How to solve a non-linear system of equations using R

2008-06-04 Thread Ravi Varadhan
Jorge, You can use the package BB to try and solve this problem. I have re-written your functions a little bit. # -- # Constants # -- l=1 m=0.4795 s=0.4795 # -- # Functions to estimate f_i-k_i #

[R] converting a table to a dataframe or a matrix

2008-06-04 Thread markleeds
can someone show me how to convert a table to a data.frame or a matrix ? I tried below and as.data.frame rearranges the columns similarly to a melt from reshape and as.matrix didn't change it. I actually would prefer to change it to a dataframe but if someone can show me how to convert it to a

Re: [R] converting a table to a dataframe or a matrix

2008-06-04 Thread Henrique Dallazuanna
Hi Mark, Try this: as.data.frame.matrix(temp) or as.data.frame(unclass(temp)) On Wed, Jun 4, 2008 at 4:20 PM, [EMAIL PROTECTED] wrote: can someone show me how to convert a table to a data.frame or a matrix ? I tried below and as.data.frame rearranges the columns similarly to a melt from

Re: [R] converting a table to a dataframe or a matrix

2008-06-04 Thread Gabor Grothendieck
Either of these will do it: head(temp, Inf) class(temp) - matrix On Wed, Jun 4, 2008 at 3:20 PM, [EMAIL PROTECTED] wrote: can someone show me how to convert a table to a data.frame or a matrix ? I tried below and as.data.frame rearranges the columns similarly to a melt from reshape and

[R] Reading selected lines in an .html file

2008-06-04 Thread vittorio
Dear friend, In an R program running permanently on a server I would like to read hour by hour the temperature in *C and the humidity from a site like this (actually, from many of such sites): http://www.wunderground.com/global/stations/16239.html How can I read the content of the site and

Re: [R] Lattice book

2008-06-04 Thread vittorio
Il Thursday 01 May 2008 01:07:13 Charilaos Skiadas ha scritto: Actually it's been out for a couple of weeks now at least. I just finished my first reading of it, and I must say it was spectacular. Congratulations Deepayan, the book gave me exactly the kind of lattice knowledge I needed, and

Re: [R] Packfor library-problem downloading

2008-06-04 Thread tub78
Jubilo, I believe we have the same problem. For a hacky solution, please see my post http://groups.google.com/group/r-help-archive/browse_thread/thread/bbd4ef5857dc99ef - Stu On May 22, 11:05 am, Jubilo [EMAIL PROTECTED] wrote: Hello, I'm a new user to R, and I was trying to install

[R] problem pasting into Illustrator CS2

2008-06-04 Thread Courtney Lee Meier
To Whom it May Concern: I have been using R version 2.6.2 for awhile now, installed on a PowerMac G5 running OS 10.4.11 I typically get Quartz graphics output from R into Adobe Illustrator CS2 simply by copying and pasting. Upon upgrading to R version 2.7.0, I now receive an error from

[R] array of arrays

2008-06-04 Thread Michael Prince
Dear R users, I want to calculate the bias and variance of an estimator for several values of two parameters a and b. For example : b1 b2 a1 bias bias variance variance a2 bias bias variance variance Can one do array of arrays ? I have tried and it did not

[R] Superscript/Subscript in main title

2008-06-04 Thread Tariq Perwez
I have been trying to figure out how to get superscript/subscript in the main title for a plot. I have tried various approaches and suggestions but none of them work. I am trying to get the following as the main title of my plot: Emission of CO2 with time (but note that 2 is subscript.) I have

Re: [R] Superscript/Subscript in main title

2008-06-04 Thread Henrique Dallazuanna
Try this: plot(1:10, main = expression(Emission~of~CO[2]~with~time)) On Wed, Jun 4, 2008 at 5:31 PM, Tariq Perwez [EMAIL PROTECTED] wrote: I have been trying to figure out how to get superscript/subscript in the main title for a plot. I have tried various approaches and suggestions but none

Re: [R] Superscript/Subscript in main title

2008-06-04 Thread Christoph Meyer
Hi Tariq, try: plot(x,y,main=expression(Emission of CO[2]* with time)) Cheers, Christoph Wednesday, June 4, 2008, 10:31:08 PM, you wrote: I have been trying to figure out how to get superscript/subscript in the main title for a plot. I have tried various approaches and suggestions but

Re: [R] merging two data sets with no column header

2008-06-04 Thread Henrique Dallazuanna
Perhaps something about like this: merge(vv[-c(which(duplicated(vv))-1, which(duplicated(vv))),], vv2, by=1) On Wed, Jun 4, 2008 at 3:08 PM, kayj [EMAIL PROTECTED] wrote: Thanks a lot for your help, I appreciate it. David Winsemius wrote: Thanks for your reply. In your last

[R] linear model with the repeated data type~

2008-06-04 Thread Manli Yan
here is the data: y-c(5,2,3,7,9,0,1,4,5) id-c(1,1,6,6,7,8,15,15,19) t-c(50,56,50,56,50,50,50,60,50) table1-data.frame(y,id,t)//longitudinal data the above is only part of data. what I want to do is to use the linear model for each id ,then get the estimate value,like:

Re: [R] linear model with the repeated data type~

2008-06-04 Thread Henrique Dallazuanna
Try this: f - function(x)any(is.na(coefficients(x))) models - by(table1[c(y, t)], table1$id, FUN=lm) models[!unlist(lapply(models, f))] On Wed, Jun 4, 2008 at 6:20 PM, Manli Yan [EMAIL PROTECTED] wrote: here is the data: y-c(5,2,3,7,9,0,1,4,5) id-c(1,1,6,6,7,8,15,15,19)

Re: [R] problem pasting into Illustrator CS2

2008-06-04 Thread Dr. Christoph Scherber
Dear Courtney, Are you exporting the graphs as postscript files? This is the usual way I do it when moving graphs between R and Illustrator CS2. I´m afraid I do not have a Mac, but I suppose CS2 runs similarly on both systems. Best wishes Christoph To Whom it May Concern: I have been using

[R] using as.POSIXlt on multiple columns or multiple objects

2008-06-04 Thread Farrel Buchinsky
If I want to convert one column to date and time format that R can understand and manipulate then I would do this initial$Started-as.POSIXlt(initial$Started) But what happens if I have many such columns and I do not want to have my code be stuffed with 10 similar lines (one for each variable aka

Re: [R] surprising predicting capabilities

2008-06-04 Thread Ted Harding
On 03-Jun-08 16:16:13, chaogai wrote: Hi, I noticed the following fortune in R 2.7 and 2.6.2: fortune('Spreads') If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A Graph That Looks Like Anything From A Spreadsheet. -- Ted Harding (in a discussion about

Re: [R] array of arrays

2008-06-04 Thread Yasir Kaheil
Is it possible to have one array for bias and one for variance? such as.. biasAr= b1 b2 a1 biasbias a2 biasbias and varAr= b1 b2 a1 var var a2 var var then you can combine the two in a data frame? thanks y Michael Prince wrote: Dear R users, I

[R] create many variables at one time~

2008-06-04 Thread Manli Yan
I need to create 100 variable ,whose name is id.1,id.2id.100 then I need to let a vector say id-c(id.1,id.2id.100) any easy way to do this? thanks a lot~ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] create many variables at one time~

2008-06-04 Thread Henrique Dallazuanna
Try this: for(i in 1:100)assign(sprintf(id.%d, i), value = sample(1)) id - ls(patt = id.[0-9]) On Wed, Jun 4, 2008 at 7:52 PM, Manli Yan [EMAIL PROTECTED] wrote: I need to create 100 variable ,whose name is id.1,id.2id.100 then I need to let a vector say id-c(id.1,id.2id.100) any

[R] do multiple anova tests

2008-06-04 Thread yabado
Hi I think my question might be answered before but i can't find the correct one. Here is the question. I have a data frame from a csv file which contains about 30 variables. lit is like this. (the values are just number I arbitrary created here) id group calorie weight height bmi

Re: [R] trouble installing Rmpi on 64-bit Ubuntu 8.04 with openmpi

2008-06-04 Thread tub78
The problem here is that the compiler cannot find the include files for mpi. Notice that the first checks that fail are: checking mpi.h usability... no checking mpi.h presence... no checking for mpi.h... no One solution is to create a file named ~/.R/Makevars with the following line:

Re: [R] ignoring environment value of R_HOME error when installing packages

2008-06-04 Thread tub78
This bug has been resolved, after our administrator updated the path of R_HOME in our scripts. I believe that the cause of trouble was the parallel nature of the installation, as mentioned in the following thread: http://groups.google.com/group/r-help-archive/browse_thread/thread/632175125a7c4

[R] ARS function

2008-06-04 Thread rhead
I am having problem calling ars function in ARS package. My parameter domain does not have upper bound or lower bound, so I did not givevalues to parameters ubx,lbx. But it keeps telling me the starting values I provided didn't have value to the left or to the right of the mode of the target

[R] merging 3 data sets at once

2008-06-04 Thread kayj
Hi All, I am looking into merging 3 data sets I know how to do that by merging data1 with data2 and then merging the result with data 3. I was wondering if it can be done all at once so I tried, M-merge(data1,data2,data3, by=”ID”) It does not work! Any ideas? -- View this message in

[R] Survey: Commercial R companies

2008-06-04 Thread Gregory Warnes
Hello Everyone, In preparation for an upcoming talk, I would like to assemble a list of companies that provide consulting, services, products, or training for R. I am already aware of a number of such companies including (in alphabetical order): BlueReference http://inference.us

[R] quite complicated case(the repeated data arranage~)

2008-06-04 Thread Manli Yan
Hi everyone: I have been struggling with this repeated data type for whole afternoon,I sent two emails to server for help,many people kindly responded , hereby thank you so much,but since I dont want to write to much in email,so I divide the problem in parts,so far this seem did not work out

[R] nls() newbie convergence problem

2008-06-04 Thread Bernard Leemon
I'm sure this must be a nls() newbie question, but I'm stumped. I'm trying to do the example from Draper and Yang (1997). They give this snippet of S-Plus code: Specify the weight function: weight - function(y,x1,x2,b0,b1,b2) { pred - b0+b1*x1 + b2*x2 parms - abs(b1*b2)^(1/3) (y-pred)/parms }

[R] using barchart in lattice package and conditioning

2008-06-04 Thread markleeds
I have the data structure below and I'm attempting to send it into barchart using the R code below it. I don't get an error but I don't get any output either. Deepyan's new Lattice book is amazing and there are some examples sort of similar to what i'm doing but I couldn't see a way of using

[R] warning message for lmer model with poisson family

2008-06-04 Thread arams
Hello, I'm trying to run an lmer model with family poisson but receive the following warning message: model-lmer(count~tem+dat+alt+year+tem:dat+tem:alt+tem:year+dat:alt+dat:year+alt:year+(1|id),family=poisson) Error in objective(.par, ...) : Leading minor of order 2 in downdated X'X is not

Re: [R] merging 3 data sets at once

2008-06-04 Thread William Pepe
I could suggest merge(merge(data1,data2), data3). However, one problem I notice is that is assigns age=12 and gender=M to everyone with id=1, and so on. How are we to know that person with id=1 in data1 is the same person with id=1 in data2 and data3? Bill Date: Wed, 4 Jun 2008 16:24:04

Re: [R] merging 3 data sets at once

2008-06-04 Thread William Pepe
By the way, I used age and gender as examples. Plus, I've seen something very similar posted a while ago. If the problem I listed isn't an issue, then that code will work. Best, Bill From: [EMAIL PROTECTED]: [EMAIL PROTECTED]; [EMAIL PROTECTED]: RE: [R] merging 3 data sets at onceDate:

Re: [R] nls() newbie convergence problem

2008-06-04 Thread Katharine Mullen
dydata x1 x2 y 1 9 27 248 2 9 22 213 3 4 23 190 4 11 16 183 5 -6 25 144 6 11 14 169 7 -4 13 72 8 2 8 73 9 10 13 156 10 8 30 263 11 12 10 147 12 -7 5 -2 13 0 10 75 14 12 0 77 15 9 8 115 16 12 24 245 17 34 23 370 18 12 1 84 19 10 37 324 20 26 30 371 weight -

[R] sorting the data~

2008-06-04 Thread Manli Yan
id-c(1,1,1,1,3,3,3,7,7,7,7,11,11,11) how to sort this kind of data to id:(1,1,1,1,2,2,2,3,3,3,3,4,4,4.) thanks~ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] merging 3 data sets at once

2008-06-04 Thread Ben Bolker
Not following this very carefully, but today I did something similar with Reduce(merge,list(d1,d2,d3)) ... __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] sorting the data~

2008-06-04 Thread Erik Iverson
Are these the ranks of the data? help.search(rank) Manli Yan wrote: id-c(1,1,1,1,3,3,3,7,7,7,7,11,11,11) how to sort this kind of data to id:(1,1,1,1,2,2,2,3,3,3,3,4,4,4.) thanks~ [[alternative HTML version deleted]]

Re: [R] sorting the data~

2008-06-04 Thread Manli Yan
no,the id is variable of a table,such as: treatment id age response low 1 50 20 low 1 60 30 high5 50 30 high5 60 40 ... I want to rearranage the table according the id (increasing),since id is not strictly from 1~n,it is in

Re: [R] create many variables at one time~

2008-06-04 Thread Jorge Ivan Velez
Try also, id- paste('id.',1:100,sep=) HTH, Jorge On Wed, Jun 4, 2008 at 6:52 PM, Manli Yan [EMAIL PROTECTED] wrote: I need to create 100 variable ,whose name is id.1,id.2id.100 then I need to let a vector say id-c(id.1,id.2id.100) any easy way to do this? thanks a lot~

Re: [R] wildcard symbol or character

2008-06-04 Thread john.polo
Jorge Ivan Velez wrote: Dear John, Assuming that your information is in the list x, does substr(x,1,2) work for you? HTH, Jorge Jorge, i tried split(rtt, substr(rtt,1,3)) and that worked also. (i didn't think to nest it when you first suggested it.) i just have to clean up the levels

Re: [R] create many variables at one time~

2008-06-04 Thread Greg Snow
An easy and good way to make a bunch of variables is to store them in a list. For example: mylist - replicate(100, sample(1:100, 10), simplify=FALSE) id - paste('id.',1:100, sep='') names(mylist) - id sapply(mylist, median) id.1 id.2 id.3 id.4 id.5 id.6 id.7 id.8 id.9

Re: [R] quite complicated case(the repeated data arranage~)

2008-06-04 Thread Greg Snow
For the first question, what do you want to do with all the subsets? There are tools like split, by, lapply, lmList, etc. that make working with all the subsets easy. If you tell us what your final goal is, we may be able to help with a simple solution that does not need the intermediate

Re: [R] using barchart in lattice package and conditioning

2008-06-04 Thread Steven McKinney
Hi Mark, I get output, after a while, and reams of it. Very likely not what you wanted. Can you describe what you are trying to see in barcharts for these data? It's not obvious to me from the code below. Best Steve McKinney -Original Message- From: [EMAIL PROTECTED] on behalf of

Re: [R] warning message for lmer model with poisson family

2008-06-04 Thread Steven McKinney
Looks like you have some independent variables in your model that correlate perfectly so your design matrix is not of full rank, probably because your independent variable data is not balanced. Does a simpler fit such as model-lmer(count~tem+(1|id),family=poisson) give you a result? You might

Re: [R] sorting the data~

2008-06-04 Thread ctu
id-c(1,1,1,1,3,3,3,7,7,7,7,11,11,11,2,2,2,4,4,4,4,8,8,8) sort(id) [1] 1 1 1 1 2 2 2 3 3 3 4 4 4 4 7 7 7 7 8 8 8 11 11 11 Quoting Manli Yan [EMAIL PROTECTED]: no,the id is variable of a table,such as: treatment id age response low 1 50 20 low

Re: [R] linear model in the repeated data type~

2008-06-04 Thread Manli Yan
hi:lot thanks,how to use list to extract,I type allFit$coefficents,it came to nothing, such as I need to extract the estimates,how to do it by using list 2008/6/3 Austin, Matt [EMAIL PROTECTED]: How about library(nlme) allFits - lmList(y ~ t|id, data=table1, pool=FALSE) or allFits -

  1   2   >