Re: [R] SPSS and library(foreign)

2007-02-16 Thread Prof Brian Ripley
On Fri, 16 Feb 2007, Anthony Staines wrote: Hi, I have a valid SPSS .sav file (which I can open happily in SPSS v11 on Windows XP). Opening it in R2.41 on Linux we get this message :- HSE3023 - read.spss(HSE.sav) Error in read.spss(HSE.sav) : error reading system-file header In

Re: [R] R book advice

2007-02-16 Thread Ramon Diaz-Uriarte
Dear Paul, You might want to add Everitt Hothorn's A Handbook of Statistical Analyses Using R. If I had to recommend just one book it'd be this one. My own (i.e., highly subjective) suggestion, if you can afford two books, would be to first go through Dalgaard's and then through Everitt

Re: [R] tapply, levelinformation

2007-02-16 Thread niederlein-rstat
Hi Jim, jim holtman schrieb: Here is one way: t - split(mat, classes) for (i in names(t)) plotdensity(t[[i]], main=i) But then I don't use the advantages of the tapply anymore... What is the problem you are trying to solve? I have a set of data (multiple files), which belong to

[R] sapply again return value

2007-02-16 Thread niederlein-rstat
Hello, I used an sapply to get some data back (s - sapply(...) ). The output of s would then deliver something like this: B06_lamp.csv C06_lamp.csv D06_lamp.csv [1,] NULL NULL Numeric,512 [2,] NULL NULL Numeric,512 [3,] NULL NULL 2

[R] 3 dimensional histogram

2007-02-16 Thread Gunther Höning
Dear list, I want to plot a 3 dimensional histogram and I am looking for a funktion to do so. I have a dataframe with the following information: 1 0.50 -0.5 -1 a 13 11 6 2 1 b 9 8 6 5 3 c 5 4

Re: [R] tapply, levelinformation

2007-02-16 Thread Antje
Hi Jim, jim holtman schrieb: Here is one way: t - split(mat, classes) for (i in names(t)) plotdensity(t[[i]], main=i) But then I don't use the advantages of the tapply anymore... What is the problem you are trying to solve? I have a set of data (multiple files), which belong to

[R] sapply again return value

2007-02-16 Thread Antje
Hello, I used an sapply to get some data back (s - sapply(...) ). The output of s would then deliver something like this: B06_lamp.csv C06_lamp.csv D06_lamp.csv [1,] NULL NULL Numeric,512 [2,] NULL NULL Numeric,512 [3,] NULL NULL 2 mode(s)

Re: [R] Time of failure, Arrhenius and Weibull distribution

2007-02-16 Thread Bart Joosen
My model is as follows: mod - lm(log(Degrad/Time) ~ I(1e+05/(8.617*(Temp + 273.16))), data) Where Degrad/Time = k, and because of taking logs, the intercept = log(A) and the coefficient of the term = -Ea. This is how I used the Arrhenius formule in a linear model. I know I can use predict to

[R] array searches

2007-02-16 Thread Murali Menon
Folks, I have a dataframe comprising a column of dates and a column of signals (-1, 0, 1) that looks something like this: 30/01/2007 0 31/01/2007 -1 01/02/2007 -1 02/02/2007 -1 03/02/2007 1 04/02/2007 1 05/02/2007 1 06/02/2007 1 07/02/2007 1

Re: [R] Multiple comparisons when interacction

2007-02-16 Thread Jorge Lampurlanes Castel
Hello, Data comes from a multiyear field experiment in which 4 levels of a treatment (2, 3, 4, 6) are compared to see the effect on yield. It is a randomized complete block design. The SAS code follows: options ls=95; data uno; infile 'data.csv' delimiter=';' firstobs=2; input

Re: [R] Multiple comparisons when interacction

2007-02-16 Thread Jorge Lampurlanes Castel
Data is here. I'm sorry. Is it possible to do this analysis in R? Yes, it is possible. The syntax isn't in place yet. If you send me the complete SAS code and data for an example using slice, I will duplicate it for you in the multcomp package in R. I will send that to the R-help list

[R] Sendingd greetings and a question !!!

2007-02-16 Thread Guillermo Julián San Martín
Hello everybody, I am glade to write to send my greetings and to formulate a question. I am M.Sc. student and I am applying R to process my data. I want to run a 2SLS regression and then to apply Heteroskedasticity Consistent Standard Errors to obtain the coefficients't-tests corrected by

[R] Sending greetings and a question !!!

2007-02-16 Thread Guillermo Julián San Martín
Hello everybody, I am glade to write to send my greetings and to formulate a question. I am M.Sc. student and I am applying R to process my data. I want to run a 2SLS regression and then to apply Heteroskedasticity Consistent Standard Errors to obtain the coefficients't-tests corrected by

Re: [R] sapply again return value

2007-02-16 Thread Henrique Dallazuanna
Hi, A simple way is: s - s[3] On 16/02/07, Antje [EMAIL PROTECTED] wrote: Hello, I used an sapply to get some data back (s - sapply(...) ). The output of s would then deliver something like this: B06_lamp.csv C06_lamp.csv D06_lamp.csv [1,] NULL NULL Numeric,512

Re: [R] sapply again return value

2007-02-16 Thread Antje
Henrique Dallazuanna schrieb: Hi, A simple way is: s - s[3] but what if I don't know how many and which columns are NULL? Antje __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] cluster analysis under contiguity constraints with R ?

2007-02-16 Thread Bellanger Lise
Hello, I would like to know if there is a function in an R library that allows to do cluster analysis under contiguity constraints ? Thank you very much for your answer ! Lise Bellanger -- Lise Bellanger, Université de Nantes Département de Mathématiques, Laboratoire Jean

Re: [R] something missing in summary()

2007-02-16 Thread Jari Oksanen
Gerard Smits g_smits at verizon.net Fri Feb 16 00:46:09 CET 2007: just noticed that two key pieces of information are not given by the summary() command: N and SD. we are given the N missing, but not the converse. I know these summary value can be obtained easy, but can't understand why

[R] plotting

2007-02-16 Thread Azizi
Hello, I use newly R! I'd like to plot several data set together in one output window! How can I do that? Best regards Hadi - Never miss an email again! [[alternative HTML version deleted]] __

Re: [R] SAS, SPSS Product Comparison Table

2007-02-16 Thread Thomas Adams
Charilaos, I noticed within your table, under GIS/Mapping for 'R' you only listed 'maps'. You should probably include GRASS GIS, which can be interfaced to R using the spgrass6 package. Regards, Tom Charilaos Skiadas wrote: On Feb 10, 2007, at 4:26 PM, Muenchen, Robert A (Bob) wrote:

Re: [R] plotting

2007-02-16 Thread ONKELINX, Thierry
See ?points, ?lines and ?par (especially par(new = T)). Reading an introduction book about R might be a good idea if you're new. Dalgaard (Introductory Statistics with R) Everitt Hothorn (A Handbook of Statistical Analyses Using R) Cheers, Thierry

Re: [R] plotting

2007-02-16 Thread Mark Wardle
Azizi wrote: Hello, I use newly R! I'd like to plot several data set together in one output window! How can I do that? Best regards Hadi - Never miss an email again! [[alternative HTML version deleted]]

Re: [R] something missing in summary()

2007-02-16 Thread Douglas Bates
On 2/16/07, Jari Oksanen [EMAIL PROTECTED] wrote: Gerard Smits g_smits at verizon.net Fri Feb 16 00:46:09 CET 2007: just noticed that two key pieces of information are not given by the summary() command: N and SD. we are given the N missing, but not the converse. I know these summary

Re: [R] Unable to load RMySQL

2007-02-16 Thread Henric Nilsson (Public)
Den Ti, 2007-02-13, 11:43 skrev Ravi S. Shankar: Hi R users, I am unable to load RMySQL. The zip file is not available which I guess is needed to load this pakage. Please read http://cran.r-project.org/bin/windows/contrib/2.4/ReadMe to find out why. I also tried extracting the package

Re: [R] something missing in summary()

2007-02-16 Thread Mihai Nica
I will take advantage of this thread with a request of my own. Would it be possible to add an index in the result of str(df )? For large dfs I find myself counting for the position of certain variable(s) again and again (for indexing purposes). Thanks, m Mihai Nica 170 East Griffith St. G5

Re: [R] Working with temporal data

2007-02-16 Thread Sérgio Nunes
Hi again, I'm still trying to read my data but I'm having some difficulties converting it to dates. My data file has lines and in each line a single date exists in the format 2007/02/16 (without the ,). I've tried the following: d - readLines(file.dat) d [1] 2006/08/09 2004/02/11 2004/06/09

Re: [R] Working with temporal data

2007-02-16 Thread jim holtman
One question I would have about your commands is that I would have thought that the second line of output ([2].) would have started with at least [4] if you were reading multiple lines. This example seems to work fine: (now that I looked at your code you had $d instead of %d) x -

[R] missing - nonmissing levels

2007-02-16 Thread Jon Minton
Hi, I expect this is simple but haven’t found an answer looking on the archives... I want to convert ‘NA’ (missing) to particular levels (nonmissing) in factor vectors. e.g. I know X - c(1, 2, 3) summary(X) Min. 1st Qu. MedianMean 3rd Qu.Max. 1.0 1.5 2.0

[R] re : array searches

2007-02-16 Thread Olivier ETERRADOSSI
Hi, I am not sure to get the issue, but assuming your data are arranged as in your example with dates in column x$V1 and signals as x$V2 , I think that you could use rle in the following way : test-rle(x$V2) testmat-matrix(NA,length(test$values),2)

Re: [R] Working with temporal data

2007-02-16 Thread Marc Schwartz
On Fri, 2007-02-16 at 14:32 +, Sérgio Nunes wrote: Hi again, I'm still trying to read my data but I'm having some difficulties converting it to dates. My data file has lines and in each line a single date exists in the format 2007/02/16 (without the ,). I've tried the following: d -

Re: [R] array searches

2007-02-16 Thread jim holtman
try this: x - scan(textConnection(30/01/2007 0 + 31/01/2007 -1 + 01/02/2007 -1 + 02/02/2007 -1 + 03/02/2007 1 + 04/02/2007 1 + 05/02/2007 1 + 06/02/2007 1 + 07/02/2007 1 + 08/02/2007 1 + 09/02/2007 0 + 10/02/2007 0 + 11/02/2007 0 +

[R] Migrating .RData from Windows to Linux?

2007-02-16 Thread Derek Eder
I want to begin a migration of R workspaces from Windows to Ubuntu Linux. (1) Can someone suggest the most appropriate path? dump() ? save() ? (2) Are there any R platform migration related resources out there? (I have not found any yet). Thank you, -- Derek N. Eder

Re: [R] missing - nonmissing levels

2007-02-16 Thread Chuck Cleland
Jon Minton wrote: Hi, I expect this is simple but haven’t found an answer looking on the archives... I want to convert ‘NA’ (missing) to particular levels (nonmissing) in factor vectors. e.g. I know X - c(1, 2, 3) summary(X) Min. 1st Qu. MedianMean 3rd Qu.Max.

Re: [R] tapply, levelinformation

2007-02-16 Thread jim holtman
But it does the same thing. What 'advantage' of tapply do you think that you are missing? Performance is probably not impacted since most of the time is in the plot. On 2/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Jim, jim holtman schrieb: Here is one way: t - split(mat,

Re: [R] Working with temporal data [Solved]

2007-02-16 Thread Sérgio Nunes
Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a date - 2007/02/16 d-readLines(filename.dat) d-as.Date(d, format=%Y/%m/%d) pdf(yearly.pdf) hist(d, years) dev.off() Instead of years you can also use days, weeks,

Re: [R] Migrating .RData from Windows to Linux?

2007-02-16 Thread Marc Schwartz
On Fri, 2007-02-16 at 16:32 +0100, Derek Eder wrote: I want to begin a migration of R workspaces from Windows to Ubuntu Linux. (1) Can someone suggest the most appropriate path? dump() ? save() ? (2) Are there any R platform migration related resources out there? (I

Re: [R] Function to assign quantiles?

2007-02-16 Thread Talbot Katz
Thank you so much to all who replied on and off list. It's good to have so many options! One of the off-list responders also mentioned the quantcut function in the gtools package. -- TMK -- 212-460-5430home 917-656-5351cell From: hadley wickham [EMAIL PROTECTED] To: [EMAIL

Re: [R] Working with temporal data [Solved]

2007-02-16 Thread Marc Schwartz
On Fri, 2007-02-16 at 15:39 +, Sérgio Nunes wrote: Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a date - 2007/02/16 d-readLines(filename.dat) d-as.Date(d, format=%Y/%m/%d) pdf(yearly.pdf) hist(d, years)

[R] if() for() { }

2007-02-16 Thread Nicolas Degallier
Dear R'helpers, I guess the solution is trivial but despite some hours of testing and looking at the doc, I was unable to fix the following problem. I want to do either: for (i in 1:lat) a[i,which(a[i,]==0] - NA or: for (i in 1:lat) a[i,which(a[i,]==-|a[i,]==|a[i,]==9998|a[i,]

Re: [R] if() for() { }

2007-02-16 Thread jim holtman
On 2/16/07, Nicolas Degallier [EMAIL PROTECTED] wrote: Dear R'helpers, I guess the solution is trivial but despite some hours of testing and looking at the doc, I was unable to fix the following problem. I want to do either: for (i in 1:lat) a[i,which(a[i,]==0] - NA a[a == 0] - NA or:

[R] R_decompress1 and zlib

2007-02-16 Thread Jan . Kleinn
Dear all, I have a problem similar to what was already posted about two years ago (http://tolstoy.newcastle.edu.au/R/help/05/01/10011.html): I have a binary file, which contains a header and data compressed by zlib and written to the file as unsigned character. Here is, what I try to do: zz -

Re: [R] if() for() { }

2007-02-16 Thread Marc Schwartz
On Fri, 2007-02-16 at 17:10 +0100, Nicolas Degallier wrote: Dear R'helpers, I guess the solution is trivial but despite some hours of testing and looking at the doc, I was unable to fix the following problem. I want to do either: for (i in 1:lat) a[i,which(a[i,]==0] - NA or: for

[R] R implementations of scatterplot/map labeling algorithims?

2007-02-16 Thread Michael Friendly
Dear R community In a current paper, I'm (briefly) considering the topic of producing scatterplots or maps with point labels positioned in such a way as to minimize label overlap and occlusion. This is a topic with a large, but scattered literature. In CS, it is considered NP-hard, but there

Re: [R] Working with temporal data [Solved]

2007-02-16 Thread Prof Brian Ripley
On Fri, 16 Feb 2007, Marc Schwartz wrote: On Fri, 2007-02-16 at 15:39 +, Sérgio Nunes wrote: Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a date - 2007/02/16 d-readLines(filename.dat) d-as.Date(d,

Re: [R] R implementations of scatterplot/map labeling algorithims?

2007-02-16 Thread Chuck Cleland
Michael Friendly wrote: Dear R community In a current paper, I'm (briefly) considering the topic of producing scatterplots or maps with point labels positioned in such a way as to minimize label overlap and occlusion. This is a topic with a large, but scattered literature. In CS, it is

Re: [R] Working with temporal data [Solved]

2007-02-16 Thread Marc Schwartz
On Fri, 2007-02-16 at 16:47 +, Prof Brian Ripley wrote: On Fri, 16 Feb 2007, Marc Schwartz wrote: On Fri, 2007-02-16 at 15:39 +, Sérgio Nunes wrote: Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a

[R] slice usage

2007-02-16 Thread Nair, Murlidharan T
I am trying to understand the usage of slice while plotting. Can any one provide me with some explanation to it or point me to a resource where I can read it in greater detail. I have an example from the usage page for SVM. library(MASS) library(e1071) data(iris) m2 - svm(Species~., data =

Re: [R] convert to binary to decimal

2007-02-16 Thread Roland Rau
On 2/16/07, Petr Pikal [EMAIL PROTECTED] wrote: Hi slight modification of your function can be probably even quicker: fff-function(x) sum(2^(which(rev(x))-1)) :-) Petr Yes, your function is slightly but consistently faster than my suggestion. But my tests show still Bert Gunter's

[R] optim() and resultant hessian

2007-02-16 Thread Brian Healey
R users; A question about optimization within R. I've been using both optim() and nlminb() to estimate parameters and all seems to be working fine. For context (but without getting into specifics - sorry), I'm working with a problem that is known to have correlated parameters, and parameter

[R] How is the line in av.plot calculated?

2007-02-16 Thread Tom La Bone
I suspect that the line in the added variable plot (library car) is a SLR of the residuals, but I can't seem to find this written anywhere. Can someone confirm this? Thanks. Tom [[alternative HTML version deleted]] __

Re: [R] How is the line in av.plot calculated?

2007-02-16 Thread Duncan Murdoch
On 2/16/2007 12:57 PM, Tom La Bone wrote: I suspect that the line in the added variable plot (library car) is a SLR of the residuals, but I can't seem to find this written anywhere. Can someone confirm this? Thanks. You can look at the source: av.plot function (model, ...) {

Re: [R] optim() and resultant hessian

2007-02-16 Thread Prof Brian Ripley
On Fri, 16 Feb 2007, Brian Healey wrote: R users; A question about optimization within R. I've been using both optim() and nlminb() to estimate parameters and all seems to be working fine. For context (but without getting into specifics - sorry), I'm working with a problem that is known to

Re: [R] How is the line in av.plot calculated?

2007-02-16 Thread Chuck Cleland
Tom La Bone wrote: I suspect that the line in the added variable plot (library car) is a SLR of the residuals, but I can't seem to find this written anywhere. Can someone confirm this? Thanks. See the Fox(1997) reference on the help page (pages 281-283). Note that both the x-axis and the

Re: [R] missing - nonmissing levels

2007-02-16 Thread Prof Brian Ripley
Well, if it is missing, how do you know what level to turn it back into? That is what NA means in R: not available. If you want missings to be a separate level, you could use factor(as.character(X), exclude=NULL) [1] ANA B Levels: A B NA BTW, using summary() for a length-3 object is not

Re: [R] Time of failure, Arrhenius and Weibull distribution

2007-02-16 Thread Ted Harding
On 16-Feb-07 Bart Joosen wrote: My model is as follows: mod - lm(log(Degrad/Time) ~ I(1e+05/(8.617*(Temp + 273.16))), data) Where Degrad/Time = k, and because of taking logs, the intercept = log(A) and the coefficient of the term = -Ea. This is how I used the Arrhenius formule in a

[R] R GUI programming

2007-02-16 Thread Hao Liu
Hi, All: I am having a problem with handling global variable value in GUI programming, I hope R gurus can give me some advice on it. What I want to do is to read in a dataset, display some information based on the input and do some calculation on the dataset: However, I am having trouble

[R] Ubuntu Linux and X11

2007-02-16 Thread preuth
Hello, i have a problem with creating histograms and plots under ubuntu linux. After creating a vector test i want to make a histogram, but the following error appears: hist (test) Error in X11() : could not find any X11 fonts Check that the Font Path is correct. Does anybody know this problem

[R] contour doesn't obey cex.axis?

2007-02-16 Thread Greg Howard
I can't seem to control the size of the numeric labels for my contour plots. I am using cex.axis, which works with plot(): this makes the tick mark labels very large plot( 1:3, 1:3, cex.axis=2.0, ) but this doesn't change them: contour( 1:3, 1:3, array( data=0:9, dim=c(3,3) ), cex.axis=2.0, )

Re: [R] sapply again return value

2007-02-16 Thread Mark Lyman
Antje niederlein-rstat at yahoo.de writes: Hello, I used an sapply to get some data back (s - sapply(...) ). The output of s would then deliver something like this: B06_lamp.csv C06_lamp.csv D06_lamp.csv [1,] NULL NULL Numeric,512 [2,] NULL NULL

Re: [R] missing - nonmissing levels

2007-02-16 Thread Jon Minton
-Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: 16 February 2007 18:40 To: Jon Minton Cc: r-help@stat.math.ethz.ch; 'Jon Minton' Subject: Re: [R] missing - nonmissing levels Well, if it is missing, how do you know what level to turn it back into? That is what

Re: [R] Ubuntu Linux and X11

2007-02-16 Thread Dirk Eddelbuettel
On Fri, Feb 16, 2007 at 09:53:39PM +0100, [EMAIL PROTECTED] wrote: i have a problem with creating histograms and plots under ubuntu linux. After creating a vector test i want to make a histogram, but the following error appears: hist (test) Error in X11() : could not find any X11 fonts

[R] Error while trying to update packages in 32-bit R-2.3.1 on Linux

2007-02-16 Thread Bhola, Gautam
Hi I am getting the following error for in R-2.3.1, x86-32bit linux (2.4.21-27.0.2.ELhugemem), while trying to add packages: Error in .readRDS(pfile) : error reading from connection I am not sure what could be possibly wrong. Any help is appreciated. Thanks. -Gautam

Re: [R] Migrating .RData from Windows to Linux?

2007-02-16 Thread Charles C. Berry
On Fri, 16 Feb 2007, Derek Eder wrote: I want to begin a migration of R workspaces from Windows to Ubuntu Linux. (1) Can someone suggest the most appropriate path? dump() ? save() ? (2) Are there any R platform migration related resources out there? (I have not found

[R] reading text file not table

2007-02-16 Thread H. Paul Benton
Hello all, I'm looking for a way to be able to read a text file into R. It's a csv file but when I do txt -read.table(F00.csv, header=T, sep=,) It doesn't read the file properly, and I only get 2 columns. If I open it up in OOc or Excel it open right with 7 columns. What I would really like to do

Re: [R] reading text file not table

2007-02-16 Thread Ted Harding
On 17-Feb-07 H. Paul Benton wrote: Hello all, I'm looking for a way to be able to read a text file into R. It's a csv file but when I do txt -read.table(F00.csv, header=T, sep=,) It doesn't read the file properly, and I only get 2 columns. If I open it up in OOc or Excel it open right with

[R] - using eval(parse(text= ... ))

2007-02-16 Thread Jon Minton
Hi, I'm unsure why I can't use eval(parse(text=...)) to represent the thing I want to assign a value into. e.g. A - c(Good) B - c(Bad) C - c() X - c(A, B, C) eval(parse(text=X[1])) [1] Good eval(parse(text=X[2])) - Z Z [1] Bad eval(parse(text=X[3])) - Ugly Error in file(file, r) :

Re: [R] contour doesn't obey cex.axis?

2007-02-16 Thread Duncan Murdoch
On 2/16/2007 4:18 PM, Greg Howard wrote: I can't seem to control the size of the numeric labels for my contour plots. I am using cex.axis, which works with plot(): this makes the tick mark labels very large plot( 1:3, 1:3, cex.axis=2.0, ) but this doesn't change them: contour( 1:3, 1:3,

Re: [R] convert to binary to decimal

2007-02-16 Thread Jim Regetz
Roland Rau wrote: On 2/16/07, Petr Pikal [EMAIL PROTECTED] wrote: Hi slight modification of your function can be probably even quicker: fff-function(x) sum(2^(which(rev(x))-1)) :-) Petr Yes, your function is slightly but consistently faster than my suggestion. But my tests show still

Re: [R] - using eval(parse(text= ... ))

2007-02-16 Thread Duncan Murdoch
On 2/16/2007 7:13 PM, Jon Minton wrote: Hi, I'm unsure why I can't use eval(parse(text=...)) to represent the thing I want to assign a value into. e.g. A - c(Good) B - c(Bad) C - c() X - c(A, B, C) eval(parse(text=X[1])) [1] Good eval(parse(text=X[2])) - Z Z [1] Bad

Re: [R] Ubuntu Linux and X11

2007-02-16 Thread Yuelin Li
If you are using edgy, try changing your FontPath settings in /etc/X11/xorg.conf (mine listed below). Reboot, and check to see there are no warnings about missing font files in /var/log/Xorg.0.log. Yuelin. Section Files FontPath/usr/share/fonts/X11/100dpi/:unscaled

[R] help with cluster stopping rules

2007-02-16 Thread GRAHAM LEASK
Is there a function available in R that implements Mojena's Upper Tail Rule or that draws a Mojena plot? I would also like to find a function that implements Duda and Hart's stopping rule. Finally with function cophenet how can I achieve a straightforward Cophenet correlation