Re: [R] generalized linear models

2009-08-09 Thread annie Zhang
I think I need to restate the problem. If the test data is only a vector, then I am predicting one test sample. But the output from the predict result has the same length as the training set. And there is a warning message about this. Annie On Sat, Aug 8, 2009 at 2:52 PM, annie Zhang

Re: [R] linear model: Test difference between coefficients and given values (t.test?)

2009-08-09 Thread Katharina May
Thanks to somebody I got the hint to use offset for the purpose of validating if there's a difference between the intercept and slope of a model and some provided values for the coefficients intercept and slope. I read ?model.offset and I'm still struggling to use it for my purpose. If I

Re: [R] linear model: Test difference between coefficients and given values (t.test?)

2009-08-09 Thread Achim Zeileis
On Sat, 8 Aug 2009, Katharina May wrote: Thanks to somebody I got the hint to use offset for the purpose of validating if there's a difference between the intercept and slope of a model and some provided values for the coefficients intercept and slope. You could also use a Wald test for a

Re: [R] generalized linear models

2009-08-09 Thread Alain Zuur
annie Zhang wrote: Hi, Milton, Thank you for the reply. I tried, but it seems the problem is the column name of the test data is not the same as the column name of the training data. I didn't give the column name, the system seemed do. How to chang here? Annie On Fri, Aug 7, 2009

[R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Steven Rytina
Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector (and operator) to

Re: [R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Peter Dalgaard
Steven Rytina wrote: Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector

Re: [R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Steven Rytina
- Original Message - From: Peter Dalgaard p.dalga...@biostat.ku.dk To: Steven Rytina, Prof. steven.ryt...@mcgill.ca Cc: r-help@r-project.org Sent: Sunday, August 09, 2009 6:35 AM Subject: Re: [R] binary operators that implement row and column sweeps of matrices by vectors Steven

Re: [R] Select subset with specific distribution parameters.

2009-08-09 Thread stephen sefick
Could you provide a reproducible example? On Thu, Aug 6, 2009 at 10:59 AM, sedm1000gdo...@mit.edu wrote: This may be a simple problem, but I am looking to select a subset of rows from a dataframe that will have the same parameters as all the rows in another dataframe. e.g. I have a 500 row

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Welma Pereira
Duncan, Thanks a lot! it sorted out the problem. I was too worried about learning how to use sweave that forgot to try other things :-) Teysseyre, I saw this doc but my table was large in width like almost not fitting the paper size.. Its better now but I wonder how to make better tables using

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Gabor Grothendieck
latex() in the Hmisc package can group rows using rgroup= and n.group= arguments. On Sun, Aug 9, 2009 at 9:08 AM, Welma Pereirawelma.pere...@gmail.com wrote: Duncan, Thanks a lot! it sorted out the problem. I was too worried about learning how to use sweave that forgot to try other things :-)

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Welma Pereira
Hi again, one last annoying thing: how to deal with %, always when I use sweave to get a latex document the % comes as a comment and I cannot have % in my tables, how to sort out this annoying detail? thanks! Regards Welma 2009/8/9 Gabor Grothendieck ggrothendi...@gmail.com latex() in the

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Gabor Grothendieck
See the sanitize.* arguments to print.xtable. On Sun, Aug 9, 2009 at 10:16 AM, Welma Pereirawelma.pere...@gmail.com wrote: Hi again, one last annoying thing: how to deal with %, always when I use sweave to get a latex document the % comes as a comment and I cannot have % in my tables, how to

Re: [R] How do I plot a line followed by two forecast points?

2009-08-09 Thread Jorgy Porgee
Thank you but just fyi, the lines() and points() approach proposed by Jean earlier solved the problem. Thanks all once again. On Sat, Aug 8, 2009 at 7:49 PM, Felipe Carrillomazatlanmex...@yahoo.com wrote: Try this, it plots two points ahead based on the existing data of a month apart. #

[R] How '.' is used?

2009-08-09 Thread Peng Yu
Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the detailed usage of '.' in R. Can somebody point me a webpage, a manual or a book that discuss this? Regards, Peng __ R-help@r-project.org mailing list

Re: [R] How '.' is used?

2009-08-09 Thread Ted Harding
On 09-Aug-09 16:06:52, Peng Yu wrote: Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the detailed usage of '.' in R. Can somebody point me a webpage, a manual or a book that discuss this? Regards, Peng To the best of my knowledge, apart from its

Re: [R] How '.' is used?

2009-08-09 Thread Douglas Bates
On Sun, Aug 9, 2009 at 11:32 AM, Ted Hardingted.hard...@manchester.ac.uk wrote: On 09-Aug-09 16:06:52, Peng Yu wrote: Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the detailed usage of '.' in R. Can somebody point me a webpage, a manual or a book that

[R] howto get the number of columns and column names of multiply data frames

2009-08-09 Thread Frank Schäffer
Hi, I' ve read in several files with measurements into R data frames(works flawlessly). Each dataframe is named by the location of measurement and contains hundreds of rows and about 50 columns like this dataframe1. date measurment_1 mesurement_n 1 2 3 .. .. .. n For further processing I

Re: [R] howto get the number of columns and column names of multiply data frames

2009-08-09 Thread Steve Lianoglou
Hi, On Aug 9, 2009, at 11:29 AM, Frank Schäffer wrote: Hi, I' ve read in several files with measurements into R data frames(works flawlessly). Each dataframe is named by the location of measurement and contains hundreds of rows and about 50 columns like this dataframe1. date measurment_1

[R] Linking in R package documentation

2009-08-09 Thread Rebecca Sela
I have two straightforward questions about linking in the man pages for R packages: First, is it possible to link from within parts of the documentation that are not the \seealso section? For example, I would like to have something like: \arguments{ \item{correlation}{an optional

Re: [R] How '.' is used?

2009-08-09 Thread Ted Harding
On 09-Aug-09 16:53:32, Douglas Bates wrote: On Sun, Aug 9, 2009 at 11:32 AM, Ted Hardingted.hard...@manchester.ac.uk wrote: On 09-Aug-09 16:06:52, Peng Yu wrote: Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the detailed usage of '.' in R. Can somebody

Re: [R] How '.' is used?

2009-08-09 Thread Duncan Murdoch
(Ted Harding) wrote: On 09-Aug-09 16:53:32, Douglas Bates wrote: On Sun, Aug 9, 2009 at 11:32 AM, Ted Hardingted.hard...@manchester.ac.uk wrote: On 09-Aug-09 16:06:52, Peng Yu wrote: Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the

Re: [R] Linking in R package documentation

2009-08-09 Thread Duncan Murdoch
Rebecca Sela wrote: I have two straightforward questions about linking in the man pages for R packages: First, is it possible to link from within parts of the documentation that are not the \seealso section? For example, I would like to have something like: \arguments{

Re: [R] How '.' is used?

2009-08-09 Thread Ted Harding
On 09-Aug-09 19:31:47, Duncan Murdoch wrote: (Ted Harding) wrote: [...] Next -- and this is the real question -- how does R parse the name summary.glm? In my naivety, I simply suppose that it looks for an available function whose name is summary.glm in just the same way as it looks for

Re: [R] howto get the number of columns and column names of multiply data frames

2009-08-09 Thread Don MacQueen
## You can use get() for ( i in 1:n) { nm - paste('dataframe',i,sep='') cat( ncol( get(nm)), 'columns in',nm,'\n') ) } ## or nms - ls(pattern='dataframe') for (nm in nms) cat( ncol(get(nm)) , 'columns in',nm,'\n') ) } (Assuming I have balanced parantheses, that is -- my email software

[R] problem adding columns to matrix

2009-08-09 Thread Fabio Murtas
Hi all, i purchased a copy of the book Morphometrics with R by Springer. at the end of each chapter there are exercises to train what you just read and (hope) learned... so i have this problem: Define a hypothetical data frame containing five measurments normally

[R] nearest neighbors

2009-08-09 Thread cindy Guo
Hi, All, I am wondering if there is any package which can give the index of the k nearest neighbors. Thank you, Cindy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] wget parameters

2009-08-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi, Following an example I've received from Phil Spector, I am trying to get a remote file by using download file. The concerned remote server doesn't username and password passed with the URL, thus this line fails...

Re: [R] wget parameters

2009-08-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Please, accept my apologies for keeping posting in HTML format! Solved! Greetings, Ricardo [Ricardo Rodriguez] Your XEN ICT Team wrote: Hi, Following an example I've received from Phil Spector, I am trying to get a remote file by using download file. The concerned remote server doesn't

[R] help with a loop (coefficients with lmList)

2009-08-09 Thread Cecilia Carmo
Hi R-helpers. #I start with the reproducible example: firm-c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10)) year-c(rep(1998:2007,5)) industry-c(rep(1,20),rep(5,10),rep(7,10),rep(9,10)) X1-rnorm(50) X2-rnorm(50,mean=0.5,sd=0.1) Y-rnorm(50,mean=0,sd=0.5) data-data.frame(firm,

Re: [R] nearest neighbors

2009-08-09 Thread milton ruser
Hi cindy, depends on your data type. It it is points, give a look at spatstat package. bests milton On Sun, Aug 9, 2009 at 5:03 PM, cindy Guo cindy.g...@gmail.com wrote: Hi, All, I am wondering if there is any package which can give the index of the k nearest neighbors. Thank you,

Re: [R] help with a loop (coefficients with lmList)

2009-08-09 Thread Gabor Grothendieck
Your data has 2 points per regression for each year in industry 1 and only one point per regression for the other industries so one would expect many NAs: table(data[c(industry, year)]) year industry 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 1222222

Re: [R] Using system fonts in MacOS

2009-08-09 Thread Paul Murrell
Hi I don't have a Mac, but looking at the source, it seems that Times-Roman is the default serif family, so something like ... quartz(family=serif) ... might get you what you want(?) Paul Daniel J Farrell wrote: Dear r-help, I am using R for MacOS (R 2.9.1 GUI 1.28 Tiger build 32-bit

Re: [R] problem adding columns to matrix

2009-08-09 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Fabio Murtas Sent: Sunday, August 09, 2009 1:51 PM To: R-help@r-project.org Subject: [R] problem adding columns to matrix Hi all, i purchased a copy of the book Morphometrics

[R] index of intersect()

2009-08-09 Thread Praveen Surendran
Hi all, Is there a way to get the index of elements in intersect(x,y) where x and y are vectors with few common elements. Appreciate your response. Praveen Surendran. [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] index of intersect()

2009-08-09 Thread jim holtman
Is this what you want: set.seed(1) x - sample(letters,15) y - sample(letters,15) z - intersect(x,y) # find index in x match(z, x) [1] 1 4 5 8 9 12 13 15 # index in y match(z,y) [1] 11 10 7 1 14 9 5 3 z [1] g u e m l c y x x [1] g j n u e s w m l b d c y v x y [1] m r x i y

[R] Hmisc get.mdb on mac os x 10.5.7 problems

2009-08-09 Thread stephen sefick
I have installed the Hmisc package and the mdb-tools package from fink. It is in my it is installed in the /sw/bin as to fink. I have looked at the code for get.mdb and called system('mdb-tables /Users/sefick/Desktop/FTBragg_GeoDataBase_AuburnUNV.mdb') and got this message /bin/sh:

Re: [R] lattice: simultaneously control aspect outer whitespace

2009-08-09 Thread Deepayan Sarkar
On 8/7/09, Jacob Wegelin jacob.wege...@gmail.com wrote: Suppose we wish to achieve the following three aims: (1) Control the aspect ratio of our plot (i.e., tweak this till it looks great) (2) Save the plot as a PDF with zero or minimal white space outside it. (3) Preserve this in code,

Re: [R] multiple lty on same panel in xyplot

2009-08-09 Thread Deepayan Sarkar
On 8/7/09, Duncan Mackay mac...@northnet.com.au wrote: Hi RUsers I like to keep the plots self contained and avoid changing the current device parameters by using the par.settings. To see what I could achieve by using par settings I tried the following and several variants but could not

[R] label X-Axis by abother variable in R plot

2009-08-09 Thread Frank Zhang
Hi,   I would like to plot b, c in one plot, and use a as x-aix. How could I do that? Thanks   a,   b, c, 20, 2, 3 21, 4, 5 22, 1, 2 24, 3, 5 50, 3, 6           [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] multiple lty on same panel in xyplot

2009-08-09 Thread Duncan Mackay
Hi Deepayan Thank you very much for pointing out my mistake. I had another go now with superpose.symbol and with several other combinations to see what could be done. All went well. Regards Duncan Mackay At 13:19 10/08/2009, you wrote: On 8/7/09, Duncan Mackay mac...@northnet.com.au

Re: [R] label X-Axis by abother variable in R plot

2009-08-09 Thread Zhiliang Ma
plot(b, c, xaxt=n) axis(1, at=b, labels=as.character(a)) On Sun, Aug 9, 2009 at 9:33 PM, Frank Zhangfrankyuzh...@yahoo.com wrote: Hi, I would like to plot b, c in one plot, and use a as x-aix. How could I do that? Thanks a,   b, c, 20, 2, 3 21, 4, 5 22, 1, 2 24, 3, 5 50, 3, 6