Re: [R] write.foreign, SPSS on Mac OS X

2005-07-13 Thread Prof Brian Ripley
On Tue, 12 Jul 2005, EJ Nikelski wrote: I have jut installed the foreign package (v 0.8-8) on my OS X machine, and have a bit of a problem writing out a data frame in SPSS format. Specifically, the code file (the .sps format file) seems to write 3 unprintable hex values instead of double

Re: [R] fail in adding library in new version.

2005-07-13 Thread Henrik Bengtsson
I've prepared a Windows batch file that gives you a fresh Windows commando prompt setup for R. You can download it from: http://www.maths.lth.se/help/R/RCMDprompt.bat It has instructions how and where to download necessary software such as 'hhc'. The script setup the PATH assuming default

Re: [R] How to increase memory for R on Soliars 10 with 16GB and 64bit R

2005-07-13 Thread Prof Brian Ripley
On Tue, 12 Jul 2005, Dongseok Choi wrote: My machine is SUN Java Workstation 2100 with 2 AMD Opteron CPUs and 16GB RAM. R is compiled as 64bit by using SUN compilers. I trying to fit quantile smoothing on my data and I got an message as below.

[R] exact values for p-values

2005-07-13 Thread David Duffy
This is obtained from F =39540 with df1 = 1, df2 = 7025. Suppose am interested in exact value such as If it were really necessary, you would have to move to multiple precision. The gmp R package doesn't seem to yet cover this, but FMLIB (TOMS814, DM Smith) is a multiple precision f90 library

[R] Boxcox transformation / homogeneity of variances

2005-07-13 Thread Arnaud Dowkiw
Dear r-helpers, Prior to analysis of variance, I ran the Boxcox function (MASS library) to find the best power transformation of my data. However, reading the Boxcox help file, I cannot figure out if this function (through its associated log-likelihood function) corrects for * normality only *

Re: [R] How to use the function plot as Matlab?

2005-07-13 Thread Ted Harding
On 13-Jul-05 klebyn wrote: Hello, How to use the function plot to produce graphs as Matlab? example in Matlab: a = [1,2,5,3,6,8,1,7]; b = [1,7,2,9,2,3,4,5]; plot(a,'b') hold plot(b,'r') How to make the same in R-package ? I am trying something thus: a - c(1,2,5,3,6,8,1,7)

Re: [R] How to use the function plot as Matlab?

2005-07-13 Thread Robin Hankin
Hi Ted makes a good point... matlab can dynamically rescale a plot in response to plot(...,add=TRUE) statements. For some reason which I do not understand, the rescaling issue is only a problem for me when working in matlab mode. It's not an issue when working in R mode Ted pointed out

Re: [R] Boxcox transformation / homogeneity of variances

2005-07-13 Thread Prof Brian Ripley
Please consult the reference on the help page of that function: it _is_ support software for a book. It implements the Box-Cox procedure (as it says). The original Box-Cox paper has three aims, two of which you have mentioned (but perhaps the most inportant one is the one you have not

Re: [R] How to use the function plot as Matlab

2005-07-13 Thread Prof Brian Ripley
For most purposes it is easiest to use matplot() to plot superimposed plots like this. E.g. x - 0.1*(0:20) matplot(x, cbind(sin(x), cos(x)), pl, pch=1) On Wed, 13 Jul 2005, Robin Hankin wrote: Hi Ted makes a good point... matlab can dynamically rescale a plot in response to

[R] exact values for p-values

2005-07-13 Thread S.O. Nyangoma
Hi David, Since I am looking at very extreme values, it appears I will need FMLIB. Is it an R lib? if so which version? How/where can I download it? Regards. - Original Message - From: David Duffy [EMAIL PROTECTED] Date: Wednesday, July 13, 2005 9:46 am Subject: [R] exact values for

[R] Kronecker matrix product

2005-07-13 Thread Robin Hankin
Hi I want to write a little function that takes a matrix X of size m-by-n, and a list L of length m, whose elements are matrices all of which have the same number of columns but possibly a different number of rows. I then want to get a sort of dumbed-down kronecker product in which X[i,j] is

[R] delete a row from a matrix

2005-07-13 Thread Navarre Sabine
Hi, I would like to know if it's possible to delete a rox from a matrix? fig [,1] [,2] [,3] [,4] [1,]01 0.0 0.2 [2,]01 0.2 0.8 [3,]01 0.8 1.0 [4,]01 NA NA [5,]01 NA NA I would like to delete the 2 rows with NA! Thanks Sabine

Re: [R] Kronecker matrix product

2005-07-13 Thread Berwin A Turlach
RH == Robin Hankin [EMAIL PROTECTED] writes: RH I want to write a little function that takes a matrix X of RH size m-by-n, and a list L of length m, whose elements are RH matrices all of which have the same number of columns but RH possibly a different number of rows. RH I

Re: [R] delete a row from a matrix

2005-07-13 Thread Peter Dalgaard
Navarre Sabine [EMAIL PROTECTED] writes: Hi, I would like to know if it's possible to delete a rox from a matrix? fig [,1] [,2] [,3] [,4] [1,]01 0.0 0.2 [2,]01 0.2 0.8 [3,]01 0.8 1.0 [4,]01 NA NA [5,]01 NA NA I would like

[R] nlme, MASS and geoRglm for spatial autocorrelation?

2005-07-13 Thread Beale, Colin
Hi. I'm trying to perform what should be a reasonably basic analysis of some spatial presence/absence data but am somewhat overwhelmed by the options available and could do with a helpful pointer. My researches so far indicate that if my data were normal, I would simply use gls() (in nlme) and

Re: [R] Kronecker matrix product

2005-07-13 Thread Berwin A Turlach
BT == Berwin A Turlach [EMAIL PROTECTED] writes: tmp - sapply(1:length(L), function(j, mat, list) kronecker(X[j,,drop=FALSE], L[[j]]), mat=X, list=L) Uups, should proof read more carefully before hitting the send button. This should be, of course: tmp - sapply(1:length(L),

[R] GARCH model using fSeries

2005-07-13 Thread Viljoen L [EMAIL PROTECTED]
I am trying to fit a GARCH model in fSeries but up to now without success. I downloaded the the OxConsole Software together with the [EMAIL PROTECTED] 4.0 package and saved the oxl.exe and GarchOxModelling.ox files correctly in the files C:\\Ox\\bin\\oxl.exe and C:\\Ox\\lib\\GarchOxModelling.ox.

[R] Name for factor's levels with contr.sum

2005-07-13 Thread Ghislain Vieilledent
Good morning, I used in R contr.sum for the contrast in a lme model: options(contrasts=c(contr.sum,contr.poly)) Septo5.lme-lme(Septo~Variete+DateSemi,Data4.Iso,random=~1|LieuDit) intervals(Septo5.lme)$fixed lower est. upper (Intercept) 17.0644033 23.106110 29.147816 Variete1 9.5819873

Re: [R] Please help me.....

2005-07-13 Thread Uwe Ligges
Fernando Espíndola wrote: Hi user R, I am try to calculate the spectrum function in two time series. But when plot a single serie, the labels in axes x is in the range 0.1 to 0.6 (frequency), but when calculate de spectrum with ts.union function, the labels x is in the range 1 to 6. I

Re: [R] delete a row from a matrix

2005-07-13 Thread ecoinfo
Hi, May I ask a related question, how to insert a row/column to a matrix? Thanks Xiaohua On 13 Jul 2005 11:38:30 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Navarre Sabine [EMAIL PROTECTED] writes: Hi, I would like to know if it's possible to delete a rox from a matrix? fig

Re: [R] How to use the function plot as Matlab

2005-07-13 Thread Ted Harding
On 13-Jul-05 Prof Brian Ripley wrote: For most purposes it is easiest to use matplot() to plot superimposed plots like this. E.g. x - 0.1*(0:20) matplot(x, cbind(sin(x), cos(x)), pl, pch=1) This, and Robin's suggestion, are good practical solutions especially when only a few graphs (2 or

[R] fitting Weibull distribution on observed percentiles

2005-07-13 Thread Claude Messiaen - Urc Necker
Hi , R Users I'm trying to fit a Weibull ditribution on observed percentiles using nls but it doesn't work. Here is the code I use: is there something wrong ? # p corresponds to percentiles # and q to the observed values # the datas are from the livebirth in france in 1998 distribution

Re: 答复: [R] fail in adding library in new version.

2005-07-13 Thread Duncan Murdoch
Ivy_Li wrote: Dear all, I really appreciate your help. I think I have a little advancement. ^_^ Now I use the package.skeleton() function to create a template. I type: f - function(x,y) x+y g - function(x,y) x-y d - data.frame(a=1, b=2) e - rnorm(1000)

Re: [R] nlme, MASS and geoRglm for spatial autocorrelation?

2005-07-13 Thread Prof Brian Ripley
You seem to want to model spatially correlated bernoulli variables. That's a difficult task, especially as these are bernoulli and not binomial(n1). With a much fuller description of the problem we may be able to help, but I at least have no idea of the aims of the analysis. glmmPQL is

Re: [R] adding a factor column based on levels of another factor

2005-07-13 Thread Karen Kotschy
Hello Thanks for the replies. Merge was what I needed! But Christoph, I will keep your email. What you described is something else I have been wondering how to do in R... Thanks again Karen __ R-help@stat.math.ethz.ch mailing list

Re: [R] delete a row from a matrix

2005-07-13 Thread Adaikalavan Ramasamy
If you want to append to the first/last column or row, then use cbind or rbind. It is a little tricky if you want to insert a row in the middle somewhere. See insertRow in micEcon package. Regards, Adai On Wed, 2005-07-13 at 12:08 +0200, ecoinfo wrote: Hi, May I ask a related question, how to

Re: [R] How to use the function plot as Matlab

2005-07-13 Thread Robin Hankin
On 13 Jul 2005, at 11:01, (Ted Harding) wrote: On 13-Jul-05 Prof Brian Ripley wrote: For most purposes it is easiest to use matplot() to plot superimposed plots like this. E.g. x - 0.1*(0:20) matplot(x, cbind(sin(x), cos(x)), pl, pch=1) This, and Robin's suggestion, are good practical

[R] Memory question

2005-07-13 Thread Kenneth Roy Cabrera Torres
Hi R users and developers: I want to know how can I save memory in R for example: - saving on disk a matrix. - using again the matrix (changing their values) - saving again the matrix on disk in a different file. The idea is that I have a process that generate several matrices, but if I

Re: [R] nlme, MASS and geoRglm for spatial autocorrelation?

2005-07-13 Thread Beale, Colin
My data are indeed bernoulli and not binomial, as I indicated. The dataset consists of points (grid refs) that are either locations of events (animals) or random points (with no animal present). For each point I have a suite of environmental covariates describing the habitat at this point. I was

Re: [R] How to use the function plot as Matlab

2005-07-13 Thread Peter Dalgaard
(Ted Harding) [EMAIL PROTECTED] writes: This is definitely a case where dynamic rescaling could save hassle! Brian Ripley's suggestion involves first building a matrix whose columns are the replications and rows the time-points, and Robin Hankin's could be easily adapted to do the same,

[R] finalize objects

2005-07-13 Thread mkondrin
Hello! How to set function for the whole R-class to be executed when the object is no more referenced from R and garbage collection takes place? I need the function to be applied for the whole class (let it be someRClass) like this someRClass.on.finalize-function(...){...}. I have found

Re: [R] Misbehaviour of DSE

2005-07-13 Thread Ajay Narottam Shah
On Mon, Jul 11, 2005 at 08:27:40AM -0700, Rob J Goedman wrote: Ajay, After installing both setRNG (2004.4-1, source or binary) and dse (2005.6-1, source only), it works fine. Thanks! :-) Now dse1 works, but I get: library(dse2) Warning message: replacing previous import: acf in:

Re: [R] testing for significance in random-effect factors using lmer

2005-07-13 Thread Douglas Bates
On 7/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I would like to know whether it is possible to obtain a value of significance for random effects when aplying the lme or related functions. The default output in R is just a variance and standard deviation measurement. I feel it

[R] problems with MNP

2005-07-13 Thread Joan Serra
Hi all, Does anybody have a hint on what may be going wrong in this R code? I mimic the sample code from the MNP developers but I seem unable to get the choice specific variables right. Thanks, Joan Serra rm(list=ls()) library(foreign) small-read.spss(small.sav) Warning message: small.sav:

[R] Is there a working XML parser for the windows R Version 2.0.1

2005-07-13 Thread Soren Wilkening
Dear all the regular XML package does not work correctly with the R 2.0.1 windows version. Can anybody indicate a suitable alternative ? I need to dynamically read, parse and process a HTML table in R that is available at a certain url. Regards Soren Wilkening -- CENSIX Consulting [EMAIL

Re: [R] Is there a working XML parser for the windows R Version 2.0.1

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Soren Wilkening [EMAIL PROTECTED] wrote: Dear all the regular XML package does not work correctly with the R 2.0.1 windows version. Can anybody indicate a suitable alternative ? I need to dynamically read, parse and process a HTML table in R that is available at a certain url.

Re: [R] Is there a working XML parser for the windows R Version 2 .0.1

2005-07-13 Thread Tuszynski, Jaroslaw W.
I do not know if current XML package suppose to work for windows R Version 2.0.1; however, current version of XML works fine for current version of R (2.1.1). Also, version of XML available when R Version 2.0.1 was current, worked just fine as well. So the answer might be to update your R version.

[R] unexpected par('pin') behaviour

2005-07-13 Thread joerg van den hoff
hi everybody, I noticed the following: in one of my scripts 'layout' is used to generate a (approx. square) grid of variable dimensions (depending on no. of input files). if the no. of subplots (grid cells) becomes moderately large (say 9) I use a construct like ###layout grid

[R] Rd.sty, Sweave, tex4ht

2005-07-13 Thread Paulo Justiniano Ribeiro Jr
Hi I'm using Sweave with tex4th to generate xhtml documents However there seems to be a problem with \Link defined in Rd.sty, since this is also defined in tex4ht.sty My workaround was to replace the lines with \newcommand{\Link} by \providecommand{\Link} in Rd.sty I'm therefore wondering

[R] texture in barplots?

2005-07-13 Thread Adrian Dusa
Dear R list, For some reason I am unable to access neither search.r-project.org, nor http://finzi.psych.upenn.edu/ so I cannot search the archives for a possible answer (I Googled for this but didn't find anything). Is it possible to draw barplots using a texture instead of colors, for a

[R] Random fractal generator in R ?

2005-07-13 Thread Heinz Schild
Does one of the packages of R include functions to generate random fractals as for instance outlined in http://classes.yale.edu/fractals ? Heinz Schild __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] texture in barplots?

2005-07-13 Thread Knut Krueger
Adrian Dusa schrieb: Is it possible to draw barplots using a texture instead of colors, for a black and white printer? barplot(height,.,density=c(4,6,8,10) ...) for each bar one number - this example is for a barplot with 4 bars. with regards Knut Krueger

[R] any reference to get started clustering

2005-07-13 Thread Baoqiang Cao
Dear All, Just start to use the long expected R, my focus will be doing clustering on microarray data, just wonder, anyone can show me any references to conquer the steep learning curve? Thanks! Best regards, Baoqiang Cao __

Re: [R] texture in barplots?

2005-07-13 Thread Adrian Dusa
On Wednesday 13 July 2005 17:36, Knut Krueger wrote: Adrian Dusa schrieb: Is it possible to draw barplots using a texture instead of colors, for a black and white printer? barplot(height,.,density=c(4,6,8,10) ...) for each bar one number - this example is for a barplot with 4 bars.

Re: [R] nlme, MASS and geoRglm for spatial autocorrelation?

2005-07-13 Thread Ruben Roa
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Beale, Colin Sent: 13 July 2005 10:15 To: Prof Brian Ripley Cc: r-help@stat.math.ethz.ch Subject: Re: [R] nlme, MASS and geoRglm for spatial autocorrelation? My data are indeed bernoulli and not

Re: [R] any reference to get started clustering

2005-07-13 Thread Adaikalavan Ramasamy
Welcome to R. The learning curve is well worth the benefits. If you are used to Eisen clustering and other fancy softwares to do clustering, then you might be a little disappointed with R's clustering ability of thousands of genes. But then again clustering is an exploratory tool and I see no

[R] R and stats courses

2005-07-13 Thread Highland Statistics Ltd.
Apologies for cross-posting -- Final call. There are still 3 places available on each course -- We would like to announce three statistics courses in and around Aberdeen, UK Course 1: Regression, GLM, GAM, mixed modelling and tree models Course 2: Multivariate analysis and multivariate time

Re: [R] texture in barplots?

2005-07-13 Thread Knut Krueger
Knut Krueger schrieb: Adrian Dusa schrieb: Is it possible to draw barplots using a texture instead of colors, for a black and white printer? barplot(height,.,density=c(4,6,8,10) ...) for each bar one number - this example is for a barplot with 4 bars. forgot

Re: [R] Name for factor's levels with contr.sum

2005-07-13 Thread Christoph Buser
Dear Ghislain I do not know a general elegant solution, but for some applications the following example may be helpful: ## Artificial data for demonstration: group is fixed, species is random dat - data.frame(group = c(rep(A,20),rep(B,17),rep(C,24)), species = c(rep(sp1, 4),

Re: [R] High resolution plots

2005-07-13 Thread Luis Tercero
Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots generated by R? I am working with R 2.0.1 in WindowsXP and am having similar problems as Knut Krueger in printing high-quality plots. I have

Re: [R] write.foreign, SPSS on Mac OS X

2005-07-13 Thread EJ Nikelski
Hello, Thanks for your help Brian. You are correct in assuming that I am trying to use write.foreign to export a data frame for use in SPSS, using the usual format: write.foreign(df, dataFile, codeFile, package=SPSS) Your suggestion that the unprintable characters represent UTF-8

[R] Where's iris?

2005-07-13 Thread Ruben Roa
Hi: Where is the iris data set actually located in the R 2.1.0 folder (under W XP)? Is it a text file or it is a binary file? Ruben __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] texture in barplots?

2005-07-13 Thread Knut Krueger
Knut Krueger schrieb: Adrian Dusa schrieb: Is it possible to draw barplots using a texture instead of colors, for a black and white printer? barplot(height,.,density=c(4,6,8,10) ...) for each bar one number - this example is for a barplot with 4 bars. forgot

Re: [R] Where's iris?

2005-07-13 Thread Berton Gunter
help.search(iris) tells you. You should always try R's built-in help resources **before** posting. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original

Re: [R] Where's iris?

2005-07-13 Thread Uwe Ligges
Ruben Roa wrote: Hi: Where is the iris data set actually located in the R 2.1.0 folder (under W XP)? Is it a text file or it is a binary file? It is a special binary file in package datasets in the binary distribution. Just dump() or write.table() on the data to get a text representation

Re: [R] exact values for p-values

2005-07-13 Thread Spencer Graves
so my chi-square approximation was not very good: pchisq(39540, 1, lower.tail=FALSE, log.p=TRUE) [1] -19775.52 (pchisq(39540, 1, lower.tail=FALSE, log.p=TRUE) + /log(10)) [1] -8588.398 ... roughly 1e-8588. With a few hours with Abramowitz and Stegun, I suspect I could

[R] maps drawing

2005-07-13 Thread m p
Hello, is there a package in R that would allow map drawing: coastlines, country/state boundaries, maybe topography, rivers etc? Thanks for any guidance, Mark __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] maps drawing

2005-07-13 Thread Uwe Ligges
m p wrote: Hello, is there a package in R that would allow map drawing: coastlines, country/state boundaries, maybe topography, rivers etc? What about package maps? Moreover, what about reading the posting guide and trying to search yourself at first. I think it is almost impossible not

Re: [R] Memory question

2005-07-13 Thread Huntsinger, Reid
One way I do this is to use Luke Tierney's active bindings. I make an active binding of a name to a function which either loads or saves the object. Then the name behaves like the R object it's replacing. This works nicely as long as I don't need lots of random accesses to the matrix. I'd be

Re: [R] maps drawing

2005-07-13 Thread Francisco J. Zagmutt
Try RSiteSearch(map) or help.search(map) Cheers Francisco From: m p [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] maps drawing Date: Wed, 13 Jul 2005 09:15:33 -0700 (PDT) Hello, is there a package in R that would allow map drawing: coastlines, country/state boundaries, maybe

[R] Fieller's Conf Limits and EC50's

2005-07-13 Thread Stephen B. Cox
Folks I have modified an existing function to calculate 'ec/ld/lc' 50 values and their associated Fieller's confidence limits. It is based on EC50.calc (writtien by John Bailer) - but also borrows from the dose.p (MASS) function. My goal was to make the original EC50.calc function flexible

Re: [R] Please help me.....

2005-07-13 Thread Francisco J. Zagmutt
Dear Fernando Please read the posting guide. If you want to get an answer to your question you need to be specific about your analysis, and provide examples of the data structure and code that you tried and didn't work. Francisco

Re: [R] maps drawing

2005-07-13 Thread Spencer Graves
help.search(asdf) only works if you have asdf in something that is installed. RSiteSearch(asdf), on the other hand, works for anything in the R archives. This does NOT include, however, the contents of R News, which you can search via http://www.r-project.org/ - Newsletter - [Table

Re: [R] write.foreign, SPSS on Mac OS X

2005-07-13 Thread Thomas Lumley
On Wed, 13 Jul 2005, EJ Nikelski wrote: Your suggestion that the unprintable characters represent UTF-8 encoded Unicode left and right double quotes also appears correct. Now, although the suggested work-around may well help, the foreign package does seem to be creating a corrupted file. That

Re: [R] write.foreign, SPSS on Mac OS X

2005-07-13 Thread Prof Brian Ripley
On Wed, 13 Jul 2005, EJ Nikelski wrote: Hello, Thanks for your help Brian. You are correct in assuming that I am trying to use write.foreign to export a data frame for use in SPSS, using the usual format: write.foreign(df, dataFile, codeFile, package=SPSS) Your suggestion that the

Re: [R] How to use the function plot as Matlab?

2005-07-13 Thread Greg Snow
Ted Harding [EMAIL PROTECTED] 07/13/05 02:12AM [snip] I'm not sufficiently acquainted with the internals of plot and friends to anticipate the answer to this question; but, anyway, the question is: Is it feasible to include, as a parameter to plot, lines and points,

Re: [R] Help with Mahalanobis

2005-07-13 Thread Thomas Petzoldt
Hello, a proposed solution of Bill Venables is archieved on the S-News mailing list: http://www.biostat.wustl.edu/archives/html/s-news/2001-07/msg00035.html and if I remember it correctly (and if the variance matrix is estimated from the data), another similar way is simply to use the Euclidean

Re: [R] problems with MNP

2005-07-13 Thread Kosuke Imai
Hi Joan, You need to do: res1 - mnp(PREVOTE3 ~ 1, choiceX = list(1=UCLC, 2=UDLC, 3=UPLC), cXnames = ut, data = small, verbose = TRUE)

Re: [R] How to increase memory for R on Soliars 10 with 16GB and 64bit R

2005-07-13 Thread Dongseok Choi
Thank you very much for your help!! Now, it runs without any problem. Is it going to be fixed in the next release? Thanks again, Dongseok Dongseok Choi, Ph.D. Assistant Professor Division of Biostatistics Department of Public Health Preventive Medicine Oregon Health Science University 3181

[R] plot the number of replicates at the same point

2005-07-13 Thread Kerry Bush
Dear R-helper, I want to plot the following-like data: x y 1 1 1 1 1 2 1 3 1 3 1 4 .. In the plot that produced, I don't want to show the usual circles or points. Instead, I want to show the number of replicates at that point. e.g. at the position of (1,1), there are 2 obsevations, so a

[R] convert to chron objects

2005-07-13 Thread Young Cho
Hi, I have a column of a dataframe which has time stamps like: eh$t[1] [1] 06/05/2005 01:15:25 and was wondering how to convert it to chron variable. Thanks a lot. Young. __ R-help@stat.math.ethz.ch mailing list

Re: [R] plot the number of replicates at the same point

2005-07-13 Thread Jean Eid
You can do the following (don't know it this is the most efficient way but it works) temp-read.table(your file to read the data, header=T) temp1-table(temp) plot(temp$x, temp$y, cex=0) text(as.numeric(rownames(temp1)), as.numeric(colnames(temp1)), temp1) HTH On Wed, 13 Jul 2005, Kerry Bush

[R] Efficient testing for +ve definiteness

2005-07-13 Thread Makram Talih
Dear R-users, Is there a preferred method for testing whether a real symmetric matrix is positive definite? [modulo machine rounding errors.] The obvious way of computing eigenvalues via E - eigen(A, symmetric=T, only.values=T)$values and returning the result of !any(E = 0) seems less efficient

[R] read.table

2005-07-13 Thread Weiwei Shi
Hi, I have a question on read.table. I have a dataset with 273,000 lines and 195 columns. I used the read.table to load the data into R: trn-read.table('train1.dat', header=F, sep='|', na.strings='.') I found it takes forever. then I run 1/10 of the data (test) using read.table again. And this

Re: [R] read.table

2005-07-13 Thread Weiwei Shi
add: I used trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, ncol=195) it is done. so it seems that I just have no patience to wait for half an hour :) but i still have that question: is there a way to track the process if it takes too long. Could we stop in the middle to

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Young Cho [EMAIL PROTECTED] wrote: Hi, I have a column of a dataframe which has time stamps like: eh$t[1] [1] 06/05/2005 01:15:25 and was wondering how to convert it to chron variable. Thanks a lot. Try this: # test data frame eh containing a factor variable t eh

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: add: I used trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, ncol=195) it is done. so it seems that I just have no patience to wait for half

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots generated by R? I am working with R 2.0.1 in WindowsXP and am having similar problems

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
[I had some email problems and am sending this again. Sorry if you get it twice.] You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: add: I used trn-matrix(scan('train1.dat', sep='|', na.string='.'),

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
[I had some emails problems so I am sending this again. Sorry if you get it twice.] On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/13/05, Young Cho [EMAIL PROTECTED] wrote: Hi, I have a column of a dataframe which has time stamps like: eh$t[1] [1] 06/05/2005

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
[I had some email problems so I am sending this again. Sorry if you get this twice.] On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example of a

Re: [R] read.table

2005-07-13 Thread Weiwei Shi
that sort of works for my purpose. btw, is there a bettter way to get data.frame by passing around matrix(). Since I could not find data.frame() with nrow or ncol arguments. so i have to use matrix first and then as.data.frame to convert it. is there any other (better) way? weiwei On 7/13/05,

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
Maybe you don't really need a data frame in the first place? You were concerned with speed and matrices tend to have higher performance than data frames. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: that sort of works for my purpose. btw, is there a bettter way to get data.frame by

Re: [R] read.table

2005-07-13 Thread Weiwei Shi
there is another problem since last time i forgot byrow :( trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, ncol=195, byrow=T) Read 53338155 items Error: cannot allocate vector of size 416704 Kb please help with this 'simple' reading task. weiwei On 7/13/05, Weiwei Shi

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
Try reading it into and transposing the matrix afterwards. Don't know if that would work but its worth a try. Actually if you are having problems read it into a vector, check that its of the required size, just in case, and then turn it into a matrix and transpose it. On 7/13/05, Weiwei Shi

Re: [R] Where's iris?

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Ruben Roa [EMAIL PROTECTED] wrote: Hi: Where is the iris data set actually located in the R 2.1.0 folder (under W XP)? Is it a text file or it is a binary file? Ruben Uwe has already explained how to get it in text form; however, if you are curious about its original format in R

Re: [R] read.table

2005-07-13 Thread Weiwei Shi
i think what you meant is trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=195, ncol=273529) and then transpose it. However: Error: cannot allocate vector of size 512000 Kb the answer is no :( I think i am going to write my own function to split the result from scan but not

Re: [R] texture in barplots?

2005-07-13 Thread Peter Dalgaard
Adrian Dusa [EMAIL PROTECTED] writes: On Wednesday 13 July 2005 17:36, Knut Krueger wrote: Adrian Dusa schrieb: Is it possible to draw barplots using a texture instead of colors, for a black and white printer? barplot(height,.,density=c(4,6,8,10) ...) for each bar one

Re: [R] read.table

2005-07-13 Thread Weiwei Shi
Sorry for last post. I don't know why i got the error message last time. but if i did in the following way: t-scan('train1.dat', sep='|', na.string='.') t2-matrix(t, nrow=195, ncol=273529) t3-t(t2) t4-as.data.frame(t3) now I got what i needed. Thanks a lot for Gabor's prompt help. weiwei On

Re: [R] High resolution plots

2005-07-13 Thread Peter Dalgaard
Luis Tercero [EMAIL PROTECTED] writes: Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots generated by R? I am working with R 2.0.1 in WindowsXP and am having similar problems as Knut

[R] Proportion test in three-chices experiment

2005-07-13 Thread Rafael Laboissiere
Hi, I wish to analyze with R the results of a perception experiment in which subjects had to recognize each stimulus among three choices (this was a forced-choice design). The experiment runs under two different conditions and the data is like the following: N1 : count of trials in condition

[R] help: how to get the position of a value in a matrix

2005-07-13 Thread wu sz
Hello, I have a data set matrix of 1200 * 15. How can I get the position of a specific value in the matrix? I use seq(along = x)[x value] to look for the position of the value in the matrix, but seq can just find the sequence position row by row in the matrix, not a real position (like

Re: [R] help: how to get the position of a value in a matrix

2005-07-13 Thread Liaw, Andy
Use which(..., arr.ind=TRUE); e.g., m - matrix(runif(12), 3, 4) which(m .8, arr.ind=TRUE) row col [1,] 1 3 [2,] 2 3 [3,] 3 3 [4,] 3 4 m [,1] [,2] [,3] [,4] [1,] 0.2148183 0.08251853 0.9444718 0.4487148 [2,] 0.5386863 0.49673282 0.8054240

[R] crossed random fx nlme lme4

2005-07-13 Thread Emilio A. Laca
I need to specify a model similar to this lme.formula(fixed = sqrt(lbPerAc) ~ y + season + y:season, data = cy, random = ~y | observer/set, correlation = corARMA(q = 6)) except that observer and set are actually crossed instead of nested. observer and set are factors y and lbPerAc are

Re: [R] help: how to get the position of a value in a matrix

2005-07-13 Thread Simon Blomberg
See ?which Hint: arr.ind=TRUE Simon. At 09:28 AM 14/07/2005, wu sz wrote: Hello, I have a data set matrix of 1200 * 15. How can I get the position of a specific value in the matrix? I use seq(along = x)[x value] to look for the position of the value in the matrix, but seq can just find the

[R] stripchart usage and alternatives

2005-07-13 Thread Mike R
r=1:10 u=c(a,a,a,b,b,b,c,d,e,e) uf = factor(u) rm = tapply(r, uf, mean) stripchart(r~u,vertical=TRUE,pch=21) stripchart(rm~levels(uf),vertical=TRUE,pch=3,add=TRUE) -- the above code creates a scatter plot of nominal data are there alternatives to generate the same or similar kind of

Re: [R] crossed random fx nlme lme4

2005-07-13 Thread Simon Blomberg
At 09:35 AM 14/07/2005, Emilio A. Laca wrote: I need to specify a model similar to this lme.formula(fixed = sqrt(lbPerAc) ~ y + season + y:season, data = cy, random = ~y | observer/set, correlation = corARMA(q = 6)) except that observer and set are actually crossed instead of nested. Does

Re: [R] Efficient testing for +ve definiteness

2005-07-13 Thread Spencer Graves
My preference is to test see if the smallest eigenvalue is less than something like sqrt(.Machine$double.eps) times the largest. This may be too conservative, but if the ratio of the smallest to the largest is less than some small number like that, the inverse of such a real

Re: [R] Memory question

2005-07-13 Thread Spencer Graves
What kinds of matrices? There are facilities in the Matrix and SparseM packages that might help for sparse matrices. If they are N x k where N is large and k is not, can you compute something like the QR decomposition and get away with keeping only the R part for most of your

[R] anova.lmlist output change

2005-07-13 Thread Ross Darnell
R-colleagues I have adapted the anova.lmlist function to use the model object name as the first column in the output instead of the string Model n. If there is general agreement can the change be implemented into the stats package? Regards Ross Darnell -- University of Queensland, Brisbane

  1   2   >