[R] Memory limitation in GeoR - Windows or R?

2004-02-26 Thread Patrick Giraudoux
Dear all, I a read with great interest the e-mails related to Arnav Sheth about memory limitation when computing a distance matrix. I suspect that I will also meet some memory limitation using GeoR. I am currently running GeoR on a geodata object including 2686 geographical coordinates. krige.c

[R] linking other C++ libraries

2004-02-26 Thread Samuel Kemp
Hi, I have written a little C++ program, which uses a third party library called ANN (approximate nearest neighbours) #include "/home/sekemp/ann_0.2/include/ANN/ANN.h" I have tried R CMD SHLIB ann.h myProgram.cc, although this compiles when I load it into R I get the following message.. d

[R] Memory limitation in GeoR - Windows or R?

2004-02-26 Thread Edzer J. Pebesma
Usually, with that many observations, you use kriging in a local neighbourhood, i.e. use only the n nearest observations in a kriging system. If n is pretty large, this is practically equivalent to kriging with a global neighbourhood. There are several other R packages that provide kriging, some of

[R] system.time(), sys.time() etc

2004-02-26 Thread Martin Maechler
> "AndyL" == Liaw, Andy <[EMAIL PROTECTED]> > on Tue, 17 Feb 2004 13:03:36 -0500 writes: AndyL> Just do AndyL> system.time <- sys.time AndyL> and you're good to go in S-PLUS (at least in 6.x). yes. This is yet another instance of S-Plus following R behind and doing it i

[R] Machine Learning category

2004-02-26 Thread Ian Lenzen
Hello, We're creating a directory focused on web site credibility. We included: http://www.r-project.org/ in the Machine Learning section of the All.info directory. Descriptive information provided by you and our editors helps our users choose sites. Our editors have already selected starter key

[R] Structural Equation Model

2004-02-26 Thread Marcos Sanches
Hello all! I want to estimate parameters in a MIMIC model. I have one latent variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I know there is the SEM library, but it seems not to be possible to spe

Re: [R] adding header info to write.table

2004-02-26 Thread Spencer Graves
A minor variant is to use "cat" for the initial headers: DF <- data.frame(a=1:2, b=c("a","B")) cat("header1\nheader2\n", file="filename.csv") cat("header3\n", file="filename.csv", append=TRUE) write.table(DF, file="filename.csv", append=TRUE) In S-Plus 6.2 and R 1.8.2, this produces the

[R] boot and sample question

2004-02-26 Thread s viswanath
I am new to R enviorns & greatly recommend the Venables Ripley "Modern Applied stats with S". I am interested in a sampling say 5 day continuous windows of stock returns from a population and not applying a function to it. Is this avaiable in the 'boot' or the 'sample' function, and if it is,

[R] variance estimator for the cumulative incidence function

2004-02-26 Thread Pintilie, Melania
Hi everyone, I am using the package cmprsk in R to estimate the cumulative incidence function and its variance. In the manual it is mentioned that the variance is calculated based on Dr. Aalen's paper (1978, Nonparametric estimation of partial transition probabilities in multiple decrement models)

[R] Sweave and Xemacs on Windows2000?

2004-02-26 Thread wolski
Hallo! Trying to configure Xemacs to work with .snw files on windows 2000. Tried to do it how it is described in the FAQ for Sweaves. When starting xemacs with and Snw file *ESS* buffer contains hundrets of lines and the few last ones. (ess-loop-timeout . 50) (inferior-ess-primary-prompt

Re: [R] linking other C++ libraries

2004-02-26 Thread Sundar Dorai-Raj
Samuel Kemp wrote: Hi, I have written a little C++ program, which uses a third party library called ANN (approximate nearest neighbours) #include "/home/sekemp/ann_0.2/include/ANN/ANN.h" I have tried R CMD SHLIB ann.h myProgram.cc, although this compiles when I load it into R I get the fo

Re: [R] Gnumeric - 1 Excel - ?

2004-02-26 Thread A.J. Rossini
Marc Schwartz <[EMAIL PROTECTED]> writes: > For those wishing to stay abreast of such issues, this new paper may be > of interest. It puts the open source efforts of the Gnumeric team > (http://www.gnome.org/projects/gnumeric/) in a very favorable light. Thanks. For those using gnumeric to mun

RE: [R] Structural Equation Model

2004-02-26 Thread John Fox
Dear Marcos, I don't see why you can't specify a MIMIC model using sem(), though you might have to supply your own start values. When I have a chance, but possibly not today, I'll check. Regards, John John Fox Department of Sociology McMaster University Hamilto

Re: [R] Help with multicolored points in one plot

2004-02-26 Thread Deepayan Sarkar
On Thursday 26 February 2004 10:13, David Thibault wrote: > Hello all, > > I have a situation where I'd like to plot points from multiple groups of > data in one plot. I'd like each group's points to be colored a > different color. I've seen people comment on how you can alternate > colors by pro

Re: [R] Collapsing Categorical Variables

2004-02-26 Thread Sundar Dorai-Raj
Ko-Kang Kevin Wang wrote: Hi, Suppose I have a categorical variable called STREET, and I have 30 levels for it (i.e. 30 different streets). I want to find all those streets with only 15 observations or below then collapse them into a level called OTHER. Is there a quick way, other than using a

Re: [R] variance estimator for the cumulative incidence function

2004-02-26 Thread Göran Broström
On Thu, Feb 26, 2004 at 07:48:40AM -0800, Thomas Lumley wrote: > On Thu, 26 Feb 2004, Pintilie, Melania wrote: > > > > > Hi everyone, > > I am using the package cmprsk in R to estimate the cumulative incidence > > function and its variance. In the manual it is mentioned that the variance > > is ca

Re: [R] RE: system.time(), sys.time() etc

2004-02-26 Thread Friedrich . Leisch
> On Thu, 26 Feb 2004 10:08:36 -0500, > Liaw, Andy (LA) wrote: >> From: Spencer Graves [mailto:[EMAIL PROTECTED] >> >> Martin says, "This is another instance of S-Plus following R >> behind and doing it incompatibly [with a reason?] ... ." >> >> This is one example of a maj

[R] RE: system.time(), sys.time() etc

2004-02-26 Thread Liaw, Andy
> From: Spencer Graves [mailto:[EMAIL PROTECTED] > > Martin says, "This is another instance of S-Plus following R > behind and doing it incompatibly [with a reason?] ... ." > > This is one example of a major issue in "how to wage and win a > standards war", discussed by Shapiro and

Re: [R] Multidimensional scaling and distance matrices

2004-02-26 Thread Federico Calboli
On Thu, 2004-02-26 at 12:35, Christian Hennig wrote: > Hi, > > usually the term MDS is used for methods which operate only on > dissimilarity matrices. A similarity matrix s can be easily transformed > into a dissimilarity matrix d by taking d <- max(s)-s, which could be > considered as kind of a

[R] Multidimensional scaling and distance matrices

2004-02-26 Thread Federico Calboli
Dear All, I am in the somewhat unfortunate position of having to reproduce the results previously obtained from (non-metric?) MDS on a "kinship" matrix using Statistica. A kinship matrix measures affinity between groups, and has its maximum values on the diagonal. Apparently, starting with a nxn

[R] Re: system.time(), sys.time() etc

2004-02-26 Thread Spencer Graves
Hi, Andy: That's great. I hope it stays that way. Spencer Graves Liaw, Andy wrote: From: Spencer Graves [mailto:[EMAIL PROTECTED] Martin says, "This is another instance of S-Plus following R behind and doing it incompatibly [with a reason?] ... ." This is one example of a major i

RE: [R] Structural Equation Model

2004-02-26 Thread John Fox
Dear Chuck, Thanks for saving me the trouble of checking this out. When I have a chance, I'll take a look at what's going on with the RMSEA confidence interval. Though it's been awhile, I recall checking this against several examples; obviously something is wrong here. Thanks again, John

Re: [R] Collapsing Categorical Variables

2004-02-26 Thread Andrew Robinson
Kevin, something like table(STREET) STREET <- as.character(STREET) STREET[as.numeric(factor(STREET)) %in% which(table(STREET) < 15)] <- "Other" STREET <- factor(STREET) table(STREET) Andrew On Thursday 26 February 2004 15:25, Ko-Kang Kevin Wang wrote: > Hi, > > Suppose I have a categorica

[R] Outer with Three Vectors

2004-02-26 Thread Wolfgang Viechtbauer
Hello, outer() is great for avoiding things like: for (val1 in val1s) { for (val2 in val2s)) { x[i,j] <- somefunction(val1, val2) } } The same can be obtained with: outer(val1s, val2s, somefunction) But what if there are three (or more) sets of values to loop over? Any way of avoiding

[R] unable to install dse in mac OS X 10.3

2004-02-26 Thread Emilio A. Laca
I would like to request help with the installation of dse in raqua in mac os x 10.3. I get the following error message after the messages indicating that parts were successfully installed. I would be most grateful for a solution. - * Installing *source* p

Re: [R] Multidimensional scaling and distance matrices

2004-02-26 Thread Prof Brian Ripley
A few comments: MDS is normally done on a dissimilarity matrix, not necessarily a distance matrix (no need for the triangle inequality to be enforced). Some MDS software will autmatically map similarity matrices to corresponding dissimilarity matrices if told to do so (but not all by the same ma

Re: [R] Sweave and Xemacs on Windows2000?

2004-02-26 Thread wolski
Hi! Sorry for bothering. Got it working. Eryk __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] limit to complex plots?

2004-02-26 Thread Suzanne E. Blatt
Hello all. I am trying to create one figure, divided into 6 graphs/plots each with an inset sub-figure. I can use to layout command to generate one figure with one inset sub-figure, but cannot seem to do it for multiple figures on one page. I've tried a test with the following code: layout(m

Re: [R] Distance and Aggregate Data - Again...

2004-02-26 Thread Ray Brownrigg
[EMAIL PROTECTED] wrote: > I appreciate the help I've been given so far. The issue I face is > that the data I'm working with has 53000 rows, so in calculating > distance, finding all recids that fall within 2km and summing the > population, etc. - a) takes too long and b) have no sense of progre

RE: [R] Collapsing Categorical Variables

2004-02-26 Thread Ko-Kang Kevin Wang
> -Original Message- > From: Phil Spector [mailto:[EMAIL PROTECTED] > > How about something like: > > tstreet = table(STREET) > collapsestreets = names(tstreet[tstreet <= 15]) > STREET[STREET %in% collapsestreets] = 'OTHER' Thanks a lot! This is exactly what I want. I had a feeling my

[R] adding header info to write.table

2004-02-26 Thread femke
Hello, Could someone please tell if there is a way to append header info to the top of an exported dataframe (exported with write.table). I want to append the following, which are the defininitions for an asciigrid: ncols 532 nrows 999 xllcorner 510465 yllcorner 4766375

[R] Handling R Objects in C

2004-02-26 Thread pascal dessaux
Hello I want to handle R from a C/C++ project developped with Microsoft Visual C++.Net I put a multiproject solution,and one project is a win32 and dedicated for R manipulation; When I put in this project the example code from "Written R extension" 4.7 Handling R objects in C p39: #include #inc

[R] my own function given to lapply

2004-02-26 Thread Christoph Lehmann
Hi It seems, I just miss something. I defined treshold <- function(pred) { if (pred < 0.5) pred <- 0 else pred <- 1 return(pred) } and want to use apply it on a vector sapply(mylist[,,3],threshold) but I get: Error in match.fun(FUN) : Object "threshold" not found thanks for help cheers c

Re: [R] Handling R Objects in C

2004-02-26 Thread Prof Brian Ripley
On Thu, 26 Feb 2004, pascal dessaux wrote: > Hello > > I want to handle R from a C/C++ project developped with Microsoft Visual > C++.Net > > I put a multiproject solution,and one project is a win32 and dedicated for R > manipulation; > > When I put in this project the example code from "Writte

Re: [R] Multidimensional scaling and distance matrices

2004-02-26 Thread Christian Hennig
Hi, usually the term MDS is used for methods which operate only on dissimilarity matrices. A similarity matrix s can be easily transformed into a dissimilarity matrix d by taking d <- max(s)-s, which could be considered as kind of a canonical standard to do this. It seems like the R-MDS methods g

RE: [R] saving plots as objects?

2004-02-26 Thread Gabor Grothendieck
First question: dev.control(displayList = "enable") # turn on displaylist plot(1:3) myplot <- recordPlot() plot(1:4) myplot # plot(1:3) is back up Second question: ?identify ?locator --- Date: Thu, 26 Feb 2004 15:47:14 -0500 From: Rajarshi Guha <[EMAIL PROTECTED]> To: R <[EMAIL PROTEC

RE: [R] adding header info to write.table

2004-02-26 Thread Liaw, Andy
I suppose one way to do it is to write the header info to the file first (e.g., through connections, or sink(), etc.), then do write.table(..., append=TRUE). HTH, Andy > From: femke > > Hello, > > Could someone please tell if there is a way to append header > info to the top of an exported dat

RE: [R] Outer with Three Vectors

2004-02-26 Thread Liaw, Andy
Here's my shot at it. The gouter function can be enhanced further (e.g., as outer() does with dimnames), but I think the basic functionality is there. You can basically pass in any number of vectors you want, but you need to wrap them in a single list. outer() allows arrays, but gouter() below wi

[R] Compiling third party C++ libraries

2004-02-26 Thread Samuel Kemp
Hi, Does anyone know how to compile C++ code that uses 3rd party C++ libraries, so that the .so file can be used in R? I keep getting errors when using dyn.load which say undefined reference to KdSpiltRule, which is in my third party library. Here is the entire code.. // Computes a rapid

Re: [R] Sweave and Xemacs on Windows2000?

2004-02-26 Thread Thomas Petzoldt
wolski wrote: Hallo! Trying to configure Xemacs to work with .snw files on windows 2000. Tried to do it how it is described in the FAQ for Sweaves. When starting xemacs with and Snw file *ESS* buffer contains hundrets of lines and the few last ones. [...] And no syntax highlighting in the *.Snw

RE: [R] adding header info to write.table

2004-02-26 Thread Andy Bunn
You know...I almost added this to your original post because I thought you might want to read something back into ArcInfro when you were done! Look at ?files The easiest thing to do in R is to keep your header as a text file in the working directory and then append it to your output file using 'f

[R] Collapsing Categorical Variables

2004-02-26 Thread Ko-Kang Kevin Wang
Hi, Suppose I have a categorical variable called STREET, and I have 30 levels for it (i.e. 30 different streets). I want to find all those streets with only 15 observations or below then collapse them into a level called OTHER. Is there a quick way, other than using a for() loop, to do it? Curr

[R] Re: system.time(), sys.time() etc

2004-02-26 Thread Spencer Graves
Martin says, "This is another instance of S-Plus following R behind and doing it incompatibly [with a reason?] ... ." This is one example of a major issue in "how to wage and win a standards war", discussed by Shapiro and Varian (1998) Information Rules (Harvard Business School Press)

Re: [R] Multidimensional scaling and distance matrices

2004-02-26 Thread Jari Oksanen
On Thu, 2004-02-26 at 17:05, Federico Calboli wrote: > On Thu, 2004-02-26 at 12:35, Christian Hennig wrote: > I am happy with the function "dist" in {mva}, and I know there are other > functions in {cluster}, but it's besides the point. The question that is > nagging me is: is it justified to do a

Re: [R] writing polygons/segments to shapefiles (.shp) or other ArcGIS compatible file

2004-02-26 Thread Patrick Giraudoux
Hi, Thanks for all those information and the most valuable library you have developed. If somebody is to develop something to write shapefiles from polygon coordinates within R (most welcome), I don't think that the attribute file (dbf) will be an important issue. If we have got an output with t

Re: [R] writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file

2004-02-26 Thread Benjamin . STABLER
The main limitation of the shapefiles package that I put together is that it does not create shapefiles from R objects - rather it only writes shapefiles that have been read into R and manipulated within the constraints of the existing file structure. By this I mean that for example you can change

Re: [R] my own function given to lapply

2004-02-26 Thread Marc Schwartz
On Thu, 2004-02-26 at 11:39, Christoph Lehmann wrote: > Hi > > It seems, I just miss something. I defined > > treshold <- function(pred) { > if (pred < 0.5) pred <- 0 else pred <- 1 > return(pred) > } > > and want to use apply it on a vector > > sapply(mylist[,,3],threshold) > > but I get: >

Re: [R] Help with multicolored points in one plot

2004-02-26 Thread Thomas Lumley
On Thu, 26 Feb 2004, David Thibault wrote: > Hello all, > > I have a situation where I'd like to plot points from multiple groups of > data in one plot. I'd like each group's points to be colored a different > color. I've seen people comment on how you can alternate colors by > providing a range

Re: [R] levelplot add line

2004-02-26 Thread Deepayan Sarkar
On Wednesday 25 February 2004 14:00, Jeff Jorgensen wrote: > Thanks for putting me on the right track. Sorry to be bothersome with > another follow-up, but the code that calls the panel function (see > below) doesn't seem to be working. What am I doing wrong? You are using this wrong. In particu

Re: [R] adding header info to write.table

2004-02-26 Thread Roger Bivand
On Thu, 26 Feb 2004, femke wrote: > Hello, > > Could someone please tell if there is a way to append header info to the > top of an exported dataframe (exported with write.table). I want to > append the following, which are the defininitions for an asciigrid: > > ncols 532 > nrows

Re: [R] Structural Equation Model

2004-02-26 Thread Chuck Cleland
Marcos Sanches wrote: I want to estimate parameters in a MIMIC model. I have one latent variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I know there is the SEM library, but it seems not to be possible to sp

[R] Loading SparseM on Win2K

2004-02-26 Thread Jim_Garrett
I'm having trouble loading the package SparseM in R 1.8.1, OS = Windows 2000. Installing appeared to go well; I saw no error messages, html documentation was installed, and "installed.packages()" lists SparseM among the installed packages. When I try to load the library, however, I get the follow

Re: [R] adding header info to write.table

2004-02-26 Thread Patrick Connolly
On Thu, 26-Feb-2004 at 04:15PM -0500, femke wrote: |> Hello, |> |> Could someone please tell if there is a way to append header info |> to the top of an exported dataframe (exported with write.table). I |> want to append the following, which are the defininitions for an |> asciigrid: |> ncols

RE: [R] limit to complex plots?

2004-02-26 Thread Hanke, Alex
try: layout(matrix(c(0,0,0,0,0,1,0,2,0,0,0,0,0,3,0,4), nrow=4, byrow=TRUE)) plot(rnorm(10), rnorm(10)) plot(rnorm(20), rnorm(20)) plot(rnorm(30), rnorm(30)) plot(rnorm(40), rnorm(40)) > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTE

Re: [R] variance estimator for the cumulative incidence function

2004-02-26 Thread Thomas Lumley
On Thu, 26 Feb 2004, Pintilie, Melania wrote: > > Hi everyone, > I am using the package cmprsk in R to estimate the cumulative incidence > function and its variance. In the manual it is mentioned that the variance > is calculated based on Dr. Aalen's paper (1978, Nonparametric estimation of > part

Re: [R] linking other C++ libraries

2004-02-26 Thread Prof Brian Ripley
On Thu, 26 Feb 2004, Sundar Dorai-Raj wrote: > > Samuel Kemp wrote: > > > Hi, > > > > I have written a little C++ program, which uses a third party library > > called ANN (approximate nearest neighbours) > > > > #include "/home/sekemp/ann_0.2/include/ANN/ANN.h" > > > > I have tried R CMD

[R] saving plots as objects?

2004-02-26 Thread Rajarshi Guha
Hi I had two questions regarding plots: * Is there are way to save a plot in the form of an object such that it could be displayed/modified later? * I've been using Minitab for some work and I found the burshing capability very handy (it allows me to choose a point on the graph and displays the d

Re: [R] my own function given to lapply

2004-02-26 Thread Jeff Gentry
> treshold <- function(pred) { > Error in match.fun(FUN) : Object "threshold" not found ^ If this is a direct cut & paste, you have a typo as you've defined the function as "treshold". __ [EMAIL PR

RE: [R] adding header info to write.table

2004-02-26 Thread Andy Bunn
> Is everybody writing ArcGIS ASCII rasters recently? The GIS community is hopelessly tied to ESRI. So many people have invested their careers in learning Arc that switching to GRASS is an institutional nightmare. Most of what I do now is outside of Arc! And certainly outside of their almost usele

RE: [R] my own function given to lapply

2004-02-26 Thread Liaw, Andy
That should be `threshold', not `treshold'. Is that the problem? In any case, why not just use ifelse(); e.g., ifelse(mylist[,,3] < .5, 0, 1)? Or even just round(mylist[,,3])? Andy > From: Christoph Lehmann > > > Hi > > It seems, I just miss something. I defined > > treshold <- function(

[R] R on VMS

2004-02-26 Thread Martin Stauber
Dear R-Community, I would like to compile R on VMS. Is there anybody out there who has already tried to do that? I am grateful for any hint. Thanks in advance. Best regards, Martin Stauber -- === Martin Stauber Institute for Biomedical Engineering Swis

[R] Help with multicolored points in one plot

2004-02-26 Thread David Thibault
Hello all, I have a situation where I'd like to plot points from multiple groups of data in one plot. I'd like each group's points to be colored a different color. I've seen people comment on how you can alternate colors by providing a range of colors and then it will loop through each color as

Re: [R] saving plots as objects?

2004-02-26 Thread Deepayan Sarkar
On Thursday 26 February 2004 14:47, Rajarshi Guha wrote: > Hi I had two questions regarding plots: > > * Is there are way to save a plot in the form of an object such that it > could be displayed/modified later? Depends on what you want to do. Probably not for regular (base) plots. The grid packa

[R] RE: Help with multicolored points in one plot

2004-02-26 Thread David Thibault
Hello again, I think this will help me: http://www.math.montana.edu/Rweb/Rhelp/points.html I'll email again if it doesn't. Dave -Original Message- From: David Thibault Sent: Thursday, February 26, 2004 11:13 AM To: [EMAIL PROTECTED] Subject: Help with multicolored points in one plot H

RES: [R] Structural Equation Model

2004-02-26 Thread Marcos Sanches
Thanks Chuck and John, I guess the problem is that I was specifying the error terms in the 'ram' matrix. I am not familiarized with this type of model specification as I am used to work with AMOS. Now I think it will work! Thanks very much! Marcos -Mensagem original- De: Chuck Clela

Re: [R] writing polygons/segments to shapefiles (.shp) or other ArCGIS compatible file

2004-02-26 Thread Barry Rowlingson
Patrick Giraudoux wrote: Thanks a lot for the hints. I will try. Actually I was focusing (in a first stage) on simple segments (small mammal traplines...). I turned the problem out writing some lines to export the coordinates into a "simple" GRASS ascii file, imported it into GRASS as vector fil

Re: [R] saving plots as objects?

2004-02-26 Thread Prof Brian Ripley
On Thu, 26 Feb 2004, Deepayan Sarkar wrote: > On Thursday 26 February 2004 14:47, Rajarshi Guha wrote: > > Hi I had two questions regarding plots: > > > > * Is there are way to save a plot in the form of an object such that it > > could be displayed/modified later? > > Depends on what you want to

Re: [R] Loading SparseM on Win2K

2004-02-26 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: I'm having trouble loading the package SparseM in R 1.8.1, OS = Windows 2000. Installing appeared to go well; I saw no error messages, html documentation was installed, and "installed.packages()" lists SparseM among the installed packages. When I try to load the library, h