Re: [R] estimating parameters

2006-05-11 Thread saira hashmi
Hi , I have a data set and I am trying to get the nonlinear least-squares estimates of the nonlinear model parameters . I have tried nls, gls but seems like i am not able to get it to work. I have attached the data set. This is how I am doing. plz lemme knwo how to get it to work Thanks mlo.1 -

Re: [R] R more Unix-like?

2006-05-11 Thread Robert Citek
On May 10, 2006, at 10:40 PM, Gabor Grothendieck wrote: Try this on Windows or the corresponding ls command on UNIX: readLines(pipe(cmd /c dir)) I tried this from within R: readLines(pipe(bash -c ls)) and this from the command line: $ echo 'readLines(pipe(bash -c ls))' | R -q

Re: [R] Keeping scientific format on assignment

2006-05-11 Thread Bjørn-Helge Mevik
Joe Byers wrote: For example, the box.test object has a p-value of 2e-14 when I do a-box.test.object$p-value; a; the value of a is 0 not 2e-14. The _value_ is still 2e-14 (up to machine precision). How do I keep the precision and format of the p-value. You can format p-values in different

Re: [R] Contour plot overlayed with line plot

2006-05-11 Thread Roger Bivand
On Wed, 10 May 2006, Jonathan Greenberg wrote: Duncan (and others): I figured it out (thank you!), I ended up doing a contour(interp(x,y,z)), and I did figure out lines(), but I can't get the output of lines to sync with the proper coordinates of the contour() output (its overlaying

[R] Please help me to combine two datasets.

2006-05-11 Thread Arun Kumar Saha
Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date

Re: [R] Please help me to combine two datasets.

2006-05-11 Thread ronggui
?merge maybe is what you want. 2006/5/11, Arun Kumar Saha [EMAIL PROTECTED]: Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight

Re: [R] Please help me to combine two datasets.

2006-05-11 Thread Sean O'Riordain
merge(data.set.1, data.set.2) but how do I know which rows to drop in ds1? if data.set.2 had dates, you could say merge(data.set.1, data.set.2, by.x=Date, by.y=Date, all=T) or do you just want to drop the first length(data.set.1)-length(data.set.2) from data.set.1? do you have NA values?

[R] data input strategy - lots of csv files

2006-05-11 Thread Sean O'Riordain
Good morning, I have currently 63 .csv files most of which have lines which look like 01/06/05,23445 Though some files have two numbers beside each date. There are missing values, and currently the longest file has 318 rows. (merge() is losing the head and doing runaway memory allocation - but

Re: [R] Using DBI and RMySQL

2006-05-11 Thread Indrajit Sengupta
Did you create RMySQL windows binary in the process? Can you share it with me? Regards, Indrajit --- Robert Citek [EMAIL PROTECTED] wrote: On May 9, 2006, at 6:55 AM, Indrajit Sengupta wrote: I am having a bit of problem using the DBI and RMySQL package. I have already installed DBI

[R] package update problem

2006-05-11 Thread Xiaohua Dai
Hi all, From late April, everytime when I update my packages, the package gap is always on the list of packages to be updated. I try to download and install the gap zip file from CRAN. However, the same problem still remains. No such problem for other packages. Sys.info()

Re: [R] Please help me to combine two datasets.

2006-05-11 Thread Sean O'Riordain
Hi Arun, so to clarify: you want to drop the first length(data.set.1)-length(data.set.2) rows... so you might say... new.ds1 - data.set.1[(-(length(data.set.1)-length(data.set.2)),] and then add a new column... new.ds.combined - cbind(new.ds1, data.set.2) cheers, Sean On 11/05/06, Arun

Re: [R] metaphoRs - was Can't there be a cd command?

2006-05-11 Thread Barry Rowlingson
Robert Citek wrote: Because of that, I would say R is more like a helicopter, a HUEY perhaps. I vote for unicycle. I've seen people race, skip, climb stairs, go up mountains, dance and even play hockey on unicycles. But when I get on one, all I can do is fall off. I know all these other

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Michael Dondrup
Hi, if you would use a list, to collect (append) all your data.frames from read.csv, you don't have to compute variable names like a1...a66, just iterate over contents of the list. By using function dir, you can read all files in a directory in a loop. Michael Am Thursday 11 May 2006 10:03

Re: [R] package update problem

2006-05-11 Thread Prof Brian Ripley
This is because package gap used to be bundle gap. You need to remove the packages that were previously part of the bundle. If you don't know what those are, ask the maintainer. On Thu, 11 May 2006, Xiaohua Dai wrote: Hi all, From late April, everytime when I update my packages, the

[R] Break Matrix

2006-05-11 Thread SUMANTA BASAK
Hi All, I have a (331*12) matrix. I wan t to braek it into 28 parts each window having 12 rows, so that each matrix become (12*12) matrix. How can i do this. Thanks, Sumanta. - Send instant messages to your online friends - NOW

[R] (no subject)

2006-05-11 Thread angelare
Good morning, i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i get 10 groups each containing 3 sub-bars. I need to change the range of the y-axis when i plot respectively the first and the other two sub-bars in each group. I can't manage. Could you help me? Thank you.

Re: [R] (no subject)

2006-05-11 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Good morning, i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i get 10 groups each containing 3 sub-bars. I need to change the range of the y-axis when i plot respectively the first and the other two sub-bars in each group. I can't manage.

Re: [R] barplot's axis range; was: (no subject)

2006-05-11 Thread Uwe Ligges
Uwe Ligges wrote: [EMAIL PROTECTED] wrote: Good morning, i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i get 10 groups each containing 3 sub-bars. I need to change the range of the y-axis when i plot respectively the first and the other two sub-bars in each group.

Re: [R] Break Matrix

2006-05-11 Thread Petr Pikal
Hi what about split and cut split(your.mat,cut(1:331,28)) HTH Petr On 11 May 2006 at 10:15, SUMANTA BASAK wrote: Date sent: Thu, 11 May 2006 10:15:11 +0100 (BST) From: SUMANTA BASAK [EMAIL PROTECTED] To: R HELP r-help@stat.math.ethz.ch

[R] barplot axis range was Re:(no subject)

2006-05-11 Thread Petr Pikal
Hi See help in plot.default for ylim and xlim. The same apply in case of barplot barplot(. some stuff..., ylim =c(no1, no2)) HTH Petr On 11 May 2006 at 11:16, [EMAIL PROTECTED] wrote: Date sent: Thu, 11 May 2006 11:16:27 +0200 (MEST) From: [EMAIL PROTECTED]

Re: [R] Break Matrix

2006-05-11 Thread SUMANTA BASAK
Hi, Thanks for reply. I'm sorry that i forgot to mention that from 2nd matrix the first row values of the second matrix (and so on..) will be the first row (and so on..). Please help me. Thanks, SB. Jacques VESLOT [EMAIL PROTECTED] wrote: split(as.data.frame(matrix(rnorm(331*12),331,12)),

Re: [R] Break Matrix

2006-05-11 Thread Jacques VESLOT
split(as.data.frame(matrix(rnorm(331*12),331,12)), gl(ceiling(331/12),12,331)) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Liaw, Andy
This is what I would try: csvlist - list.files(pattern=csv$) bigblob - lapply(csvlist, read.csv, ...) ## Get all dates that appear in any one of them. all.dates - unique(unlist(lapply(bigblob, [[, 1))) bigdata - matrix(NA, length(all.dates), length(bigblob)) dimnames(bigdata) - list(all.dates,

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Steve Miller
Why torture yourself and probably get bad performance in the process? You should handle the data consolidation in python or ruby, which are much more suited to this type of task, piping the results to R. Steve Miller -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Re: [R] optim function

2006-05-11 Thread Dimitris Rizopoulos
probably you want to look at ?try; I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web:

Re: [R] R more Unix-like?

2006-05-11 Thread Steve Miller
You can use the pipe command to read data: msci - read.table(pipe(python steve/python/msciintl.py),sep=,,header=T, as.is=T) I use this metaphor quite a bit for loading data. Steve Miller -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [R] Break Matrix

2006-05-11 Thread Jacques VESLOT
mat - matrix(rnorm(331*12),331,12) z - rep(seq(0,331,by=11)+1, each=2) zz - z[-c(1,length(z))] ind - as.data.frame(matrix(zz, nr=2)) lapply(ind, function(x) mat[x[1]:x[2],]) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Gabor Grothendieck
Assuming: my.files - c(file1.csv, file2.csv, ..., filen.csv) use read.zoo in the zoo package and merge.zoo (which can do a multiway merge): library(zoo) do.call(merge, lapply(my.files, read.zoo, ...any.other.read.zoo.args...)) After loading zoo see: vignette(zoo) ?read.zoo ?merge.zoo On

[R] about MCMC pack

2006-05-11 Thread Mariagiulia Matteucci
Hello, I tryed to use the MCMC pack, particularly the function MCMCirtKd to simulate the posterior distribution in a multidimensional IRT model. The code I used is: posterior1 - MCMCirtKd(Y, dimensions=2, item.constraints=list(V2=list(3,0)), burnin = 1000, mcmc = 1, thin=1, verbose = 1,

[R] Mixed Model notation SAS - R

2006-05-11 Thread Jörg Trojan
Dear experts, I'm trying to transfer a mixed model developed in SAS to R. This it what it looks like in SAS: proc mixed method=ml; class a b c subj; model y = a|b|c; repeated /subject=subj type=ar(1); I tried something like this in R: mixed - lme(y ~ a + b + c + a*b + a*c + b*c +

[R] Survival analysis

2006-05-11 Thread Jacques VESLOT
Dear r-users, I have longitudinal data with measures and a binary trait (status) made on hundreds of people every 3 years during nine years. I tried different models but I wonder if it is possible to use survival analysis. If I take Surv(time, status), I have hundreds of ties and I am not

Re: [R] metaphoRs

2006-05-11 Thread Jim Lemon
Oh, gosh, this is getting whimsical. R, I surmise, is a mutable tool that enables the user to do what they want. Knapped flint for the Stone Age statistical fool, plasma arc for the expert and learned savant. R is a friend to all manner of men. The perfect companion, the servant complete. It

Re: [R] (no subject)

2006-05-11 Thread Jim Lemon
[EMAIL PROTECTED] wrote: Good morning, i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i get 10 groups each containing 3 sub-bars. I need to change the range of the y-axis when i plot respectively the first and the other two sub-bars in each group. I can't manage. Could

Re: [R] optim function

2006-05-11 Thread R Granell, Medicine
Thanks, Dimitris! I think it will help Raquel --On 11 May 2006 13:06 +0200 Dimitris Rizopoulos [EMAIL PROTECTED] wrote: probably you want to look at ?try; I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic

Re: [R] ape comparative analysis query

2006-05-11 Thread Chris Knight
Thank you very much, that makes things a lot clearer. The issue with known roots and ancestors in my case is that these taxa are actually molecules evolved from one another in the lab (with control over the evolutionary process, though not the traits that emerge), so the data on the root and

[R] Boxplot and range of x-axis

2006-05-11 Thread Rainer Hahnekamp
Hello there, could somebody help me with this: I have to create a lot of boxplots but with same range concerning the x-axis. For example I have following data: liste1 - c(3,4,5,3,3,4,4) liste2 - c(1,2,3,4,6) png(file = liste1.png) boxplot(liste1) png(file = liste2.png) boxplot(liste2) q() Works

Re: [R] Boxplot and range of x-axis

2006-05-11 Thread Sean O'Riordain
Hi Rainer, boxplot(liste1,ylim=c(1,6)) boxplot(liste2,ylim=c(1,6)) or would you prefer boxplot(liste1,liste2) cheers, S/ On 11/05/06, Rainer Hahnekamp [EMAIL PROTECTED] wrote: Hello there, could somebody help me with this: I have to create a lot of boxplots but with same range concerning

[R] Comparing skewness

2006-05-11 Thread Skirmantas Janusonis
Hello, I'd appreciate any ideas on how to compare the skewness of two samples. In my case, one sample is likely to be roughly normal and the other one skewed. I could run two D'Agostino tests, but then I'll have to correct for the family-wise error. What if both samples are skewed? If there

[R] Comparing skewness

2006-05-11 Thread Skirmantas Janusonis
Hello, I'd appreciate any ideas on how to compare the skewness of two samples. In my case, one sample is likely to be roughly normal and the other one skewed. I could run two D'Agostino tests, but then I'll have to correct for the family-wise error. What if both samples are skewed? If there

Re: [R] lattice package plots

2006-05-11 Thread sundlm
I am using the lattice packge for its levelplot and contourplot. Is it possible to adjust the line thickness of the 'box' and tickmarks in these plots? Yes, e.g. levelplot(volcano, par.settings = list(axis.line = list(lwd = 3))) The actual width of the box is actually half the

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Sean O'Riordain
Thank you folks - most helpful as always! Now I have a bit of studying to do :-) I've never really understood before how to use lapply (or anyother apply) so this gives me a real problem relating to my own to work with! Thanks again, Sean On 11/05/06, Gabor Grothendieck [EMAIL PROTECTED]

[R] JGR (Java GUI) on Solaris

2006-05-11 Thread Alex Restrepo
Hi: I am trying to build the JGR (Java GUI) on a solaris 8 machine. I started R and I ran the following command: install.packages(c(JGR,JavaGD,rJava,iWidgets,iplots),,c(http://cran.r-project.org,http://www.rosuda.org/R/nightly;)) I get the following errors when I try to install: make: Fatal

Re: [R] data input strategy - lots of csv files

2006-05-11 Thread Liaw, Andy
If you can show me the equivalent Python code in as few lines that perform much faster, I'd very much appreciate it. I had been trying to find an excuse to learn Python, but so far have found what I can do in R quite adequate. Also, it's much easier to keep track of work flow when everything is

Re: [R] Using DBI and RMySQL

2006-05-11 Thread Robert Citek
On May 11, 2006, at 3:09 AM, Indrajit Sengupta wrote: Did you create RMySQL windows binary in the process? Sorry, but no. This was done on Mac OS X. And was done a while ago. Can you share it with me? Wish I could, but I can't. I don't have a Windows machine. I'll see if I can reproduce

[R] greco-latin square

2006-05-11 Thread Steven Lacey
Hi, I am analyzing a repeated-measures Greco-Latin Square with the aov command. I am using aov to calculate the MSs and then picking by hand the appropriate neumerator and denominator terms for the F tests. The data are the following:

Re: [R] lattice package plots

2006-05-11 Thread Deepayan Sarkar
On 5/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am using the lattice packge for its levelplot and contourplot. Is it possible to adjust the line thickness of the 'box' and tickmarks in these plots? Yes, e.g. levelplot(volcano, par.settings = list(axis.line = list(lwd =

Re: [R] How to find row maximum of two columns

2006-05-11 Thread Rob Steele
Dale Steele wrote: Hello -- Given the 10x2 matrix below, my goal is to create a vector which contains the maximum of column 1 and column 2, or the only value if there is an NA in one column. I experimented with max.col without success. Thanks. --Dale tmax.m tmaxhme tmaxer

Re: [R] count repetitions

2006-05-11 Thread Barry Rowlingson
Jean-Pierre GERBAL wrote: bonjour, i have a serie : x-sample(c(0,1),50,T) and i want to count the length of each repetition of 0 and of 1 (00111011100 give 2313145)... who have an idea ? rle(x) merci :-) pas de prob. Barry __

[R] Simulating scalar-valued stationary Gaussian processes

2006-05-11 Thread Mikael Anderson
Hi, I have a sample of size 100 from a function in interval [0,1] which can be assumed to come from a scalar-valued stationary Gaussian process. There are about 500 observation points in the interval. I need an effective and fast way to simulate from the Gaussian process conditioned on the

[R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Sam Steingold
Hi, I have a data frame df and a list of names of columns that I want to turn into factors: df.names - attr(df,names) sapply(factors, function (name) { pos - match(name,df.names) if (is.na(pos)) stop(paste(name,: no such column\n)) df[[pos]] - factor(df[[pos]])

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread jim holtman
try '-' as the assignment to make it global. df[[pos]] - factor(df[[pos]]) On 5/11/06, Sam Steingold [EMAIL PROTECTED] wrote: Hi, I have a data frame df and a list of names of columns that I want to turn into factors: df.names - attr(df,names) sapply(factors, function (name) {

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Sam Steingold
* jim holtman [EMAIL PROTECTED] [2006-05-11 12:27:39 -0400]: try '-' as the assignment to make it global. df[[pos]] - factor(df[[pos]]) nothing changed -- I observe the exact same behaviour: Month ( 1 ): TRUE factors: FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE On 5/11/06, Sam

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Douglas Grove
You need to create a new object and assign it to 'df' so you'd do something like this: df - sapply(factors, function (name) { pos - match(name,df.names) factor(df[[pos]]) }) Doug On Thu, 11 May 2006, Sam Steingold wrote: * jim

Re: [R] Using DBI and RMySQL

2006-05-11 Thread bogdan romocea
I'll see if I can reproduce the steps under Knoppix[1]. Then you can run Knoppix with a Persistent Disk Image (PDI)[2] that contains R, the DBI, and RMySQL on just about any machine that runs Knoppix. Don't bother, it's been done already. See http://dirk.eddelbuettel.com/quantian.html

[R] model formulation for the following ANOVA

2006-05-11 Thread stefan . premke
Hallo! I have run a EEG experiment and got the following data group: 1 2 1 2 1 2 1 2 ... as factor, 2 levels between subjects fixed effect (patient vs control) subj: 1 2 ... 14 1 2 ... 14 as factor 7 patients 7 control random effect condition: 1 1 ... 2 2 ... 1 1 ... 2 2 as factor, 2 levels

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Sam Steingold
* Douglas Grove [EMAIL PROTECTED] [2006-05-11 09:41:07 -0700]: You need to create a new object and assign it to 'df' why can't I modify an existing object?! so you'd do something like this: df - sapply(factors, function (name) { pos - match(name,df.names)

Re: [R] Unique?

2006-05-11 Thread Francisco J. Zagmutt
Hi Cameron You need to be more specific when you ask a question so you can get a better answer. Anyhow, when you say that you want to retain all the other variables do you mean that you want to create a new column in the dataset that contains the calculated sum? If that is the case you can

Re: [R] help with writing output from two different arrays to two columns in an output file

2006-05-11 Thread Arnav Ghosh
Hi Robert, That worked perfectly. Thanks a lot. -Arnav On 5/10/06, Robert Citek [EMAIL PROTECTED] wrote: Hello Arnav, On May 10, 2006, at 3:56 PM, Arnav Ghosh wrote: The code is as follows: n=1000 x=rgamma(n,1.5,2) y=vector(numeric,n) for (i in 1:n){

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread jim holtman
This seems to have worked for me: df - data.frame(a=1:10, b=1:10, c=1:10) str(df) `data.frame': 10 obs. of 3 variables: $ a: int 1 2 3 4 5 6 7 8 9 10 $ b: int 1 2 3 4 5 6 7 8 9 10 $ c: int 1 2 3 4 5 6 7 8 9 10 df.names - attr(df,names) factors - 'c' sapply(factors, function (name)

Re: [R] count repetitions

2006-05-11 Thread Francisco J. Zagmutt
See ?rle i.e.: x=c(0,0,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,0) rle(x) Run Length Encoding lengths: int [1:7] 2 3 1 3 1 4 5 values : num [1:7] 0 1 0 1 0 1 0 I hope this helps Francisco From: Jean-Pierre GERBAL [EMAIL PROTECTED] To: R-help@stat.math.ethz.ch Subject: [R] count repetitions Date:

[R] time-dependent covariate survival curves

2006-05-11 Thread Hua Ding
Dear r-users, Does anyone know how to draw time-dependent survival curves? Example: Event outcome: CHD Time-dependent covariate: NSAID use, which changes over time for each subject I'm interested in survival curves stratified by NSAID use. I'd like to implement Simon Makuch (1984) method.

[R] Newbie question about read.table

2006-05-11 Thread David Kaplan
Hi When I use the read.table function with header = T, I notice that it gives me the variable names along the top as I expect. But, when I then attempt an analysis, e.g. regression, it doesn't recognize the variable names. Am I missing a step. Thank you David [[alternative HTML

Re: [R] Newbie question about read.table

2006-05-11 Thread Steve Miller
Are you prefixing the variable names with the data.frame name, i.e. mydf$col2, or referencing by index mydf[,2]? Steve Miller -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Kaplan Sent: Thursday, May 11, 2006 12:39 PM To: r-help@stat.math.ethz.ch

[R] survival curve to compare two groups

2006-05-11 Thread Linda Lei
Hi All, I want to get the OS and EFS curve to compare two groups by log-rank test. I can draw the two curves by survfit but I couldn't find log-rank test in the choices of argument. I also looked at the survdiff which does have log-rank test, but it seems like no plots can be drawn from it.

Re: [R] Newbie question about read.table

2006-05-11 Thread Chuck Cleland
David Kaplan wrote: Hi When I use the read.table function with header = T, I notice that it gives me the variable names along the top as I expect. But, when I then attempt an analysis, e.g. regression, it doesn't recognize the variable names. Am I missing a step. Thank you

[R] t-test with autocorrelation correction

2006-05-11 Thread White . Denis
Has anyone implemented a t-test with the effective sample size correction proposed by Dale and Fortin, Ecoscience 9(2):162-167, 2002, using a discussion by Cressie, 1993, page 15? thanks, Denis __ R-help@stat.math.ethz.ch mailing list

[R] Quantian (was: Using DBI and RMySQL)

2006-05-11 Thread Robert Citek
On May 11, 2006, at 11:47 AM, bogdan romocea wrote: I'll see if I can reproduce the steps under Knoppix[1]. Then you can run Knoppix with a Persistent Disk Image (PDI)[2] that contains R, the DBI, and RMySQL on just about any machine that runs Knoppix. Don't bother, it's been done already.

Re: [R] Newbie question about read.table

2006-05-11 Thread David Kaplan
Here is what I'm doing birthweight - read.table(c:/bw.dat, header = T) summary(glm(low~age,binomial)) Error in eval(expr, envir, enclos) : object low not found Thanks all! - Original Message - From: Chuck Cleland [EMAIL PROTECTED] To: David Kaplan [EMAIL PROTECTED] Cc:

Re: [R] Newbie question about read.table

2006-05-11 Thread Chuck Cleland
David Kaplan wrote: Here is what I'm doing birthweight - read.table(c:/bw.dat, header = T) summary(glm(low~age,binomial)) Error in eval(expr, envir, enclos) : object low not found Try this: birthweight - read.table(c:/bw.dat, header = TRUE) summary(glm(low ~ age, family=binomial,

Re: [R] Newbie question about read.table

2006-05-11 Thread Sean O'Riordain
Hi David, you might need to either: a) attach(birthweight) or b) glm(low~age,binomial, data=birthweight) refer ?attach / ?glm cheers, Sean On 11/05/06, David Kaplan [EMAIL PROTECTED] wrote: Here is the code with the error birthweight - read.table(c:/bw.dat, header = T)

Re: [R] Contour plot overlayed with line plot

2006-05-11 Thread Jonathan Greenberg
I was using filled.contour, when I went back and just used contour it worked fine -- so there is NOT an easy way to get filled contour to work with an overlay? --j -- Jonathan A. Greenberg, PhD NRC Research Associate NASA Ames Research Center MS 242-4 Moffett Field, CA 94035-1000 Phone:

Re: [R] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-11 Thread Duncan Murdoch
I forgot to mention: if you want to use the patch without installing a new version of R, it's available by sourcing the file https://svn.r-project.org/R/branches/R-2-3-patches/src/library/graphics/R/legend.R It was just a one character change: Index: legend.R

Re: [R] cannot turn some columns in a data frame into factors

2006-05-11 Thread Sam Steingold
Thanks to everyone who took time to respond, both here on the list and via private e-mail (I do read the list on gmane, so there is not reason to CC me). it turned out that R passes _structured_ arguments by value. the solution I use now is: df[factors] = lapply(df[factors],factor) if

Re: [R] Quantian (was: Using DBI and RMySQL)

2006-05-11 Thread Dirk Eddelbuettel
On 11 May 2006 at 13:19, Robert Citek wrote: | | On May 11, 2006, at 11:47 AM, bogdan romocea wrote: | | I'll see if I can reproduce the steps under Knoppix[1]. Then you can | run Knoppix with a Persistent Disk Image (PDI)[2] that contains R, | the DBI, and RMySQL on just about any machine

Re: [R] Contour plot overlayed with line plot

2006-05-11 Thread Jonathan Greenberg
Seemed to answer my own question: I tacked a plot.axes={axis(1);axis(2);points(xdata,ydata,type=l)} in the filled.contour call and it appears to be working right! Thanks! --j -- Jonathan A. Greenberg, PhD NRC Research Associate NASA Ames Research Center MS 242-4 Moffett Field, CA 94035-1000

Re: [R] Newbie question about read.table

2006-05-11 Thread David Kaplan
Thanks all. I'll give the various suggestions a try. Best David - Original Message - From: Sean O'Riordain [EMAIL PROTECTED] To: David Kaplan [EMAIL PROTECTED]; r-help r-help@stat.math.ethz.ch Sent: Thursday, May 11, 2006 2:05 PM Subject: Re: [R] Newbie question about read.table Hi

Re: [R] Newbie question about read.table

2006-05-11 Thread David Kaplan
This worked! Thanks! - Original Message - From: Chuck Cleland [EMAIL PROTECTED] To: David Kaplan [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Thursday, May 11, 2006 1:58 PM Subject: Re: [R] Newbie question about read.table David Kaplan wrote: Here is what I'm doing

[R] Now another question regarding the Foreign package

2006-05-11 Thread David Kaplan
Hi, Because I'm new to R and trying to move off of SPSS, I have another question. I downloaded the Foreign package which I understand reads in various datasets from programs such as SPSS and SAS. There isn't much documentation that I can find regarding the specifics of this in the online

Re: [R] model formulation for the following ANOVA

2006-05-11 Thread Richard M. Heiberger
Please use better spacing to improve legibility. roi.aov - aov(mean ~ cond*roi*group + Error(subj/(cond*roi)), data=roiData) summary(roi.aov) The +group you had is redundant. It is implied by cond*roi*group. You can verify this by typing terms(cond*roi*group) Based on the df

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread Jonathan Baron
On 05/11/06 15:42, David Kaplan wrote: Hi, Because I'm new to R and trying to move off of SPSS, I have another question. I downloaded the Foreign package which I understand reads in various datasets from programs such as SPSS and SAS. There isn't much documentation that I can find

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread Philip He
Use library(foreign), not capital letter F. You may try spss.get function in Hmisc package. Philip He Vanderbilt University On 5/11/06, David Kaplan [EMAIL PROTECTED] wrote: Hi, Because I'm new to R and trying to move off of SPSS, I have another question. I downloaded the Foreign package

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread Francisco J. Zagmutt
Dear David I suspect you downloaded 'foreign' but you didn't load it to your workspace. To do that you have to use library(foreign). Then you can have access to the functions in that package. In addition to the manuals that come with R (Help-Manuals (in pdf)) there is a wealth of reading

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread David Kaplan
I didn't use the library(foreign). Thanks, I'll give that a go. David - Original Message - From: Philip He To: David Kaplan Cc: r-help@stat.math.ethz.ch Sent: Thursday, May 11, 2006 4:00 PM Subject: Re: [R] Now another question regarding the Foreign package Use

[R] Maximum likelihood estimate of bivariate vonmises-weibull distribution

2006-05-11 Thread Chaouch, Aziz
Hi, I'm dealing with wind data and I'd like to model their distribution in order to simulate data to fill-in missing values. Wind direction are typically following a vonmises distribution and wind speeds follow a weibull distribution. I'd like to build a joint distribution of directions and

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread Peter Dalgaard
David Kaplan [EMAIL PROTECTED] writes: I didn't use the library(foreign). Thanks, I'll give that a go. bw2 - read.spss(c:\birthwt.sav) Error: couldn't find function read.spss Did anyone comment on the \b bit? (Executive summary: you need to double the \) -- O__ Peter

[R] Mac-PgSQL

2006-05-11 Thread Omar Lakkis
I am writing an R application to run on Mac OS X (pentium chip) and connect to a PosygresSQL 8.1.3 database hosted on the same box. Could someone, please, recommend a library to go with for database connectivity? Is there a PgSQL R/DBMS to work with DBI?

Re: [R] Maximum likelihood estimate of bivariate vonmises-weibull distribution

2006-05-11 Thread Philip He
On 5/11/06, Chaouch, Aziz [EMAIL PROTECTED] wrote: Hi, I'm dealing with wind data and I'd like to model their distribution in order to simulate data to fill-in missing values. Wind direction are typically following a vonmises distribution and wind speeds follow a weibull distribution. I'd

[R] factors

2006-05-11 Thread Arnab mukherji
Hi R-users, I had a minor issue while demonstating R that I can't explain. I am hoping someone will have suggestions. The only difference is a call to fix() in between that I made to ensure people were following me. However, that seems to have altered the way R code got executed. I was

[R] Title of page with multiple plots

2006-05-11 Thread John Sorkin
I want to place four plots on a page, and I would like to have all four plots share a common title. I have tried the following code, but the title is centered over the fourth graph and not centered across all four plots. Does anyone have any suggestions? R 2.1.1 windows xp oldpar-par(mfcol

Re: [R] Title of page with multiple plots

2006-05-11 Thread jim holtman
try this: par(mfcol=c(2,2)) plot(0) plot(0) plot(0) plot(0) mtext('main title', outer=TRUE, line=-1) On 5/11/06, John Sorkin [EMAIL PROTECTED] wrote: I want to place four plots on a page, and I would like to have all four plots share a common title. I have tried the following code,

Re: [R] Title of page with multiple plots

2006-05-11 Thread Andrew Robinson
John, try adding the argument outer=T to the title() function title(paste(P and 95%CI for a sample size of,n,subjects.), outer=T) Cheers Andrew On Thu, May 11, 2006 at 08:00:34PM -0400, John Sorkin wrote: I want to place four plots on a page, and I would like to have all four plots share a