Re: [R] Parallel R

2008-07-10 Thread Juan Pablo Romero Méndez
Just out of curiosity, what system do you have? These are the results in my machine: system.time(exp(m), gcFirst=TRUE) user system elapsed 0.520.040.56 library(pnmath) system.time(exp(m), gcFirst=TRUE) user system elapsed 0.660 0.016 0.175 Juan Pablo

[R] Finding Values that Occur Most Often in a Vector

2008-07-10 Thread Gundala Viswanath
Hi, Is there a way to do it? For example I have the following vector: print(myvector) [1] -295.8045 -295.8045 -295.8045 -295.8045 -325.4754 -295.8045 -295.8045 [8] -295.8045 -413.2099 -295.8045 I want it to return -295.8045, which occur most often. - Gundala Viswanath Jakarta - Indonesia

Re: [R] Finding Values that Occur Most Often in a Vector

2008-07-10 Thread hpages
Hi Gundala, This would be a way to do it: names(which.max(table(myvector))) For example: set.seed(99) y - sample(letters[1:3], 40, replace=TRUE) [1] b a c c b c c a b a b b a b c b [17] b a a a a a c b c b a c a a b a [33] b b a b c c b c table(y) y a b c 14 15 11

Re: [R] Finding Values that Occur Most Often in a Vector

2008-07-10 Thread Duncan Mackay
If you just want the value which is the most frequent try as.numeric(names(which.max(table(c( -295.8045 ,-295.8045, -295.8045, -295.8045 ,-325.4754 ,-295.8045, -295.8045, -295.8045, -413.2099, -295.8045) [1] -295.8045 There may be easier ways Regards Duncan Mackay Department of

Re: [R] childNames for xaxis grob (grid package)

2008-07-10 Thread Tobias Verbeke
Hi Paul, Can someone explain why the childNames below gives character(0) instead of the (canonical) names of the children grobs of the xaxis gTree ? [1] major ticks labels The problem is that you xaxis has an 'at' component of NULL, which means that the axis calculates its tick marks

Re: [R] “Check” problem

2008-07-10 Thread Peter Dalgaard
leeznar wrote: Dear all: I ‘m a newer. I have some problem when I check my package. The error messages were as follows. It shows that the problem is about Rd file. How can I find where the error is? How can I do?? Inside your log directory, you should have bear-manual.tex and

Re: [R] Parsing

2008-07-10 Thread Paolo Sonego
Thank you Martin! This code is amazing! SO fast! Exactly what i was looking for! Parsing ~8M lines (~ 600M file size) took about 45s on a Xeon 3,4 Ghz (8 Gb). Thank you so much! Sincerely, Paolo Martin Morgan ha scritto: Paolo Sonego [EMAIL PROTECTED] writes: I apologize for giving

Re: [R] Lattice: merged strips?

2008-07-10 Thread Mike Lawrence
Sorry, my original message used the term 'shingle' where I meant to use the term 'strip'. That is, I'm looking to merge the strip of text naming the shingles. Mike On 10-Jul-08, at 1:47 AM, Mike Lawrence wrote: Hi all, By default a call to xyplot from the Lattice package when using 2

[R] specifying data

2008-07-10 Thread sprohl
Hello, I have to merge several serie by date. I used: cb-merge(cbds,cbbond,by=c(date),all=T). I have the daily and the high frequency data. Unfortunately, the programm did not sort by sort my data in a chronological manner. Is there any possibility to do this in R?. Thanks in advance, Silke

[R] Interpolation of data

2008-07-10 Thread sprohl
Hello, I have the data whcih are not balanced (several missing observations), and one possibility is t use interpolation method to get the information missing in this series from other series. Does anybody know how I can program interpolation of series1 (which ahs missing observations) and series

Re: [R] Problem when building a test R package on PC

2008-07-10 Thread Briantgr
Hi, where did you find the Peter Rossi test.zip file?? Xiaohui Wang wrote: I followed the instruction of building R package on PC by Peter Rossi. I got problem when I tried to build a R package from his example, test.zip. The problem occurs when I tried to R CMD check test the

[R] problems with rq.fit.sfn

2008-07-10 Thread alessia matano
Dear all, I am running a quantile estimation with Sparse matrix and when I run the procedure rq.fit.sfn I receive the following warning: tiny diagonals replaced with Inf when calling blkfct. Does anyone knows exactly what does it mean? What's this kind of error? Should I get worried about this

Re: [R] Operator overloading

2008-07-10 Thread Peter Dalgaard
Tine wrote: Hi! I was just wondering is there anyway to overload operator for custom class. For example: I have two matrices A and B with same dimensions. I want to overload operator '+' with my own function. Or even better can I create my own (new) operator. Example: A+-B where '+-'

Re: [R] re ad.table problem

2008-07-10 Thread Schleuh
did you remark you obtain the half of rows (636615*2=1273230) ; maybe the columns aren't good sliced phoebe kong wrote: Dear all, I have problem when reading a table into R. The total row of read in table has is much less than the original saved table. I built a 1,273,230 by 6 data set

[R] Sorting / editing a table

2008-07-10 Thread Jörg Groß
Hi, I have a problem sorting a table; When I read a table into R by x - read.table() I get something like this: V1 V2 V3 yes 1 3 no 2 6 yes 3 9 no 4 12 Now I want to generate a vector of V2. But R should only put in the numbers of V2 into

Re: [R] Thanks!

2008-07-10 Thread Petr PIKAL
Hi You can try the intro book by Peter Dalgaard and I found useful also R-tips (statsRus), You can find it through google. Regards Petr [EMAIL PROTECTED] napsal dne 10.07.2008 06:25:36: Thanks! I'll use the which.min function. I've been learning R from the pdfs on the CRAN website, but

Re: [R] Sorting / editing a table

2008-07-10 Thread Wacek Kusnierczyk
Jörg Groß wrote: Hi, I have a problem sorting a table; When I read a table into R by x - read.table() I get something like this: V1V2V3 yes13 no26 yes39 no412 Now I want to generate a vector of V2. But R should only put in the numbers of V2

Re: [R] Sorting / editing a table

2008-07-10 Thread Tobias Verbeke
Jörg Groß wrote: I have a problem sorting a table; When I read a table into R by x - read.table() I get something like this: V1V2V3 yes13 no26 yes39 no412 Now I want to generate a vector of V2. But R should only put in the numbers of V2 into the new

Re: [R] Sorting / editing a table

2008-07-10 Thread Daniel Malter
Type ?ifelse in the R prompt and hit enter you will have to put the yes (or the no) in in your ifelse command. Best, Daniel Jörg Groß wrote: Hi, I have a problem sorting a table; When I read a table into R by x - read.table() I get something like this: V1V2 V3 yes

Re: [R] specifying data

2008-07-10 Thread Daniel Malter
http://www.ats.ucla.edu/stat/r/faq/sort.htm Best, daniel sprohl wrote: Hello, I have to merge several serie by date. I used: cb-merge(cbds,cbbond,by=c(date),all=T). I have the daily and the high frequency data. Unfortunately, the programm did not sort by sort my data in a

Re: [R] Interpolation of data

2008-07-10 Thread Daniel Malter
Please do read the posting guide. Please provide self-contained code (calls to randomly generated data) and illustrate (e.g. in a small table) what you want to do and also illustrate (with the self-contained code) where your current approach (if any) fails. After reading your message, I have only

[R] Odp: specifying data

2008-07-10 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 10.07.2008 08:10:36: Hello, I have to merge several serie by date. I used: cb-merge(cbds,cbbond,by=c(date),all=T). I have the daily and the high frequency data. Unfortunately, the programm did not sort by sort Maybe ?sort or ?order can help you. I presume

Re: [R] version problems of rkward in ubuntu hardy repository

2008-07-10 Thread Rainer M Krug
On Thu, Jul 10, 2008 at 6:26 AM, Vincent Goulet [EMAIL PROTECTED] wrote: Le mer. 09 juil. à 06:20, Rainer M Krug a écrit : Hi I tried to install rkward under ubuntu hardy heron, but it tried to use the one from the cran repository which was newer, but it did not install. To be able to

[R] problems with rq.fit.sfn

2008-07-10 Thread alessia matano
Dear all, I am running a quantile estimation with Sparse matrix and when I run the procedure rq.fit.sfn I receive the following warning: tiny diagonals replaced with Inf when calling blkfct. Does anyone knows exactly what does it mean? What's this kind of error? Should I get worried about this

[R] Bootstrap in betareg()

2008-07-10 Thread Leandro Marino
Hi list, I have an database (30.000 entrys) that my R is not modelling into betareg() so I decided to do an sample and uses an bootstrap to give me the correct estimates to the variance. Anybody knows what library can I use in this case? Regards, Atenciosamente, Leandro Lins Marino Centro de

[R] Turn any vector

2008-07-10 Thread Zroutik Zroutik
Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i - seq(1:10) i_turned - i for (j in 1:length(i)) i_turned[j] - i[length(i)-j+1] now, i_turned is what I call turned. Is there a function which would make a

Re: [R] Turn any vector

2008-07-10 Thread Henrique Dallazuanna
See ?rev On Thu, Jul 10, 2008 at 8:56 AM, Zroutik Zroutik [EMAIL PROTECTED] wrote: Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i - seq(1:10) i_turned - i for (j in 1:length(i)) i_turned[j] -

Re: [R] Turn any vector

2008-07-10 Thread Gabor Csardi
It is called 'rev', see ?rev. rev(1:10) [1] 10 9 8 7 6 5 4 3 2 1 G. On Thu, Jul 10, 2008 at 01:56:58PM +0200, Zroutik Zroutik wrote: Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i -

Re: [R] Turn any vector

2008-07-10 Thread jgarcia
rev(1:10) [1] 10 9 8 7 6 5 4 3 2 1 Javier Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i - seq(1:10) i_turned - i for (j in 1:length(i)) i_turned[j] - i[length(i)-j+1] now,

Re: [R] Turn any vector

2008-07-10 Thread Zroutik Zroutik
Thanks all of you. It's really catchy name for the wanted function (reverse), somehow I could not find it unfortunately :( Z On Thu, Jul 10, 2008 at 2:04 PM, Gabor Csardi [EMAIL PROTECTED] wrote: It is called 'rev', see ?rev. rev(1:10) [1] 10 9 8 7 6 5 4 3 2 1 G. On Thu, Jul

Re: [R] Operator overloading

2008-07-10 Thread hadley wickham
On Thu, Jul 10, 2008 at 5:09 AM, Peter Dalgaard [EMAIL PROTECTED] wrote: Tine wrote: Hi! I was just wondering is there anyway to overload operator for custom class. For example: I have two matrices A and B with same dimensions. I want to overload operator '+' with my own function. Or even

Re: [R] Operator overloading

2008-07-10 Thread Peter Dalgaard
hadley wickham wrote: On Thu, Jul 10, 2008 at 5:09 AM, Peter Dalgaard [EMAIL PROTECTED] wrote: Tine wrote: Hi! I was just wondering is there anyway to overload operator for custom class. For example: I have two matrices A and B with same dimensions. I want to overload operator

Re: [R] Plot depends on conditions

2008-07-10 Thread mysimbaa
Yeah, It is a IF-THEN-ELSE. Possible combinations are c4...c7. I know how to combine them in a plot. But what I don't know is to build a function which return a plot depending on those conditions !!! Any help? Thanks, Adel Tekari jholtman wrote: It sounds like an IF-THEN-ELSE should do the

Re: [R] quantile regression estimation results

2008-07-10 Thread roger koenker
The canonical answer is: It is R, so everything is possible. Sounds like you need to read what is produced by ?summary.rq carefully. url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:

Re: [R] build matrix with the content of one column of a data frame in function of two factors

2008-07-10 Thread VinceD
So the solution is : tapply(content, list(factor1, factor2), mean) An example of what it does : my.data name item vote 1 Ricardo Coke 20 2 Ricardo Fanta 60 3 Ricardo Pepsi 100 4 Marie Pepsi 40 5 Marie Coke 60 6 Julia

[R] Position in a vector of the last value n

2008-07-10 Thread Thaden, John J
This shouldn't be hard, but it's just not coming to me: Given a vector, e.g., v - c(20, 134, 45, 20, 24, 500, 20, 20, 20) how can I get the index of the last value in the vector having a value greater than n, in this case, greater than 20? I'm looking for an efficient function I can use on very

Re: [R] Position in a vector of the last value n

2008-07-10 Thread Henrique Dallazuanna
Try this: v[max(which(v 20))] On Thu, Jul 10, 2008 at 9:41 AM, Thaden, John J [EMAIL PROTECTED] wrote: This shouldn't be hard, but it's just not coming to me: Given a vector, e.g., v - c(20, 134, 45, 20, 24, 500, 20, 20, 20) how can I get the index of the last value in the vector having a

Re: [R] matplot help

2008-07-10 Thread Michael Rennie
I think the problem is that you are trying to plot non-numeric values on your x. I built some test code around your example; I don't think you can plot non-numeric characters. If the plot is working on your end, it's likely because it's recognizing your X variable as a factor and it's plotting the

Re: [R] Issue with postscript figures using WinAnsi encoding

2008-07-10 Thread Michael Rennie
Hi, Just so this doesn't end up being a dead-end post, here's what I figured out: It's a GSview issue- for whatever reason, the version of GSview (4.9) that I am using doesn't recognize WinAnsi encoding. I imagine there is a way to fix this, but I don't care, because specifying an alternative

Re: [R] Interpolation of data

2008-07-10 Thread stephen sefick
if it is a time series the interpolation methods in zoo are an option. On Thu, Jul 10, 2008 at 6:41 AM, Daniel Malter [EMAIL PROTECTED] wrote: Please do read the posting guide. Please provide self-contained code (e.g. to randomly generate data) and illustrate (e.g. in a small table) what you

Re: [R] matplot help

2008-07-10 Thread Gabor Grothendieck
Try this: Lines - Q1-60 26.528 1.268 Q2-60 27.535 1.087 Q3-60 27.737 1.346 Q4-60 28.243 3 Q1-61 26.462 3.272 Q2-61 27.769 3.863 Q3-61 27.903 4.606 Q4-61 31.673 4.1 Q1-62 28.211 5.395 Q2-62 29.469 5.554 Q3-62 30.249 4.903 library(zoo) # z - read.zoo(myfile.dat, FUN = as.yearqtr, format = Q%q-%y)

Re: [R] rbinom for a matrix

2008-07-10 Thread Ben Bolker
ACroske Audy3272 at yahoo.com writes: Ben: Thanks for the reply. One further question, and this is where my novice status at R shows through. The code makes sense, but what would I put it for m? Is it the same number for all three (that was my first thought since it was the same

Re: [R] Interpolation of data

2008-07-10 Thread Don MacQueen
Try help.search('interpolate') and help.search('impute') (most of the responses to the latter come from packages that you may not have installed, such as Hmisc) -Don At 8:15 AM +0200 7/10/08, [EMAIL PROTECTED] wrote: Hello, I have the data whcih are not balanced (several missing

Re: [R] Interpolation of data

2008-07-10 Thread Mike Lawrence
Does this thread solve your problem? - https://stat.ethz.ch/pipermail/r-help/2007-July/136814.html On 10-Jul-08, at 3:15 AM, [EMAIL PROTECTED] wrote: Hello, I have the data whcih are not balanced (several missing observations), and one possibility is t use interpolation method to get the

[R] xYplot customizing y-axis scaling

2008-07-10 Thread Henning Wildhagen
Dear list, using the packages Hmisc and lattice i produced some nice xYplots. However, since the data range of the conditioning variable is very big, i need to define more than one y-scale for the plot (in some panels you just see a flat line of data points very close to the x-axis), e.g.

[R] false discovery rate !

2008-07-10 Thread A Ezhil
Dear All, It is not a typical R question (though I use R for this) but I thought someone will help me. For the list of P values, I have calculated FDR using p.adjust() in R (bioconductor). But my FDR values are same for all the P values. When do we get same FDR values? Does the smallest P

Re: [R] false discovery rate !

2008-07-10 Thread john seers (IFR)
Hi Are all your input p values the same? If so your output FDR values would be the same. Or are all your p-values relatively large? Then (nearly) all your FDR values might be 1. Why don't you put a small example up of what you did? Then we could see what method you used etc. Regards JS

[R] How to check how much memory has been used or reserved ?

2008-07-10 Thread Daren Tan
Creating variables for small dataset is very mundane, but lately I am dealing with 10^7 by 10^3 datasets which eats up alot of memory. How can I monitor how much has been used or reserved ? _ [[alternative HTML version

Re: [R] Lattice: merged strips?

2008-07-10 Thread Mike Lawrence
As I understand it, Duncan MacKay's solution involves simply pasting the factors together, as in: |_AX_|_AY_|_BX_|_BY_| Which isn't quite as aesthetically pleasing as what I I'm looking for: |___A___|___B___| |_X_|_Y_|_X_|_Y_| Any further suggestions? Mike On 10-Jul-08, at 2:43 AM,

[R] Non-normal data issues in PhD software engineering experiment

2008-07-10 Thread Andrew Jackson
Hi All, This is a rather general post to begin with. This is because I need to provide you some important context. There are very R specific elements to this further along in this rather long posting so I thank you in advance for your patients. I will do my best to clearly explain my experiment,

[R] S4 class questions

2008-07-10 Thread Li, Xuejun
Hi, I'd like to create a S4 class contains only one type of data. However, the number of slots varies. For example, I want to create a class a, each slots in a contains numeric value only. setClass(a, contains = numeric) If I want to create an object a with only one slot

Re: [R] Non-normal data issues in PhD software engineering experiment

2008-07-10 Thread Daniel Malter
I hope you don't really want our patients :) It looks that you have an experiment with two groups. You have several trials for each group. And within each trial you observe your units a distinct points in time. The first advice for you is to graphically display your data. Before you start

Re: [R] Parallel R

2008-07-10 Thread Martin Morgan
Juan Pablo Romero Méndez [EMAIL PROTECTED] writes: Just out of curiosity, what system do you have? These are the results in my machine: system.time(exp(m), gcFirst=TRUE) user system elapsed 0.520.040.56 library(pnmath) system.time(exp(m), gcFirst=TRUE) user system

[R] by() function doesn't work inside another function

2008-07-10 Thread Russell Ivory
I have a longitudinal data set in long format and I want to run individual regressions. I do this by using the by() function as follows: temp - by(tolerance.pp, tolerance.pp$id, function(x) summary(lm(tolerance ~ time, data=x))) This works fine. Coefficients for the first two subjects

Re: [R] S4 class questions

2008-07-10 Thread Martin Morgan
Li, Xuejun [EMAIL PROTECTED] writes: Hi, I'd like to create a S4 class contains only one type of data. However, the number of slots varies. For example, I want to create a class a, each slots in a contains numeric value only. setClass(a, contains = numeric) If I want to create an

Re: [R] Non-normal data issues in PhD software engineering experiment

2008-07-10 Thread Gustaf Rydevik
On Thu, Jul 10, 2008 at 5:15 PM, Andrew Jackson [EMAIL PROTECTED] wrote: Hi All, Hi Andrew, The main questions here are not R-related, but statistical modelling questions, and much too broad for the R list. They are things you'd ask a (paid) statistical consultant. I would suggest taking

Re: [R] Non-normal data issues in PhD software engineering experiment

2008-07-10 Thread hadley wickham
On Thu, Jul 10, 2008 at 11:06 AM, Daniel Malter [EMAIL PROTECTED] wrote: I hope you don't really want our patients :) It looks that you have an experiment with two groups. You have several trials for each group. And within each trial you observe your units a distinct points in time. The

[R] Non-normal data issues in PhD software engineering experiment

2008-07-10 Thread andrewjacksonTCD
Hi All, Title: Non-normal data issues in PhD software engineering experiment I hope I am not breeching any terms of this forum by this rather general post. There are very R specific elements to this rather long posting. I will do my best to clearly explain my experiment, goals and problems

[R] What's the T-Value in fisher.test

2008-07-10 Thread DaveFrisch
I do not understand how to interpret this to find the T Value for the data. Is there a way to figure this out, or another function that will provide this for me using Fisher's Exact Test? The outcome of my data is listed below. data: DATA p-value = 0.1698 alternative hypothesis: true odds

[R] Rmpi unkown input format error

2008-07-10 Thread Lyman, Mark
I have just installed Rmpi on a Suse 9.1 linux cluster with openmpi-1.0.1. I am trying the example included below from the tutorial website. However, I keep getting the following error: # Load the R MPI package if it is not already loaded. if (!is.loaded(mpi_initialize)) { +

Re: [R] What's the T-Value in fisher.test

2008-07-10 Thread ctu
Hi Dave, As I know there is no T value for Fisher's exact test (no matter you use SAS, R or other packages) Fisher's exact test is for the categorical data analysis. Fisher's exact test for testing the null of independence of rows and columns in a contingency table with fixed marginals so

Re: [R] xYplot customizing y-axis scaling

2008-07-10 Thread Christoph Meyer
Hi Henning, have a look at the scales argument in the xyplot documentation. You could try adding the following to your code: scales=list(y=list(relation=free)) Cheers, Christoph Thursday, July 10, 2008, 4:35:28 PM, you wrote: Dear list, using the packages Hmisc and lattice i produced

Re: [R] Parallel R

2008-07-10 Thread Luke Tierney
pnmath currently uses up to 8 threads (i.e. 1, 2, 4, or 8). getNumPnmathThreads() should tell you the maximum number used on your system, which should be 8 if the number of processors is being identified correctly. With the size of m this calculation should be using 8 threads, but the exp

Re: [R] Help on Installing Matrix Package in Linux (Fedora)

2008-07-10 Thread Hyunseung Kang
I did a search on my system and it seems like R.h and the other files are not on the system. Also, CRAN or a google search does not seem to have any relevant info about these files. Here's the most relevant one in regards to Rversion.h: [Rd] Rversion.h [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: [R] xYplot customizing y-axis scaling

2008-07-10 Thread Ben Bolker
Henning Wildhagen HWildhagen at gmx.de writes: Dear list, using the packages Hmisc and lattice i produced some nice xYplots. However, since the data range of the conditioning variable is very big, i need to define more than one y-scale for the plot (in some panels you just see a flat

Re: [R] xYplot customizing y-axis scaling

2008-07-10 Thread Ben Bolker
Christoph Meyer christoph.meyer at uni-ulm.de writes: Hi Henning, have a look at the scales argument in the xyplot documentation. You could try adding the following to your code: scales=list(y=list(relation=free)) Cheers, Christoph Yes, but this apparently doesn't work for

Re: [R] Sorting a matrix

2008-07-10 Thread Erik Iverson
Do you really want to sort a *matrix*, or do you mean a data.frame? See ?order. Angelo Scozzarella wrote: Hi, I want to sort a matrix by a specific variable without changing the row binding between variables. Ex. NameSexAge FredM24 JohnM18 MaryF

[R] compiling pnmath on an intel processor running mac OS 10.5

2008-07-10 Thread Mike Lawrence
Has anyone successfully compiled pnmath (http://www.stat.uiowa.edu/~luke/R/experimental ) for an intel processor running mac OS 10.5? When I attempt to do so via the R package installer (choosing Local Source Package and pointing to the pnmath_0.0-2.tar.gz file), I get the following errors:

Re: [R] Sorting a matrix

2008-07-10 Thread Jorge Ivan Velez
Dear Angelo, What about this? mydata=read.table(textConnection(NameSex Age FredM 24 JohnM 18 MaryF 21), header=TRUE,sep=) mydata[order(mydata$Age),] HTH, Jorge On Thu, Jul 10, 2008 at 2:21 PM, Angelo Scozzarella [EMAIL

Re: [R] What's the T-Value in fisher.test

2008-07-10 Thread Ted Harding
On 10-Jul-08 16:49:57, DaveFrisch wrote: I do not understand how to interpret this to find the T Value for the data. Is there a way to figure this out, or another function that will provide this for me using Fisher's Exact Test? If I interpret your query correctly, you are expecting to find

[R] search with help.start

2008-07-10 Thread Carlisle Thacker
Search is not working after starting the help facility using the help.start function. The firefox browser says the applet has started, but nothing happens What to do to get it working? Versions of R, java, and firefox are shown below. Thanks, Carlisle version _ platform

Re: [R] Sorting a matrix

2008-07-10 Thread Bert Gunter
1. This is a data frame, not a matrix ! -- ?data.frame 2. help.search(sort) is the first thing you should have done. You probably wouldn't have needed to post if you had. 3. The canonical answer is ?order and indexing -- as in: yourdf[order(yourdf$Age),] Note that order() can be used to sort

[R] Ellipsis arguments for plot.formula

2008-07-10 Thread Amit Ganatra
Hi: I have a function as follows: my.plot- function( x, y = NULL, ... ) { plot( x, y, cex.axis=0.5, ...) } Set up the variables: x - 1:10; y - x; tdf - data.frame( x, y ); main.str - test I will exercise the function in two ways: my.plot( y ~ x, tdf, main = test ) This works fine

Re: [R] Operator overloading

2008-07-10 Thread Spencer Graves
The 'polynom' package provides one example of how to do this. However, getAnywhere(+.polynomial) just told me no object named ‘+.polynomial’ was found; I don't know why. The documentation says it uses S3 classes. The 'Matrix' package should provide other examples, using S4 classes.

Re: [R] compiling pnmath on an intel processor running mac OS 10.5

2008-07-10 Thread Luke Tierney
You need a gcc version that supports OpenMP; I believe that means gcc 4.2 or later. pnmath0 should work with older gcc versions. luke On Thu, 10 Jul 2008, Mike Lawrence wrote: Has anyone successfully compiled pnmath (http://www.stat.uiowa.edu/~luke/R/experimental) for an intel processor

Re: [R] shifting data in matrix by n rows

2008-07-10 Thread rcoder
Hi everyone, Thanks very much for all your replies. I'm interested in hearing more about the lag function. I remember coming across this in the R intro manual, but I couldn't figure out how to apply it to my case. Does anyone know how it is applied, assuming a time series data frame? Thanks,

[R] rounding

2008-07-10 Thread Korn, Ed (NIH/NCI) [E]
Hi, Round(0.55,1)=0.5 Round(2.55,1)=2.6 Can this be right? Thanks, Ed [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] RE volution

2008-07-10 Thread Mariana Gamb
Hi, everybody. I have visited the revolution computing web page, but its not clear when or what will be the new release be. Does anybody have information about that. Thank you Mariana John Maindonald wrote: Does anyone know any more than is in the following press release about REvolution

[R] Interpretation of EXACT Statistical Test in finding the probability as Std. Deviations (SumP)

2008-07-10 Thread DaveFrisch
Okay, so I'm fairly retarded, and asked a question about finding the T-Value in the Fisher Exact method. I suppose what I'm truly after can best be explained by the Biddle Consulting site that has a program setup to deal with this kind of thing. Unfortunately, it is not currently functioning,

[R] layout is to xyplot as ??? is to qplot

2008-07-10 Thread Jim Price
Playing with ggplot, something I'd promised myself I'd get around to. I've the following scenario: library(lattice) library(ggplot2) myData - data.frame( x = rnorm(100), y = rnorm(100), group = 1:4 ) xyplot(y ~ x | factor(group), data = myData, layout = c(2, 2))

[R] predict.garch problem

2008-07-10 Thread Shirin Safa
Hi, I'm trying to run a garch model. and I want to use the predict function to predict ahead the conditional standard deviation. but when I run the predict function I get the same number of return as my data. How should I define the number of days looking ahead in garch predict? I really

Re: [R] rounding

2008-07-10 Thread Rolf Turner
On 11/07/2008, at 8:07 AM, Korn, Ed (NIH/NCI) [E] wrote: Hi, Round(0.55,1)=0.5 Round(2.55,1)=2.6 Can this be right? Yes. Rolf Turner ## Attention:\ This e-mail message is privileged and

Re: [R] shifting data in matrix by n rows

2008-07-10 Thread Gabor Grothendieck
See ?lag and in zoo ?lag.zoo. Both pages have examples. Using lag.zoo here it is with your data: Lines - Date Apples Oranges Pears 1/7 2 35 2/7 1 47 3/7 3 810 4/7 5 72 5/7 6 3

Re: [R] Interpretation of EXACT Statistical Test in finding the

2008-07-10 Thread Ted Harding
On 10-Jul-08 20:43:12, DaveFrisch wrote: Okay, so I'm fairly retarded, and asked a question about finding the T-Value in the Fisher Exact method. I suppose what I'm truly after can best be explained by the Biddle Consulting site that has a program setup to deal with this kind of thing.

[R] odfWeave problem in 7.1?

2008-07-10 Thread Jim Porzak
Max Friends, I've run into a problem with odfWeave 0.7.5 running under R 2.7.1 (Windows XP, SP2) doing some monthly production reports. Under 2.7.1 I'm getting various parsing errors after Sweaving starts, e.g.: Sweaving content.Rnw Writing to file content_1.xml Processing code chunks

Re: [R] shifting data in matrix by n rows

2008-07-10 Thread Gabor Grothendieck
Actually my last reply will drop one row since its pushed off to beyond the data range. You can avoid that with zooreg: # from before for comparison lag(z, -1, na.pad = TRUE) # pure shift - note use of zooreg here # Unlike lag.zoo, lag.zooreg can shift beyond data range zr - as.zooreg(z)

Re: [R] odfWeave problem in 7.1?

2008-07-10 Thread Jim Porzak
I just noticed that CRAN Package check Error for Windows Mac: http://www.r-project.org/nosvn/R.check/r-patched-windows-x86_64/odfWeave-00check.html -Jim On Thu, Jul 10, 2008 at 3:03 PM, Jim Porzak [EMAIL PROTECTED] wrote: Max Friends, I've run into a problem with odfWeave 0.7.5 running

Re: [R] layout is to xyplot as ??? is to qplot

2008-07-10 Thread hadley wickham
On Thu, Jul 10, 2008 at 3:28 PM, Jim Price [EMAIL PROTECTED] wrote: Playing with ggplot, something I'd promised myself I'd get around to. I've the following scenario: library(lattice) library(ggplot2) myData - data.frame( x = rnorm(100), y = rnorm(100), group = 1:4

Re: [R] Ellipsis arguments for plot.formula

2008-07-10 Thread Bert Gunter
I think it's rather presumptuous of you to ask whether a fundamental behavior that you don't understand in a mature software product that has been used by literally thousands of people for around 10 years (20 for S) is a bug, don't you? So the answer is, no, this is how R's evaluation mechanism

[R] princomp loading help

2008-07-10 Thread Wu, Hong-Sheng
Dear all, When I print out princomp's loading outputs, there is alwasy a section for SS loading, Proportional Var and Cumulative Var. Anybody can tell what they are for? Or anyone can direct me to some reference to read about? Any help will be highly appricated. Hongsheng

Re: [R] princomp loading help

2008-07-10 Thread Daniel Malter
Please provide a self-contained example with a post like this. I guess you mean the output of the last line below? It looks those are just the theoretical proportions if your data is perfectly orthogonal. I found those values invariant to changing the distributional parameters of the variables,

Re: [R] princomp loading help

2008-07-10 Thread Bert Gunter
u... ?princomp ** does give you references **. Did you not first check this before posting? -- Bert Gunter Genentech, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wu, Hong-Sheng Sent: Thursday, July 10, 2008 4:01 PM To: r-help@r-project.org

Re: [R] rounding

2008-07-10 Thread ctu
I got round(0.55,1) [1] 0.6 round(2.55,1) [1] 2.5 Your answers are also correct. Please check ?round Quoting Korn, Ed (NIH/NCI) [E] [EMAIL PROTECTED]: Hi, Round(0.55,1)=0.5 Round(2.55,1)=2.6 Can this be right? Thanks, Ed [[alternative HTML version deleted]]

Re: [R] search with help.start

2008-07-10 Thread Marc Schwartz
on 07/10/2008 01:39 PM Carlisle Thacker wrote: Search is not working after starting the help facility using the help.start function. The firefox browser says the applet has started, but nothing happens What to do to get it working? Versions of R, java, and firefox are shown below. Thanks,

Re: [R] rounding

2008-07-10 Thread Moshe Olshansky
The problem is that neither 0.55 nor 2.55 are exact machine numbers (the computer uses binary representation), so it may happen that the machine representation of 0.55 is slightly less than 0.55 while the machine representation of 2.55 is slightly above 2.55. --- On Fri, 11/7/08, Korn, Ed

[R] Problems with Package Installation.

2008-07-10 Thread hippie dream
I am having difficulty installing packages. For example, here I have tried to install gplots but to no avail. I have tried multiple mirrors and different packages (errbar) but after installation I seem to be unable to access any of the commands or help pages. I am a little concerned about the

Re: [R] rounding

2008-07-10 Thread Moshe Olshansky
Actually, your result is strange, since if x = 0.55 then a hexadecimal representation of x*100 is 404B8000 0001 which is above 55, meaning that x is above 0.55 and should have been rounded to 0.6, while if x = 2.55 then the hexadecimal representation of x*100 is 406FDFFF which is

Re: [R] Problems with Package Installation.

2008-07-10 Thread Erik Iverson
You must load the package with the library function after installing it. so: library(gplots) and then ?plotCI hippie dream wrote: I am having difficulty installing packages. For example, here I have tried to install gplots but to no avail. I have tried multiple mirrors and different

Re: [R] Problems with Package Installation.

2008-07-10 Thread Rolf Turner
On 11/07/2008, at 12:47 PM, hippie dream wrote: I am having difficulty installing packages. For example, here I have tried to install gplots but to no avail. snip install.packages() snip ** building package indices ... * DONE (gplots) The downloaded packages are

[R] number of effective tests

2008-07-10 Thread Georg Ehret
Dear R community, I am using 6 variables to test for an effect (by linear regression). These 6 variables are strongly correlated among each other and I would like to find out the number of independent test that I perform in this calcuation. For this I calculated a matrix of correlation

  1   2   >