[R] Test of Significance for overall-accuracy

2006-03-14 Thread Markus Schwarz
Hello, I have two classifications. How can I compare the overall-accuracy of these classifications to each other? Is there a possibility within R to test if the achieved overall-accuracy for the classifications are differing significantly? Additionaly, are the McNemar-Test and Broker-Test

Re: [R] Wireframe axis labels

2006-03-14 Thread Uwe Ligges
Cashorali, Tanya wrote: Hi, I'm trying to do a surface plot using the wireframe function. Everything is working beautifully except that I want to be able to re-scale it a LOT so that I can fit ~145 labels on the x-axis or y-axis. I've tried using zoom, scales, aspect, .. nothing seems to

Re: [R] R GUI's on a Mac?

2006-03-14 Thread Philippe Grosjean
Anyone who responds to Berton, please, CC me: I am also interested. Best, Philippe Grosjean Berton Gunter wrote: Folks: A question for R users on Macs. AFAIK, R's Tcl/TK tools allow one to build GUI interfaces to R's functionality across all platforms. My question: How well do the TK

[R] sort of fread to read from a file at fixed positions?

2006-03-14 Thread Gael de Lannoy
Hello everybody, I need to read a file with a header (EDF files, recorded electroencephalogram signals) that has fixed byte positions for each field of its header. These fields have no separator between them, for example: 8 ascii name of the patient10ascii start time of the recording4 ascii

Re: [R] sort of fread to read from a file at fixed positions?

2006-03-14 Thread Prof Brian Ripley
See ?read.fwf, and also the `R Data Import/Export Manual' that ships with every copy of R. Also, you can do in R in the way you describe for Octave with connections and readChar (again, see the manual). On Tue, 14 Mar 2006, Gael de Lannoy wrote: Hello everybody, I need to read a file with

Re: [R] Error Message from Variogram.lme Example

2006-03-14 Thread Prof Brian Ripley
On Tue, 14 Mar 2006, Prof Brian Ripley wrote: So this is most likely a bug in package nlme. However, we need a reproducible example to be able to do anything about it, and without even the traceback() we cannot be sure that it is in nlme. Please follow the bug-reporting procedure. It does

Re: [R] how to make a contour plot in R?

2006-03-14 Thread Arnau Mir Torres
Uwe Ligges wrote: Arnau Mir Torres wrote: Hello. I am an nxn data frame in the variable frame. I want to make a contour plot with it. That is, I want to plot a square of dimensions [1,n]x[1,n] with the gray level of square [i,i+1]x[j,j+1] equal to frame[i,j]. How can I make it?

[R] VAR

2006-03-14 Thread Julija Kackina
Hello! I'm trying to forecast the UK exchange rate. To estimate my model I use ar() function. However, I can't get a forecast of the exchange rate using the function forecast(). Regards, Julija Kackina [[alternative HTML version deleted]]

Re: [R] Numerical Derivatives in R

2006-03-14 Thread Martin Maechler
Spencer == Spencer Graves [EMAIL PROTECTED] on Mon, 13 Mar 2006 15:37:16 -0800 writes: Spencer Hi, Paul, Tolga, Ravi, et al.: What about using Spencer splines to compute both derivatives and integrals? That seems good and pretty obvious to me, and for that reason there have been

Re: [R] how to make a contour plot in R?

2006-03-14 Thread antonio rodriguez
Arnau Mir Torres wrote: Uwe Ligges wrote: Arnau Mir Torres wrote: Hello. I am an nxn data frame in the variable frame. I want to make a contour plot with it. That is, I want to plot a square of dimensions [1,n]x[1,n] with the gray level of square [i,i+1]x[j,j+1] equal to

Re: [R] R GUI's on a Mac?

2006-03-14 Thread Martin Maechler
PhGr == Philippe Grosjean [EMAIL PROTECTED] on Tue, 14 Mar 2006 09:30:26 +0100 writes: PhGr Anyone who responds to Berton, please, CC me: I am PhGr also interested. Best, (but then you do read R-help, and I disagree with Berton that this should be answered in private only)

[R] Maximum likelihood

2006-03-14 Thread Erez Shabo
Hello all, I'm trying to calculate the Maximum likelihood of individuals to get the ancestry. I mixd 3 populations 15 generations in proportion of 20% 20% 60% when each population sorce have diferent genome (0 1 and 2) with frequencies for each one. So now i have individuals looks like 0 0 2 1 1

[R] name of the graphics output

2006-03-14 Thread Arnau Mir Torres
Hello. In the file list.txt, I have the name of n files in data frame format. I want to make an image for each file and save the images in pdf format. To do this, I do the following: llista = scan(file=list.txt,what=list(nom=)) for (file.name in llista[[1]]){

Re: [R] Constrained linear least squares

2006-03-14 Thread Simon Wood
mgcv::pcls will do this, but there are other packages for quadratic programming as well. Simon On Tue, 7 Mar 2006, Domenico Vistocco wrote: Is there a function in R for constrained linear least squares? I used the matlab function LSQLIN: my aim is to obtain non-negative regression

Re: [R] how to make a contour plot in R?

2006-03-14 Thread Uwe Ligges
Arnau Mir Torres wrote: Uwe Ligges wrote: Arnau Mir Torres wrote: Hello. I am an nxn data frame in the variable frame. I want to make a contour plot with it. That is, I want to plot a square of dimensions [1,n]x[1,n] with the gray level of square [i,i+1]x[j,j+1] equal to

Re: [R] name of the graphics output

2006-03-14 Thread Philipp Pagel
On Tue, Mar 14, 2006 at 12:55:47PM +0100, Arnau Mir Torres wrote: All the outputs names are file.name.pdf but I want to put a different name for each graphic. you can use paste() to put together the command: file =foo system( paste(mv Rplots.pdf , file, .name.pdf, sep='') ) cu

Re: [R] name of the graphics output

2006-03-14 Thread Duncan Murdoch
On 3/14/2006 6:55 AM, Arnau Mir Torres wrote: Hello. In the file list.txt, I have the name of n files in data frame format. I want to make an image for each file and save the images in pdf format. To do this, I do the following: llista = scan(file=list.txt,what=list(nom=)) for

Re: [R] name of the graphics output

2006-03-14 Thread Philipp Pagel
On Tue, Mar 14, 2006 at 01:03:22PM +0100, Philipp Pagel wrote: On Tue, Mar 14, 2006 at 12:55:47PM +0100, Arnau Mir Torres wrote: All the outputs names are file.name.pdf but I want to put a different name for each graphic. you can use paste() to put together the command: file =foo

[R] Generating a PostScript graphics under Windows

2006-03-14 Thread Sigbert Klinke
Hi, I'am trying to generate a PS Graphic under Windows with a fixed location via postscript(file=C:\\test.ps) But I always become the error: unable to start device PostScript can not open 'postscript' file argument 'c:\test.ps' There must be a very simple thing, that I make wrong. Thanks in

Re: [R] Generating a PostScript graphics under Windows

2006-03-14 Thread Sundar Dorai-Raj
Sigbert Klinke wrote: Hi, I'am trying to generate a PS Graphic under Windows with a fixed location via postscript(file=C:\\test.ps) But I always become the error: unable to start device PostScript can not open 'postscript' file argument 'c:\test.ps' There must be a very simple

Re: [R] Generating a PostScript graphics under Windows

2006-03-14 Thread Peter Dalgaard
Sigbert Klinke [EMAIL PROTECTED] writes: Hi, I'am trying to generate a PS Graphic under Windows with a fixed location via postscript(file=C:\\test.ps) But I always become the error: unable to start device PostScript can not open 'postscript' file argument 'c:\test.ps' There must

Re: [R] Generating a PostScript graphics under Windows

2006-03-14 Thread Uwe Ligges
Sigbert Klinke wrote: Hi, I'am trying to generate a PS Graphic under Windows with a fixed location via postscript(file=C:\\test.ps) But I always become the error: unable to start device PostScript can not open 'postscript' file argument 'c:\test.ps' There must be a very simple

[R] irregular time series

2006-03-14 Thread alessandro carletti
Hi everybody, I'm currently working with time series: do you know if there's something like stl(package stats, seasonal decomposition of time series by loess) working also with objects of class irts? Thanks Alessandro __ R-help@stat.math.ethz.ch

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread John McHenry
Thanks, Gabor Thomas. Apologies, but I used an example that obfuscated the question that I wanted to ask. I really wanted to know how to have extra arguments in functions that would allow, per the example code, for something like a counter to be incremented. Thomas's suggestion of using

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Gabor Grothendieck
There are two ways to do that: one is to use mapply as Thomas showed and the other is to iterate over an index rather than over the data itself. Here is a rather lame example using + but hopefully it conveys the idea of the two possibilities: # 1 x - y - 1:4 mapply(+, x, y) # 2 sapply(seq(along

Re: [R] irregular time series

2006-03-14 Thread Philippe Grosjean
One solution is to convert an irregular time series into a regular one, interpolating missing values. Obviously, it is only acceptable if the number of missing items is low. See ?regul in pastecs, for instance. Best, Philippe Grosjean alessandro carletti wrote: Hi everybody, I'm currently

[R] [R-pkgs] New version of the LDheatmap package

2006-03-14 Thread Sigal Blay
Version 0.2 of the package LDheatmap is now on CRAN. The main function LDheatmap produces a graphical display, as a heat map, of measures of pairwise linkage disequilibria between SNPs. Users may optionally include the physical locations or genetic map distances of each SNP on the plot. The

[R] book and website announcement

2006-03-14 Thread Eric Zivot
The 2nd Edition of my book (with Jiahui Wang) Modeling Financial Time Series with S-PLUS has recently been published by Springer-Verlag. The 2nd Edition is updated to cover S-PLUS 7 and S+FinMetrics 2.0. I have also created a website for the 2nd Edition, which can be found at

[R] R CMD check: problems possibly from mapply?

2006-03-14 Thread Ulrike Grömping
Dear expeRts, I am trying to wrap up a package utilities (for my internal use). After adding a function datNAtreat that uses mapply, R CMD check gives WARNINGs for S3 generic/method consistency, checking replacement functions and checking foreign function calls, all of which are accompanied by

Re: [R] R CMD check: problems possibly from mapply?

2006-03-14 Thread Ulrike Grömping
Sorry, just pressing the send button brought the solution :-) The problem has nothing to do with any programming issues, but rather with confusion about directories to use R CMD from. Regards, Ulrike -- Forwarded Message --- From: Ulrike Grömping [EMAIL PROTECTED] To:

[R] problem with optim: (list) object cannot be coerced to 'double'

2006-03-14 Thread Zebouni, Stephane \(Exchange\)
Hi, I am trying to use optim to solve a heavy calibration problem. I supply the parameters in vector form. But before entering my target The call is simply: optim(par = parameters, fn = SumLSQ, method = Nelder-Mead) the function SumLSQ is simply: SumLSQ-function(parameters,

Re: [R] Generating a PostScript graphics under Windows

2006-03-14 Thread Sigbert Klinke
Peter Dalgaard wrote: Do you have write permissions there? (Possibly a silly question, but must be asked...) No. Thanks a lot Sigbert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] newline in plotmath expressions

2006-03-14 Thread Uwe Ligges
Pascal A. Niklaus wrote: Hi all, When trying to amend a graphic with a text, I run into the following problem: text(10,10,First line\nSecond line,pos=2) works. However, because I have a plotmath expression, I tried: text(10,10,expression(First line with[subscript]*\nsecond

Re: [R] problem with optim: (list) object cannot be coerced to 'double'

2006-03-14 Thread Uwe Ligges
Zebouni, Stephane (Exchange) wrote: Hi, I am trying to use optim to solve a heavy calibration problem. I supply the parameters in vector form. But before entering my target The call is simply: optim(par = parameters, fn = SumLSQ, method = Nelder-Mead) the

Re: [R] R GUI's on a Mac?

2006-03-14 Thread Rob J Goedman
Hi, On Mar 14, 2006, at 3:05 AM, Martin Maechler wrote: I think for Berton's question, the only necessary step is JFox 1) Install X11.app from Apple Install disks (this is a JFox must if you want to use any tcltk-based package with R.app). The initial step is to make sure that the tcl/tk

[R] bwplot and outlier symbols

2006-03-14 Thread vincent david
Hi, I was just trying to figure out how to beautify the output of my bwplot-output. Altogether I figured most of the things out on my own. The one thing which puzzles me though are the symbols for the outliers. I can easily change the form of the median symbol by using pch but I don't know how

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Thomas Lumley
On Tue, 14 Mar 2006, John McHenry wrote: Thanks, Gabor Thomas. Apologies, but I used an example that obfuscated the question that I wanted to ask. I really wanted to know how to have extra arguments in functions that would allow, per the example code, for something like a counter to be

[R] bwplot and outlier symbols

2006-03-14 Thread vincent david
Hi, I was just trying to figure out how to beautify the output of my bwplot-output. Altogether I figured most of the things out on my own. The one thing which puzzles me though are the symbols for the outliers. I can easily change the form of the median symbol by using pch but I don't know how

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Liaw, Andy
From: Thomas Lumley On Tue, 14 Mar 2006, John McHenry wrote: Thanks, Gabor Thomas. Apologies, but I used an example that obfuscated the question that I wanted to ask. I really wanted to know how to have extra arguments in functions that would allow, per the example code, for

Re: [R] problem with optim: (list) object cannot be coerced to 'double'

2006-03-14 Thread Zebouni, Stephane \(Exchange\)
Here is what I get using str(parameters): num [1:120] 0.2000 -0.0166 0.0934 -0.0300 -0.3219 ... again, it doesn't even get into the objective function - I checked that Many thanks Stephane -Original Message- From: Uwe Ligges [mailto:[EMAIL PROTECTED] Sent: 14

[R] Tiny Typo in R Data Import/Export Manual

2006-03-14 Thread Rau, Roland
Dear all, in the first paragraph in Section 4.3.2 of the R Data Import/Export Manual, it is written 'We havew tested...'. Most likely it should be 'We have tested...' It is just such a minor thing that I was unsure whether to submit a bug report. I use now R 2.2.1 on Win32 but I guess this is

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Gabor Grothendieck
On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006, John McHenry wrote: Thanks, Gabor Thomas. Apologies, but I used an example that obfuscated the question that I wanted to ask. I really wanted to know how to have extra arguments in functions that would allow,

Re: [R] bwplot and outlier symbols

2006-03-14 Thread Sundar Dorai-Raj
vincent david wrote: Hi, I was just trying to figure out how to beautify the output of my bwplot-output. Altogether I figured most of the things out on my own. The one thing which puzzles me though are the symbols for the outliers. I can easily change the form of the median symbol by

[R] setMethod confusion

2006-03-14 Thread Stephen Henderson
Hello I've checked through previous postings but don't see a fully equivalent problem-just a few hints. I have been trying to set a new method for the existing function table or as.data.frame.table for my class tfSites. Taking out all the useful code and just returning the input class I get

Re: [R] Tiny Typo in R Data Import/Export Manual

2006-03-14 Thread Duncan Murdoch
On 3/14/2006 10:58 AM, Rau, Roland wrote: Dear all, in the first paragraph in Section 4.3.2 of the R Data Import/Export Manual, it is written 'We havew tested...'. Most likely it should be 'We have tested...' It is just such a minor thing that I was unsure whether to submit a bug

[R] help on moran's I index of point pattern, not areal pattern

2006-03-14 Thread zhijie zhang
hi,friends, we all know that moran's I index and Geary'C index can be used to test spatial autocorrelation in both the area data and point data, but i only can find something on how to calculate on the data of area, and can't find the methods to perform it on the point data, could anybody give me

[R] (no subject)

2006-03-14 Thread Graciela Perez
Hi: Does anyone know how to run a test of trends for repeated measurements in R? Thanks Graciela __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] Ordered logistic regression in R vs in SAS

2006-03-14 Thread Emilie Berthiaume
I tried the following ordered logistic regression in R: mod1 - polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot) But when I asked The summary of my regression I got the folloing error message: summary (mod1) Re-fitting to get Hessian Error in optim(start, fmin, gmin, method =

[R] setMethod confusion

2006-03-14 Thread Stephen Henderson
---sorry to repost I sent it as HTML last time--- Hello I've checked through previous postings but don't see a fully equivalent problem-just a few hints. I have been trying to set a new method for the existing function table or as.data.frame.table for my class tfSites. Taking out all the useful

Re: [R] bwplot and outlier symbols

2006-03-14 Thread Deepayan Sarkar
On 3/14/06, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: vincent david wrote: Hi, I was just trying to figure out how to beautify the output of my bwplot-output. Altogether I figured most of the things out on my own. The one thing which puzzles me though are the symbols for the outliers.

Re: [R] R GUI's on a Mac? -- Thanks

2006-03-14 Thread Berton Gunter
My thanks to all who replied. Your advice and links were very helpful. Kind regards, -- Bert Bert Gunter Genentech __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Thomas Lumley
On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: It is probably worth pointing out here that the R documentation does not specify the order in which lapply() does the computation. I suspect that a huge amount of application code takes

[R] JOB: mixed models

2006-03-14 Thread Jill Goldschneider
Insightful is in need of a statistician/research scientist interested in researching and developing mixed models. There is a strong computational component to the work. The person would be responsible for developing S-PLUS/R packages, first focusing on mixed models (frailty in particular), and

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Gabor Grothendieck
On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: It is probably worth pointing out here that the R documentation does not specify the order in which lapply() does the computation. I

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Thomas Lumley
On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: It is probably worth pointing out here that the R documentation does not specify the order in

Re: [R] Maximum likelihood

2006-03-14 Thread Ben Bolker
Erez Shabo shaboerez at gmail.com writes: Hello all, I'm trying to calculate the Maximum likelihood of individuals to get the ancestry. I mixd 3 populations 15 generations in proportion of 20% 20% 60% when each population sorce have diferent genome (0 1 and 2) with frequencies for each

Re: [R] bwplot and outlier symbols

2006-03-14 Thread vincent david
Hello again, I'm still confused how this is supposed to work. Especially the symbol for the outliers still puzzle me. This is what I do: bwplot (points ~ general[,1] | groups, layout = c(1, 3), scales = list(x = list(at = seq(10, 100, by=5), labels=seq(10, 100, by=5),

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread Gabor Grothendieck
On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006, Gabor Grothendieck wrote: On 3/14/06, Thomas Lumley [EMAIL PROTECTED] wrote: It is probably worth pointing out here

[R] different values of a vector

2006-03-14 Thread Arnau Mir
Hello. I have a vector of length 2771 but it has only 87 different values. How can I obtain them? Thanks, Arnau. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] different values of a vector

2006-03-14 Thread Marc Schwartz (via MN)
On Tue, 2006-03-14 at 18:45 +0100, Arnau Mir wrote: Hello. I have a vector of length 2771 but it has only 87 different values. How can I obtain them? Thanks, Arnau. If you just want the unique values themselves, you can use: unique(vector) For example: v [1] b b c a a a c c c c

Re: [R] bwplot and outlier symbols

2006-03-14 Thread Sundar Dorai-Raj
Hi, Vincent, You need to add par.settings = list(plot.symbol = list(pch = 2, col = blue, cex = 2)) to your bwplot call. Just change the values for pch, col, cex, etc. to suit your needs. The plot.symbol setting determines the symbol for the outliers. As Deepayan noted, it's not documented in

Re: [R] different values of a vector

2006-03-14 Thread Andy Bunn
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Arnau Mir Sent: Tuesday, March 14, 2006 12:45 PM To: r-help@stat.math.ethz.ch Subject: [R] different values of a vector Hello. I have a vector of length 2771 but it has only 87 different values.

Re: [R] different values of a vector

2006-03-14 Thread Sundar Dorai-Raj
?unique Arnau Mir wrote: Hello. I have a vector of length 2771 but it has only 87 different values. How can I obtain them? Thanks, Arnau. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Interpolate univariate data on regular 3D grid to new 3D grid

2006-03-14 Thread Gregory Jefferis
Dear R Users, I have some data that is very similar in form to a 3D image - ie univariate data on a regular 3D grid. I keep this as a 3D numeric array in R with attributes describing the sampling points along the 3 dimensions. I would like to interpolate this onto a new regular 3D grid that I

[R] Multi-line paste function

2006-03-14 Thread Lapointe, Pierre
Here's my contribution to R. When R interacts with external programs (MySQL, cURL, etc.), it often requires a pasted string that is sent to these programs. For readability reasons, it is often preferable to have complex commands (SQL for example) spread on several lines. However, the normal paste

[R] Date problem

2006-03-14 Thread natalia norden
Hello, I have some stupid problems managing date data. I have a colomn date, which I converted from a character representation: for example: a=26/02/06 date=strptime(a,format=%d/%m/%y) For one part of the analysis, I'm interested only in the month and the year, so I did:

Re: [R] bwplot and outlier symbols

2006-03-14 Thread vincent david
Hi, that was it! I managed to set me parameters properly using: trellis.par.set(... What I still not quite understand though is how to use: par.settings = ... I cant use it in the bwplot-command itself - this throws a error. Whereas using it in a: panel = function (...){... enviroment

[R] ignoring objects containing NaN's in a recursive function

2006-03-14 Thread Mills, Jason
Hi- General question: I have written a function that performs a permutation test. I use the function sample to randomize my data, then I call on another function I wrote to analyze the randomized data. This process repeats n times-- 10, 100 or whatever. The function applied to the randomized

[R] Hodges-lehmann test and CI/significance

2006-03-14 Thread Sean Davis
Does anyone know of an implementation in R of the Hodges-Lehmann nonparametric difference between two groups? I am interested in the estimate of the difference and the CI or significance of that difference. I did some quick searching and didn't see it, but I may not have been looking for the

Re: [R] Ordered logistic regression in R vs in SAS

2006-03-14 Thread Frank E Harrell Jr
Emilie Berthiaume wrote: I tried the following ordered logistic regression in R: mod1 - polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot) You might also try library(Design) # also requires Hmisc package mod1 - lrm() mod1 summary(mod1) anova(mod1) Frank Harrell But when I

Re: [R] bwplot and outlier symbols

2006-03-14 Thread Sundar Dorai-Raj
vincent david wrote: Hi, that was it! I managed to set me parameters properly using: trellis.par.set(... What I still not quite understand though is how to use: par.settings = ... I cant use it in the bwplot-command itself - this throws a error. What error? What version of

Re: [R] Multi-line paste function

2006-03-14 Thread Philippe Grosjean
I am not sure I clearly understand what you want, but getting the string returned by your multi.line.paste() function is straightforward using gsub(): gsub(\n, , SELECT * FROM estimates a, newtable b WHERE a.Ticker=b.Ticker AND a.Fiscal_Year=b.Fiscal_Year AND a.EPSb.EPS AND

Re: [R] ignoring objects containing NaN's in a recursive function

2006-03-14 Thread Berton Gunter
if(any(is.nan(...)))... ##repeat However, 1) Have you tried RSiteSearch('permutation test',restr='function') to see what's already there? 2) I suspect that there are better ways to do this. In particular, generating all random whatevers at once is way more efficient than repeated calls; 2) It

Re: [R] Date problem

2006-03-14 Thread Gabor Grothendieck
On 3/14/06, natalia norden [EMAIL PROTECTED] wrote: Hello, I have some stupid problems managing date data. I have a colomn date, which I converted from a character representation: for example: a=26/02/06 date=strptime(a,format=%d/%m/%y) For one part of the analysis, I'm interested only in

Re: [R] Multi-line paste function

2006-03-14 Thread Lapointe, Pierre
Hello Phillipe 1-You are right that for a simple example as the one I provided, paste and gsub give the same result. 2-For a more complex case, where let's say, I'd like to include a variable in my SQL statement, the multi.line.paste command is essential. variable -1.9 multi.line.paste( SELECT *

Re: [R] help on moran's I index of point pattern, not areal pattern

2006-03-14 Thread Roger Bivand
On Wed, 15 Mar 2006, zhijie zhang wrote: hi,friends, we all know that moran's I index and Geary'C index can be used to test spatial autocorrelation in both the area data and point data, but i only can find something on how to calculate on the data of area, and can't find the methods to

Re: [R] Multi-line paste function

2006-03-14 Thread Philippe Grosjean
Lapointe, Pierre wrote: Hello Phillipe 1-You are right that for a simple example as the one I provided, paste and gsub give the same result. 2-For a more complex case, where let's say, I'd like to include a variable in my SQL statement, the multi.line.paste command is essential. variable

Re: [R] need help in tune.nnet

2006-03-14 Thread Tuszynski, Jaroslaw W.
You use tune function to find optimal parameters needed for particular classification algorithm. I had more experience with tune.svm but, I would try first to put parameters covering the whole possible range of each variable (in which algorithm do not crash), for example c(4^-2, 4^-1, 4^0, 4^1,

Re: [R] Hodges-lehmann test and CI/significance

2006-03-14 Thread Marc Schwartz (via MN)
On Tue, 2006-03-14 at 14:07 -0500, Sean Davis wrote: Does anyone know of an implementation in R of the Hodges-Lehmann nonparametric difference between two groups? I am interested in the estimate of the difference and the CI or significance of that difference. I did some quick searching and

[R] Interpolate univariate data on regular 3D grid to new 3D grid

2006-03-14 Thread Edzer J. Pebesma
Package gstat allows 3D interpolation. It doesn't accept a 3D array directly; you'll have to provide it as x1 y1 z1 obs1 x2 y2 z2 obs2 etc, e.g. by using expand.grid. Or, you may want to try out the classes provided by package sp, which allow for more than 2 dimensions in case of points and

Re: [R] Hodges-lehmann test and CI/significance

2006-03-14 Thread Thomas Lumley
On Tue, 14 Mar 2006, Sean Davis wrote: Does anyone know of an implementation in R of the Hodges-Lehmann nonparametric difference between two groups? I am interested in the estimate of the difference and the CI or significance of that difference. I did some quick searching and didn't see it,

[R] highlight an area below a line

2006-03-14 Thread Georg Otto
Hi, if I plot a normal distribution like this: d-density(rnorm(1)) plot(d) how can I highlight the area below the graph in a certain interval, say x=1,2? I understand that I should use polygon, but I have not found the right way to give the result that I want. Thanks a lot! Georg

[R] R] highlight an area below a line

2006-03-14 Thread Ken Knoblauch
How about, d-density(rnorm(1)) plot(d) wvs - which(d$x 1 d$x 2) polygon(d$x[c( wvs[1], wvs, wvs[length(wvs)] ) ], c(0, d$y[wvs], 0), col = bisque) Georg Otto a écrit: Hi, if I plot a normal distribution like this: d-density(rnorm(1)) plot(d) how can I highlight the area below the

Re: [R] RFC: default background on lattice plots

2006-03-14 Thread Deepayan Sarkar
On 3/13/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Mon, 13 Mar 2006, Martin Maechler wrote: JohnF == John Fox [EMAIL PROTECTED] on Sat, 11 Mar 2006 13:29:34 -0500 writes: JohnF Dear Deepayan, As you say, it's currently very easy JohnF to change settings (which is what

[R] map question

2006-03-14 Thread Dean Sonneborn
Would anyone with experience with the map functions know how to divide Czechoslovakia into the Czech Republic and Slovakia. They have been two separate countries for some time now. I'm thinking about the worldhires map database in particular. -- Dean Sonneborn, MS Programmer Analyst

[R] using a value in a column to lookup data in a certian column of a dataset?

2006-03-14 Thread r user
I have a dataset with 20 columns and ~600,000 rows. Column 1 has a number from 2-19. This number tells me, for each row, which column has the “applicable” data. (i.e. the data that I wish to use for each individual row) I want to create a vector that contains the data from the value in column

[R] MCMCpack Ordinal Probit Help

2006-03-14 Thread ntoskova
Hi everyone, I am running an ordinal probit using the Bayesian MCMCpack and I am getting an error saying attempt for find suitable starting values failed Here is my code: posterior - MCMCoprobit(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 +x9 + x10 + x11 + x12 +x13 , beta.start=c(-10, 0.05,

Re: [R] using a value in a column to lookup data in a certian column of a dataset?

2006-03-14 Thread Gabor Grothendieck
From ?] note that: When indexing arrays by '[' a single argument 'i' can be a matrix with as many columns as there are dimensions of 'x'; the result is then a vector with elements corresponding to the sets of indices in each row of 'i'. so: mm -

[R] filtering in aggregate

2006-03-14 Thread Antonio Olinto
Hello all, I have a data frame with year, month, species, fishing gear and catch (Y, M, S, F, C) and I want the sum of C by Y for species A and fishing gear trawl. I tried things like aggregate(C[S==A F==trawl], list (Year = Y[S==A F==trawl]), fun=sum), but it didn't worked. To overcome

[R] Regarding aov Error()

2006-03-14 Thread John Vokey
The following dummy data frame has factor Q (with 2 levels) nesting factor P (with levels p1 and p2 nested under q1, and p3 and p4 nested under q2), but both crossing the random variate s, which has 8 levels. The dependent measure is dv. # The data frame: testnest dv s P Q 1 1

[R] How to get correct proportions/bounding box for latex figure?

2006-03-14 Thread context grey
Hello, I recently posted a question about my troubles with importing a lattice/trellis figure into latex. To recap, The figure contains 3 scatterplots, so it should have roughly a 1:3 sort of aspect ratio, in order to make each of the scatterplots square. Instead, the whole figure comes out

Re: [R] How to get correct proportions/bounding box for latex figure?

2006-03-14 Thread Duncan Murdoch
context grey wrote: Hello, I recently posted a question about my troubles with importing a lattice/trellis figure into latex. To recap, The figure contains 3 scatterplots, so it should have roughly a 1:3 sort of aspect ratio, in order to make each of the scatterplots square.

Re: [R] filtering in aggregate

2006-03-14 Thread Gabor Grothendieck
Here is an example using the builtin data set, CO2, where we aggregate uptake over Treatment for Plant equal to Qn1 and Type equal to Quebec. with(subset(CO2, subset = Plant == Qn1 Type == Quebec), aggregate(list(uptake = uptake), list(Treatment = Treatment), sum)) or equivalently:

Re: [R] How to get correct proportions/bounding box for latex figure?

2006-03-14 Thread context grey
Thank you. However I don't think I understand the response here. In what sense do I want a nonstandard layout? Is because I am specify aspect=1/1 in the xyplot() ? If so, then is there some other way to cause the scatterplot to be rougly square? I took this out and looked at the result

Re: [R] How to get correct proportions/bounding box for latex figure?

2006-03-14 Thread Duncan Murdoch
On 3/14/2006 9:29 PM, context grey wrote: Thank you. However I don't think I understand the response here. In what sense do I want a nonstandard layout? You said you want something that is wide and short (3 squares, side by side). The standard layout would fit on a normal piece of

[R] comparing AIC values of models with transformed, untransformed, and weighted variables

2006-03-14 Thread Patrick Baker
Hi there, I have a question regarding model comparisons that seems simple enough but to which I cannot find an answer. I am interested in developing a predictive model relating some measure of a tree's stem to the total leaf area (TLA) of the tree. Predictor variables might include, for

Re: [R] How to get correct proportions/bounding box for latex figure?

2006-03-14 Thread context grey
--- Duncan Murdoch [EMAIL PROTECTED] wrote: The R graphics model is that the drawing surface is established first, then the things you draw are adjusted to fit in it. R won't change the shape of the display because you are drawing more things on it. Thanks, this comment clarifies

[R] Help on factanal.fit.mle

2006-03-14 Thread souvik banerjee
Hi Can anybody please suggest me about the documentation of factanal.fit.mle() (Not factanal()-- searching factanal.fit.mle() in R always leads to factanal()). Is there any function for doing principal component factor analysis in R. Regards Souvik Bandyopadhyay JRF, Dept Of Statistics

[R] Applying nlmeODE

2006-03-14 Thread Dominik Heinzmann
Dear R-users My problem is the following: 1) Suppose we have the data test.txt: Data has form: Subject age test (=binary variable) 1 0.6 0 2 2 1 3 0.9 1 ... 2) I

[R] GAM using R tutorials?

2006-03-14 Thread Michael
Hi all, I am trying to use GAM to work on some data... Are there any resources providing hands-on tutorial/guide on how to do GAM on data in R? Specifically, I am not sure about which model to choose, and smooth models with which effective degree-of-freedom shall I use... I knew there is a book

  1   2   >