Re: [R] Fwd: R-Help

2006-12-07 Thread Uwe Ligges
Why do you repost this request to R-help? I already pointed you to the package maintainer! Uwe Ligges amna khan wrote: -- Forwarded message -- From: amna khan [EMAIL PROTECTED] Date: Dec 6, 2006 10:28 PM Subject: R-Help To: [EMAIL PROTECTED] Respected Sir I am a very new

Re: [R] Splitting a dataframe at the results of tapply

2006-12-07 Thread Dimitris Rizopoulos
try this: dat - data.frame(Id, Noise, Height) ## dat - dat[order(dat$Id), ] ind - unlist(tapply(dat$Noise, dat$Id, function(x) x == max(x))) dat[ind, ] dat[!ind, ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health

Re: [R] Heteroscedasticity consistent standard errors for Spatial error models

2006-12-07 Thread Roger Bivand
On Thu, 7 Dec 2006, Achim Zeileis wrote: On Thu, 7 Dec 2006, Samarasinghe, Oshadhi Erandika wrote: Hello, Could anyone please tell me how to estimate Heteroscedasticity Consistent standard errors for a Spatial error model? All the functions I have looked at only works for lm objects.

[R] Simulation in R

2006-12-07 Thread justin bem
Dear Alexender ! In the instruction stichproben[i] - samp_i , samp_i is a vector while stichproben[i] is vector element It can be better to consider stichproben as a list at beginning e.g stichproben-list(0,0) stichproben[[i]]-samp_i will work This instruction is ix -

Re: [R] errors when setting up R2.4.0-win32.exe

2006-12-07 Thread Peter Dalgaard
zhijie zhang wrote: Dear Ruser, Today, i download R2.4.0-win32.exe, but can't set it up successfully. The error informaiton is : *0x38e4memory quoted by ox6c7f22b3 can't be readonly.* My operating system in WindowXP. Where goes wrong? Thanks. If your computer is speaking Chinese,

Re: [R] beginning my R-learning

2006-12-07 Thread Michael Dewey
At 22:16 04/12/2006, Michael McCulloch wrote: Hello, I'm just beginning to learn R. What books/online learning modules with datasets would you suggest? Thank you! If a) you already know some statistics b) you want to use R as a tool in your applied statistical work then @BOOK{venables02,

[R] Betr.: Re: Splitting a dataframe at the results of tapply

2006-12-07 Thread E. Gordijn
Hi Dimitris, This works fine. Thanks!, Ed -- -- Ed Gordijn Adviseur geluidscapaciteit Amsterdam Airport Schiphol Business Area Aviation (A/CAP/EC) Postbus 7501, 1118 ZG Schiphol Bezoekadres: Evert v/d Beekstraat 202, 1118 CP Schiphol tel 020 601 32 22

[R] POSIX and summer savings time redux

2006-12-07 Thread Derek Eder
When I tried Professor Ripley's example (below), the tz argument failed to adjust clock time from UTC. (z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000) [1] 2006-12-06 09:42:15 UTC format(z, %Y-%m-%d %H:%M:%OS3,tz = CET) [1] 2006-12-06 09:42:15.729 # expected CET (Central

Re: [R] POSIX and summer savings time redux

2006-12-07 Thread Prof Brian Ripley
CET is not a valid timezone *on Windows*: please do RTFM. E.g. ?Sys.timezone says 'Sys.timezone' returns an OS-specific character string, possibly an empty string. It may be possible to set the timezone via the environment variable 'TZ': see 'as.POSIXlt'. Windows is

Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-07 Thread Uwe Ligges
Etienne wrote: I'm using barplot with the following call: barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE) The example is not reproducible and poorly formatted. Please read the posting guide.

Re: [R] lmer, p-values and all that

2006-12-07 Thread Dan Bebber
Hello, I've just located the illuminating explanation by Douglas Bates on degrees of freedom in mixed models. The take-home message appears to be: don't trust the p-values from lme. Questions: Should I give up hypothesis testing for fixed effects terms in mixed models? Has my time spent reading

Re: [R] change factor level 1,2,3 to red,blue,dark

2006-12-07 Thread Uwe Ligges
Aimin Yan wrote: I am new to R. Maybe this is very simple question. I have a dataframe, there is column that is factor. This factor has three level that 1,2,3. Now I want to change these level(1,2,3) to level(red,blue,dark). Does anybody how to do this job? levels(dataframe$column) -

Re: [R] change factor level 1,2,3 to red,blue,dark

2006-12-07 Thread Gregor Gorjanc
Aimin Yan aiminy at iastate.edu writes: I am new to R. Maybe this is very simple question. I have a dataframe, there is column that is factor. This factor has three level that 1,2,3. Now I want to change these level(1,2,3) to level(red,blue,dark). Does anybody how to do this job? levels()

[R] Calculating distance given coordinates

2006-12-07 Thread Anirudh V. S. Ruhil
Given the following data (see below) on nest locations (fid.albers = 149, 148, etc.), I need to (a) calculate the distance between all fid pairs, and (b) flag all nests within an user-specified radius. What syntax will accomplish both tasks? If it helps, I have the nest locations as eastings

[R] Taguchi Design

2006-12-07 Thread İbrahim Mutlay
Dear R Users, If it is possible, i would like to learn whether a R package that can be used for Taguchi design is available. Sincerely -- Ýbrahim Mutlay [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Philip Leifeld
Thanks, David. I tried converting my rectangular matrix to a network object and then back to a square matrix. This works for a small artificial dataset (e.g. 2x5), but when I try this on my 1790x45 or transposed 45x1790 matrix, R keeps working for a couple of minutes and then crashes

Re: [R] Taguchi Design

2006-12-07 Thread İbrahim Mutlay
2006/12/7, Chuck Cleland [EMAIL PROTECTED]: Ýbrahim Mutlay wrote: Dear R Users, If it is possible, i would like to learn whether a R package that can be used for Taguchi design is available. Ibrahim: Have you considered functions in the AlgDesign package?

[R] Help to understand an Error using summary to an mcmc object

2006-12-07 Thread gsmatos1
Hi, I used the MCMCirtKd function of MCMCpack: posterior2 - MCMCirtKd(data, dimensions = 2, +burnin = 5000, mcmc = 5, thin = 10, + verbose = 1, B0 = .25, store.item = TRUE, item.constraints = beta.constraints) And after apply the comand summary() I got some

[R] templating library for R

2006-12-07 Thread Ido M. Tamir
Hi, does anybody know of a templating library for R, like velocity or freemarker? It doesn't have to be very fancy just a bit better than sub in replacing tags in a text (not necessarily html) file. thank you very much for your answer. Ido __

[R] Merging two data sets

2006-12-07 Thread Megh Dal
Dear all R users, Suppose I have two datasets: g = 8/11/200592.75 9/11/200592.30 10/11/200592.55 11/11/200593.90 11/14/200594.20 11/15/200594.40 11/16/2005

[R] [R-pkgs] trip package on CRAN

2006-12-07 Thread Michael Sumner
Hello, The 'trip' package provides extensions to the 'sp' spatial classes for animal track data. Trip objects are created from SpatialPointsDataFrame objects by specifying the columns containing ID and date-time data. Argos formats can be read directly, and there are functions for basic

Re: [R] Merging two data sets

2006-12-07 Thread Leeds, Mark \(IED\)
if you read them in as zoo objects , you can then use merge.zoo but but I need to Send you an example of reading them in as zoo objects. Hold on. I also have your binders on my shelf ready to send. I've just been forgetting/busy. -Original Message- From: [EMAIL PROTECTED]

Re: [R] Summary shows wrong maximum

2006-12-07 Thread Mike Prager
Bert-- Well, in an attempt to be pithy, I think I lost my message. The comment was directed not at you specifically, but at the idea that, given four print positions, one would ever want to print zeroes instead of data without an explicit warning. I quite agree with your comments on precision.

Re: [R] test of spatial dependence?? - ask an ecologist?

2006-12-07 Thread David Farrar
Although you don't have coordinates, there has to be some kind of information on spatial relationships. (I am likely saying the same thing as Roger.) Let me see if I have this right. Some large area is partitioned into cells (polygons in an ArcInfo shape file?) and, within each

Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Philip Leifeld
Thanks, David. I tried converting my rectangular matrix to a network object and then back to a square matrix. This works for a small artificial dataset (e.g. 2x5), but when I try this on my 1790x45 or transposed 45x1790 matrix, R keeps working for a couple of minutes and then crashes

[R] Calling R functions in Delphi

2006-12-07 Thread Anna Belova
Dear All, Thank you very much for all the insights! We truly appreciate your thought and your time. --Anna - Anna Belova Abt Associates Inc. 4800 Montgomery Ln, St 600 Bethesda, MD-20814 phone: 301-347-5304 http://www.abtassociates.com/environment

[R] groupedData Error Using outer=TRUE

2006-12-07 Thread Rick Bilonick
I'm using groupedData from nlme. I set up a groupedData data.frame with outer=~group1. When I try to plot with outer=TRUE, I get subscript out of bounds. This happens most of the time. When it works, I get spaghetti-type plots for comparing groups. But I don't understand why it doesn't usually

[R] FW: test of spatial dependence?? - ask a geographer (was ask an ecologist)?

2006-12-07 Thread Marshall Feldman
No, you do not necessarily need the XY coordinates. You can also use polygon (field, in your case) adjacency information. See Rogerson, Peter A. 2001. _Statistical methods for geography_. Thousand Oaks: Sage. You might also look at GeoDA, a free and soon-to-be open source spatial analysis

Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Martin Maechler
Phil == Philip Leifeld [EMAIL PROTECTED] on Tue, 05 Dec 2006 22:30:02 +0100 writes: Phil Dear all, Phil how can I convert an m x n incidence matrix into an m x m adjacency Phil matrix or an n x n adjacency matrix? The current matrix contains binary Phil data, hence the

[R] plot SVM

2006-12-07 Thread Aimin Yan
I use svm , then I want to do like this But give me this error. Does anyone know how to solve these? Aimin plot(m.svm,p5.new,As~Cur) Error in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$scaled:center, : (subscript) logical subscript too long

[R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Dear Rexperts, after building R 2.4.0 from source in a temporary directory (*without* installation), and subsequently moving the whole source/build tree to another location, I have noticed that I had to change the variables R_SHARE_DIR, R_INCLUDE_DIR, and R_DOC_DIR in the wrapper-script

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Marc Schwartz
On Thu, 2006-12-07 at 19:34 +0200, Ivailo Stoyanov wrote: Dear Rexperts, after building R 2.4.0 from source in a temporary directory (*without* installation), and subsequently moving the whole source/build tree to another location, I have noticed that I had to change the variables

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
When you moved the source/build tree to another location, did you use 'make install' as root, or did you use 'mv' or 'cp'? No, I haven't used make install because I prefer to run R from within the build location. The former is the _proper_ way to actually install R, after building from

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Peter Dalgaard
Ivailo Stoyanov wrote: When you moved the source/build tree to another location, did you use 'make install' as root, or did you use 'mv' or 'cp'? No, I haven't used make install because I prefer to run R from within the build location. The former is the _proper_ way to actually

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Marc Schwartz
On Thu, 2006-12-07 at 20:15 +0200, Ivailo Stoyanov wrote: When you moved the source/build tree to another location, did you use 'make install' as root, or did you use 'mv' or 'cp'? No, I haven't used make install because I prefer to run R from within the build location. The former is

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Peter Dalgaard wrote: [snip] AFAIK, the approach of running R from within the build location is fully valid as it is noted at the end of section 2.1 Simple compilation, just above the cited one: Yes, but then it is not actually installed. [snip] ... Note: you do not need to install R:

[R] making a grid of points

2006-12-07 Thread Ross Boylan
I'd like to evaluate a function at each point on a 2 or 3-D grid. Is there some function that already does this, or generates the grid of points? My search has led me to the grid and lattice packages, and I found a reference to the sp package (e.g., SpatialGrid) for this. There are things in

Re: [R] making a grid of points

2006-12-07 Thread Peter Alspach
Ross I think you want ?expand.grid BTW, help.search('grid') finds this. Cheers .. Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan Sent: Friday, 8 December 2006 8:03 a.m. To: r-help Subject: [R] making a grid of

Re: [R] making a grid of points

2006-12-07 Thread Ross Boylan
On Fri, 2006-12-08 at 08:09 +1300, Peter Alspach wrote: Ross I think you want ?expand.grid BTW, help.search('grid') finds this. Cheers .. Peter Alspach I can't believe I missed that--my eye just jumped to all the stuff in the grid package. Thank you. -Original

Re: [R] making a grid of points

2006-12-07 Thread Roger Bivand
On Thu, 7 Dec 2006, Ross Boylan wrote: I'd like to evaluate a function at each point on a 2 or 3-D grid. Is there some function that already does this, or generates the grid of points? My search has led me to the grid and lattice packages, and I found a reference to the sp package (e.g.,

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Marc Schwartz wrote: I have not validated this that will do it, but short of re-building R in the new location, this should work I think. Many of the environmental vars are hard coded during the build process and then modified during a make install based upon build time configuration options.

Re: [R] groupedData Error Using outer=TRUE

2006-12-07 Thread Deepayan Sarkar
On 12/7/06, Rick Bilonick [EMAIL PROTECTED] wrote: I'm using groupedData from nlme. I set up a groupedData data.frame with outer=~group1. When I try to plot with outer=TRUE, I get subscript out of bounds. This happens most of the time. When it works, I get spaghetti-type plots for comparing

Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Thanks to the valuable hints posted, I managed to track down the source of the problem -- a copy of the *uncorrected* /usr/lib/R/bin/R script was left over in /usr/bin. Thank you again for the patience! Greets, Ivailo __ R-help@stat.math.ethz.ch

Re: [R] Heteroscedasticity consistent standard errors for Spatial error models

2006-12-07 Thread Samarasinghe, Oshadhi Erandika
Thank you very much for your help, much appreciated. Regards, Oshadhi Samarasinghe RA Department of Economics University of Auckland New Zealand -Original Message- From: Roger Bivand [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 December 2006 10:18 p.m. To: Achim Zeileis Cc:

[R] I do not understand this

2006-12-07 Thread Tom Backer Johnsen
A few days ago there was a thread on calling R from Delphi to which there were several useful responses. Now I responded as well, with what I regard as a useful contribution. Shortly after that, I was not able to able to see the thread in my newsreader (Thunderbird). Suddenly, yesterday I

Re: [R] I do not understand this

2006-12-07 Thread Francisco J. Zagmutt
I use thunderbird as my newsreader and I see the thread just fine. So, don't worry, nobody has deleted what you regard as a useful contribution. Regards Francisco Dr. Francisco J. Zagmutt College of Veterinary Medicine and Biomedical Sciences Colorado State University Tom Backer Johnsen

Re: [R] I do not understand this

2006-12-07 Thread Peter Dalgaard
Tom Backer Johnsen wrote: A few days ago there was a thread on calling R from Delphi to which there were several useful responses. Now I responded as well, with what I regard as a useful contribution. Shortly after that, I was not able to able to see the thread in my newsreader

[R] Simulation in R - Part 2

2006-12-07 Thread Alexander Geisler
Hello! So, the simulation works (drawing 100 samples and then calculate the model for each sample). Here is the code: --snip-- # sample size n=200 ergebnisse200 - rep(0, each=100) stichproben200 - vector(“list”, 100) default200 - rep(0, each=100) for (i in seq(1:100)) { n - dim(daten)[1]

Re: [R] templating library for R

2006-12-07 Thread Gabor Grothendieck
I am not familiar with velocity or freemarker but the gsubfn package can do string interpolation somewhat similar to perl. The gsubfn and strapply functions in that package can handle arbitrary regular expressions in a similar way. See: http://code.google.com/p/gsubfn/ On 12/7/06, Ido M.

[R] svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok, but plot(m.svm,p5.new,As~Cur) is not ok Anyone know why? install.packages(e1071) library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) -

Re: [R] I do not understand this

2006-12-07 Thread Tom Backer Johnsen
Peter Dalgaard wrote: Tom Backer Johnsen wrote: A few days ago there was a thread on calling R from Delphi to which there were several useful responses. Now I responded as well, with what I regard as a useful contribution. Shortly after that, I was not able to able to see the thread in

[R] How to use read.xls in R

2006-12-07 Thread Lisa Wang
Hello there, In gdata package, read.xls is to be used for reading excel data (from windows). The following is my code:('C:/session/sampledata.xls' is where the file is stored) data1-read.xls('C:/session/sampledata.xls',sheet=1) and I got the following error message: Error in system(cmd, intern

Re: [R] How to use read.xls in R

2006-12-07 Thread Sundar Dorai-Raj
Lisa Wang said the following on 12/7/2006 3:01 PM: Hello there, In gdata package, read.xls is to be used for reading excel data (from windows). The following is my code:('C:/session/sampledata.xls' is where the file is stored) data1-read.xls('C:/session/sampledata.xls',sheet=1) and

Re: [R] lmer, p-values and all that

2006-12-07 Thread Simon Blomberg
Try using mcmcsamp() to sample from the posterior distribution of the parameter estimates. You can calculate a p-value from that, if that is your desire. Instructions are in the R wiki: http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests HTH, Simon. Dan Bebber wrote: Hello,

Re: [R] How to use read.xls in R

2006-12-07 Thread Gabor Grothendieck
You need perl installed for it to work. Although you normally would not need to use them note the verbose= and perl= arguments on the read.xls command. If you don't want to install perl try using RODBC: library(RODBC) z - odbcConnectExcel(/a.xls) dd - sqlFetch(z,Sheet1)

Re: [R] How to use read.xls in R

2006-12-07 Thread Francisco J. Zagmutt
Or alternatively you can use xlsReadWrite package install.packages(xlsReadWrite) library(xlsReadWrite) read.xls(sampledata.xls) Regards, Francisco Dr. Francisco J. Zagmutt College of Veterinary Medicine and Biomedical Sciences Colorado State University Gabor Grothendieck wrote: You need

Re: [R] groupedData Error Using outer=TRUE

2006-12-07 Thread Andrew Robinson
Rick, I think that it will be easier for us to comment if you send us reproducible code. Cna you reproduce the error, for example, using one of the datasets that accompanise the nlme package? If so, please send us that code. If not, then there could bea problem with your data. Either way,

[R] please help me for svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok, but plot(m.svm,p5.new,As~Cur) is not ok Anyone know why? install.packages(e1071) library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) -

[R] please help me for svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok, but plot(m.svm,p5.new,As~Cur) is not ok Anyone know why? install.packages(e1071) library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) -

[R] svm code, what is wrong here?

2006-12-07 Thread Aimin Yan
install.packages(e1071) Warning: package 'e1071' is in use and will not be installed library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) attach(p5) The following object(s) are masked from p5 ( position 3 ) : Aa As Cur Ms

[R] plot.svm

2006-12-07 Thread Aimin Yan
where is plot.svm method? I just find plot(svm, data, formula) method Aimin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] formula format for parameter estimation

2006-12-07 Thread Wayne Delport
Hello, I am trying to input the following formula into R for parameter estimation. I don't quite have the just of formula syntax. I understand simple basic regression (y ~ x), but how do I do the ff: y = ( b0*x )/(x + b1), where b0 and b1 are parameters that need to be solved. Any