Re: [R] what does this err mean and how to solve it? Error in file(file, ifelse(append, a, w))

2010-10-07 Thread Prof Brian Ripley
On Wed, 6 Oct 2010, Peter Langfelder wrote: you should close files that you do not use anymore. the maximum number of open files is likely 4000 or so. Use close(file) before you open the next one. He/she said he did that, and as the limit on open connections is 128, that cannot be the sole

[R] Odp: Vector replace 0 elements without using a loop

2010-10-07 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 07.10.2010 07:16:01: Hi, With a vector like: x = c (22, 23, 22.5, 0,0,24, 0, 23.2, 23.5, 0,0,0, 26) How can I replace the 0's with the previous last value without looping through the vector ? Change your zeroes to NA values x[x==0]-NA

Re: [R] Quantile question

2010-10-07 Thread Henrik Bengtsson
Alternatively, see rowQuantiles() in the matrixStats package. /Henrik On Wed, Oct 6, 2010 at 10:34 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi, This should do it, for details, see ?apply a - matrix(rnorm(1),100,100) t(apply(a, 1, quantile, probs = c(.3, .5))) Basically you

Re: [R] Linear Integration

2010-10-07 Thread alaios
No, because I thought something that might be easier. If you see the image again you might notice that the proportions I am looking for might also be found by using the hypotenuse which is the same (as all squares are triangles) by finding the adjacent. The adjacent are easier to be found by

Re: [R] what is the NOT IN operator

2010-10-07 Thread Ivan Calandra
Hi, I've just seen yesterday on ?plotmath the operator %notin%. This could also work I guess. Ivan Le 10/7/2010 07:41, bill.venab...@csiro.au a écrit : Try !(group %in% C(A, ...)) A slightly cuter way is to define your own operator. `%ni%`- Negate(`%in%`) letters[1:3] %ni% letters[3:5]

Re: [R] Linear Integration

2010-10-07 Thread Michael Bedward
Um... if that makes sense for the analysis that you're trying to do then that's great. I had assumed that you were using the term integral in its usual sense, ie. area under the curve. Michael On 7 October 2010 18:52, alaios ala...@yahoo.com wrote: No, because I thought something that might be

[R] Problem Fixed

2010-10-07 Thread ogbos okike
Hey Duncan, Thank so much for the site. Quite helpful. Containing everything and informing me that raster has got no older version. I have also installed the new R version and I am fine. Regards Ogbos On 5 October 2010 15:11, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 05/10/2010 9:00 AM,

[R] filter data.frame

2010-10-07 Thread behave
hi all, how do I filter a dataframe. What I am looking for is something like: data-data.frame(matrix(c(2,2,1,2,2,2,2,2,3),byrow=TRUE,ncol=3)) subset(data, subset=(X3==3 X2==2 X1==2)) thanks -- View this message in context:

Re: [R] tapply output

2010-10-07 Thread Peter Ehlers
On 2010-10-06 13:24, Erik Iverson wrote: Hello, You can use ddply from the very useful plyr package to do this. There must be a way using base R functions, but plyr is worth looking into in my opinion. install.packages(plyr) library(plyr) ddply(myData, .(class, group, name),

Re: [R] filter data.frame

2010-10-07 Thread Ivan Calandra
Hi, Try this: subset(data, subset=(X3==3 X2==2 X1==2)) X1 X2 X3 3 2 2 3 First, you have numerical values, so don't quote them. Second, take a look at ? to understand the difference between and . HTH, Ivan Le 10/7/2010 10:43, behave a écrit : hi all, how do I filter a dataframe.

[R] Rserve config

2010-10-07 Thread Joel
Dont know if this is the right forum for this but here we go. Trying to figure out where I should put the Rserv.conf file in windows, anyone have any idea? //Joel -- View this message in context: http://r.789695.n4.nabble.com/Rserve-config-tp2966394p2966394.html Sent from the R help mailing

Re: [R] filter data.frame

2010-10-07 Thread behave
Thanks, works perfectly -- View this message in context: http://r.789695.n4.nabble.com/filter-data-frame-tp2966377p2966398.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] hclust with method = “ward”

2010-10-07 Thread Christian Hennig
On Wed, 6 Oct 2010, PeterB wrote: Thanks, Christian. This is really helpful. I was not aware of that equality, but now I can see it. I think you mean the inner sum over all distances in the distance matrix (for that cluster), which means that each distance is counted twice (which is why we

[R] debugging

2010-10-07 Thread Maas James Dr (MED)
I'm attempting to learn how to use the debug function to find the values of some variables. I've found a couple of documents describing the basics and they show examples that the debugger returns Browse[1] but for some reason when I follow the examples I get Browse[2] What is the 2

Re: [R] what is the NOT IN operator

2010-10-07 Thread Duncan Murdoch
On 07/10/2010 4:10 AM, Ivan Calandra wrote: Hi, I've just seen yesterday on ?plotmath the operator %notin%. This could also work I guess. No, that's just a way to encode the symbol for not an element of. It's not actually an operator that works outside of plotmath (though you could make

Re: [R] debugging

2010-10-07 Thread Duncan Murdoch
On 07/10/2010 6:09 AM, Maas James Dr (MED) wrote: I'm attempting to learn how to use the debug function to find the values of some variables. I've found a couple of documents describing the basics and they show examples that the debugger returns Browse[1] but for some reason when I follow

[R] quantile regression

2010-10-07 Thread Julia Lira
Dear all, I am a new user in r and I am facing some problems with the quantile regression specification. I have two matrix (mresultb and mresultx) with nrow=1000 and ncol=nsim, where I specify (let's say) nsim=10. Hence, the columns in my matrix represents each simulation of a determined

[R] text/mtext axis labels on graphs

2010-10-07 Thread Martin Hughes
Hello everyone I have problem with axis labels on graphs, I have my code as below: plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main=Stratigraphic Range,xlab=Time Bins,ylab=Taxa,cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt=n) text(1:(length(strat_name)), y= 0, adj=1,

[R] Linux 64-bit R installation problem - Failed dependencies

2010-10-07 Thread noclue_
I am trying to install 64 bit R on Linux. But I got the following error - rpm -i R-core-2.10.0-2.fc11.x86_64.rpm warning: R-core-2.10.0-2.fc11.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 97d3544e error: Failed dependencies: /bin/bash is needed by R-core-2.10.0-2.fc11.x86_64

[R] R: rulefit error on Linux

2010-10-07 Thread noclue_
R version 2.8.1 (2008-12-22) on Linux 64-bit I am trying to run 'rulefit' function (Rule based Learning Ensembles). but I got the following error - rulefit(x,y) Warning: This program is an suid-root program or is being run by the root user. The full text of the error or warning message cannot

Re: [R] text/mtext axis labels on graphs

2010-10-07 Thread Jim Lemon
On 10/07/2010 09:29 PM, Martin Hughes wrote: Hello everyone I have problem with axis labels on graphs, I have my code as below: plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main=Stratigraphic Range,xlab=Time Bins,ylab=Taxa,cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt=n)

[R] Embed R in Eclipse

2010-10-07 Thread Philipp Nagy
Hi, We are a group of student working on a Java project on a Windows System. For our project, we need to embed R into Java. We have read about Rserve, but the single threaded JRI would be enough for our system. Actually we were able to install rJava in R through install.packages(rJava), but

Re: [R] quantile regression

2010-10-07 Thread Julia Lira
The problem is that I can see a matrix with the coefficients, but not with the coefficients of all the simulations. look at the codes now: set.seed(180185) nsim - 10 mresultx - matrix(-99, nrow=1000, ncol=nsim) mresultb - matrix(-99, nrow=1000, ncol=nsim) for (i in 1:nsim){ # make a

Re: [R] quantile regression

2010-10-07 Thread Martyn Byng
Hi, Your code is of the form for (i in 1:nsim) { ## Do something that generates variable qf05 M - coeff(qf05) } This means that you are overwriting the variable M at each iteration and so when the loop has finished you only have the coefficients from the last simulation. There are lots of

Re: [R] quantile regression

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 6:40 AM, Julia Lira wrote: Dear all, I am a new user in r and I am facing some problems with the quantile regression specification. I have two matrix (mresultb and mresultx) with nrow=1000 and ncol=nsim, where I specify (let's say) nsim=10. Hence, the columns in my

Re: [R] quantile regression

2010-10-07 Thread Michael Bedward
Hi Julia, In addition to Martyn's answer and David's friendly post I'd just add that it's not a good idea to call a variable c since the function of that name is so often used in R. Michael On 7 October 2010 22:28, Martyn Byng martyn.b...@nag.co.uk wrote: Hi, Your code is of the form for

[R] first post and bootstarpping problems

2010-10-07 Thread paulidealiste
Hello to all R users, I use R for a year now and am dealing with geometric morphometrics of deer skulls. Yes, I am a biologist and my math skills are just beginning to brush up. To cut to the chase... I have two groups in my data (males and females) and my data is in a simple vector

[R] Create 2d table with mean of entries

2010-10-07 Thread sugimoto
Hi, I have the following problem: I have a list of entries with vehicles going from some places to others and the time that they need. e.g. Vehicle Start End Time 1A B5 2A C4 3A C3 4B A6 5B

Re: [R] quantile regression

2010-10-07 Thread Julia Lira
Thank you all for the explanation! Best, Julia Date: Thu, 7 Oct 2010 22:37:32 +1100 Subject: Re: [R] quantile regression From: michael.bedw...@gmail.com To: martyn.b...@nag.co.uk CC: julia.l...@hotmail.co.uk; r-help@r-project.org Hi Julia, In addition to Martyn's answer and

[R] X11 is not available

2010-10-07 Thread ogbos okike
Dear All, I have just installed a new version of R (Version R-2.11.0) and did install other packages such as raster with ease. However, I could not start the plotting device x11(). I remembered that somewhere at the stage of installation, an error occurred : 'configure: error: --with-x=yes

Re: [R] tapply output

2010-10-07 Thread jim holtman
You can also use sqldf: require(sqldf) sqldf(select class, `group`, name, avg(height) + from myData + group by class, 'group', name) class group name avg(height) 1 0 B Jane58.5 2 0 A Tom62.5 3 1 A Enzo66.5 4 1 B Mary

Re: [R] first post and bootstarpping problems

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 7:39 AM, paulideali...@aol.com wrote: Hello to all R users, I use R for a year now and am dealing with geometric morphometrics of deer skulls. Yes, I am a biologist and my math skills are just beginning to brush up. To cut to the chase... I have two groups in my

Re: [R] Create 2d table with mean of entries

2010-10-07 Thread Henrique Dallazuanna
Try this: with(DF, tapply(Time, list(Start, End), mean)) On Thu, Oct 7, 2010 at 8:40 AM, sugimoto iey...@sugimoto.at wrote: Hi, I have the following problem: I have a list of entries with vehicles going from some places to others and the time that they need. e.g. Vehicle Start End Time

[R] Longitudinal multivariate data analysis

2010-10-07 Thread abderrahim youssef
Dear all, I am looking for an R package that fits multivariate gaussian or non-gaussian longitudinal outcomes. I am especially interested to non-gaussian outcomes since the outcomes I've got are discrete (some are binomial and some are count data). Many thanks in advance, Abderrahim

Re: [R] X11 is not available: Problem Fixed

2010-10-07 Thread ogbos okike
Hey, Just decided to install the latest version of R and the device is supported. Thanks Ogbos On 7 October 2010 13:49, ogbos okike ogbos.ok...@gmail.com wrote: Dear All, I have just installed a new version of R (Version R-2.11.0) and did install other packages such as raster with ease.

Re: [R] Linux 64-bit R installation problem - Failed dependencies

2010-10-07 Thread Marc Schwartz
On Oct 7, 2010, at 3:50 AM, noclue_ wrote: I am trying to install 64 bit R on Linux. But I got the following error - rpm -i R-core-2.10.0-2.fc11.x86_64.rpm warning: R-core-2.10.0-2.fc11.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 97d3544e error: Failed dependencies:

Re: [R] is there a way to avoid traveling grid?

2010-10-07 Thread ONKELINX, Thierry
Dimitri, 1. The grid will always be on the background. You can use geom_vline() and geom_hline() to draw horizontal and vertical lines at the positions that you want them. 2. Note that you must 'stack' the data yourself. Geom_area() just plots a polygon with 0 as one of the boundaries. When

[R] file.info returning NA

2010-10-07 Thread Erich Neuwirth
Windows 7, R-2.11.1 and R-2.12.0beta When I do file.info(list.files(getwd())) I get what I expect, a dataframe with a lot of variables, especially isdir, which tells me if the named object is a file or a directory. In the result of file.info(list.files(paste(R.home(),library,sep=/))) all

Re: [R] Longitudinal multivariate data analysis

2010-10-07 Thread Marc Schwartz
On Oct 7, 2010, at 6:48 AM, abderrahim youssef wrote: Dear all, I am looking for an R package that fits multivariate gaussian or non-gaussian longitudinal outcomes. I am especially interested to non-gaussian outcomes since the outcomes I've got are discrete (some are binomial and some are

Re: [R] file.info returning NA

2010-10-07 Thread Henrique Dallazuanna
Try with full.names = TRUE argument in list.files: file.info(list.files(paste(R.home(),library,sep=/), full.names = TRUE)) On Thu, Oct 7, 2010 at 9:37 AM, Erich Neuwirth erich.neuwi...@univie.ac.atwrote: Windows 7, R-2.11.1 and R-2.12.0beta When I do file.info(list.files(getwd())) I get

Re: [R] file.info returning NA

2010-10-07 Thread Duncan Murdoch
On 07/10/2010 8:37 AM, Erich Neuwirth wrote: Windows 7, R-2.11.1 and R-2.12.0beta When I do file.info(list.files(getwd())) I get what I expect, a dataframe with a lot of variables, especially isdir, which tells me if the named object is a file or a directory. In the result of

[R] Lattice: Histogram in splom diagonals

2010-10-07 Thread Alejo C.S.
Dear list, I want to plot several variables with splom and in the main diagonal, instead of the variable names, I'd like to plot an histogram of corresponding variables. Searching I did not find the correct syntax, only some tips in an old post in the list, but this comments help to plot only

Re: [R] X11 is not available

2010-10-07 Thread Ista Zahn
HI, It's not clear to me exactly what you did. On Thu, Oct 7, 2010 at 7:49 AM, ogbos okike ogbos.ok...@gmail.com wrote: Dear All, I have just installed a new version of R (Version R-2.11.0) and did install other packages such as raster with ease. However, I could not start the plotting device

Re: [R] X11 is not available

2010-10-07 Thread ogbos okike
Hey Ista, I am just learning a bit of installation. Trying my hands on various things I see on the web. Some proved helpful whereas I am not sure of others. I didn't compile R from source. Just downloaded R-2.10.0 and tried to install. The error message I referred to was there when I did

[R] packaging my function

2010-10-07 Thread Mipam Bruining
Dear all, I write to you because there seems to be something I'm just not 'getting' in the way R lets you construct a new package. Google and this mailing list's archive don't seem to have the answer to my specific case so I signed up and mailed the question myself. So I've written this function

Re: [R] Lattice: Histogram in splom diagonals

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 9:04 AM, Alejo C.S. wrote: Dear list, I want to plot several variables with splom and in the main diagonal, instead of the variable names, I'd like to plot an histogram of corresponding variables. Searching I did not find the correct syntax, only some tips in an old

[R] Truncating leading zeros in strings

2010-10-07 Thread E. Paul Wileyto
I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent integers, and I want to convert them to integer values. Strtoi works well, except when there are leading zeros on the string. Could

[R] how to convert list to language object

2010-10-07 Thread lord12
If I have a list: list = c(~garch(1,1), ~arma(1,1)) and I run typeof(list[1]), the output is a list object. But I want each element in the list to be a language object. How do I transform these list objects to language objects? -- View this message in context:

Re: [R] packaging my function

2010-10-07 Thread Duncan Murdoch
On 07/10/2010 10:06 AM, Mipam Bruining wrote: Dear all, I write to you because there seems to be something I'm just not 'getting' in the way R lets you construct a new package. Google and this mailing list's archive don't seem to have the answer to my specific case so I signed up and mailed

Re: [R] how to convert list to language object

2010-10-07 Thread Henrique Dallazuanna
obj - c(~garch(1,1), ~arma(1,1)) typeof(obj[[1]]) Use doble '[' indeed of '[' On Thu, Oct 7, 2010 at 10:50 AM, lord12 trexi...@yahoo.com wrote: If I have a list: list = c(~garch(1,1), ~arma(1,1)) and I run typeof(list[1]), the output is a list object. But I want each element in the list

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 9:57 AM, E. Paul Wileyto wrote: I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent integers, and I want to convert them to integer values. Strtoi works well, except

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread Martyn Byng
Hi, Think I might be misunderstanding what you want, because ... t = 123 as.integer(t) [1] 123 anyway t = 123 substr(t,regexpr([^0],t),nchar(t)) [1] 123 seems to trim the leading 0's Martyn -Original Message- From: r-help-boun...@r-project.org

[R] auto.arima fit error

2010-10-07 Thread Vangani, Ruchi
I am trying to use auto.arima to fit a univariate time series and do forecast. This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year. data Data1; input RR; datalines; 12 14 17 15 13 15 15 14 15 14 16 15 15 18 16 16 15 14 15

[R] Tinn-R and DDE

2010-10-07 Thread Al.x
Hi folks, I'm trying to get these call-tip things to work in Tinn-R. I expect them to be somewhat like Microsoft's Intellisense? Anyways, I copy-pasted the recommended Rprofile.site and adjusted it to fit the location of my Tinn-R.exe... It looks like this:

Re: [R] Looking for a book/tutorial with the following context:

2010-10-07 Thread alaios
I would like to thank you for spending your time to reply to my post. So far I checked the links provided. What is still missing is to find some information how local and global variables work in R. Do you know any link for that? (checked the book but from the table of contents is not clear if

Re: [R] Lattice: Histogram in splom diagonals

2010-10-07 Thread Alejo C.S.
Dear David, it works just perfect. Thanks a lot for the help Sincerely, Alejo 2010/10/7 David Winsemius dwinsem...@comcast.net On Oct 7, 2010, at 9:04 AM, Alejo C.S. wrote: Dear list, I want to plot several variables with splom and in the main diagonal, instead of the variable names,

[R] auto.arima error

2010-10-07 Thread Vangani, Ruchi
I am trying to use auto.arima to fit a univariate time series and do forecast. This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year. data Data1; input RR; datalines; 12 14 17 15 13 15 15 14 15 14 16 15 15 18 16 16 15 14 15

Re: [R] Looking for a book/tutorial with the following context:

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 11:00 AM, alaios wrote: I would like to thank you for spending your time to reply to my post. So far I checked the links provided. What is still missing is to find some information how local and global variables work in R. Do you know any link for that? (checked the book

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread E. Paul Wileyto
Thanks... As I mentioned, I am new to R, and as.integer was not what I stumbled onto. I looked up string conversion in the reference manual, and strtoi is what came up. P On 10/7/2010 10:35 AM, David Winsemius wrote: On Oct 7, 2010, at 9:57 AM, E. Paul Wileyto wrote: I am new to R. I

Re: [R] How to run own R functions in JRI

2010-10-07 Thread lord12
So I copy and pasted my function to the R startup file. However, in my function, I change directories. When I run the function in Eclipse, I get a message in the console, Cannot change working directory. Why is this? -- View this message in context:

Re: [R] subtraction based on two groups in a dataframe

2010-10-07 Thread 1Rnwb
Hi The reshape suggestions works great on my previous data, but I am unable to make is work on the new dataset. It actually works but only gives me the output of single row, instead of 96 rows. The dataset has two control groups control 1 and control 2, two disease groups viz disease 1 and

[R] using a package function inside another function

2010-10-07 Thread Alison Callahan
Hello all, I am trying to use the micEcon 'insertRow' function inside a function I have written. For example: insert_row_test - function(m){ insertRow(m,nrow(m)+1,v=0,rName=test) } However, when I try to call the 'insert_row_test' function (after loading the micEcon package), it does not

[R] aggregate text column by a few rows

2010-10-07 Thread Tan, Richard
Hi, R function aggregate can only take summary stats functions, can I aggregate text columns? For example, for the dataframe below, a - rbind(data.frame(id=1, name='Tom', hobby='fishing'),data.frame(id=1, name='Tom', hobby='reading'),data.frame(id=2, name='Mary',

[R] venneuler() - customize a few things.

2010-10-07 Thread Karl Brand
Esteemed UseRs and DevelopeRs, Just coming to terms with the very attractive proportional venn gernator, venneuler(), but would like to customize a few things. Is it possible to- -suppress all circle labels? -suppress only certain circle labels? -print specific text strings at specified

Re: [R] aggregate text column by a few rows

2010-10-07 Thread jim holtman
try this using sqldf: a id name hobby 1 1 Tom fishing 2 1 Tom reading 3 2 Mary reading 4 3 John boating 5 2 Mary running require(sqldf) sqldf('select name, group_concat(hobby) hobby from a group by id', method='raw') name hobby 1 Tom fishing,reading 2 Mary

Re: [R] using a package function inside another function

2010-10-07 Thread Andrew Miles
Try adding a statement at the beginning of your function: require(micEcon) See if that helps. Andrew Miles Department of Sociology Duke University On Oct 7, 2010, at 11:47 AM, Alison Callahan wrote: Hello all, I am trying to use the micEcon 'insertRow' function inside a function I have

Re: [R] using a package function inside another function

2010-10-07 Thread Ethan Brown
Hi Alison, By default, a function in R creates a copy of the variable that you pass into it. insertRow() looks to be unusual in that it actually changes the variable you pass into the function. So if you run your insert_row_test(x), the function will create a copy of x, insert a row into it

Re: [R] Counting unique items in a list of matrices

2010-10-07 Thread Jim Silverton
Hello, I gave a list of 2 x 2 matrices called matlist. I have about 5000 2 x 2 matrices. I would like to count how many of each 2 x 2 unique matrix I have. So I am thinking that I need a list of the unique 2 x 2 matrices and their counts. Can anyone help. -- Thanks, Jim. [[alternative

Re: [R] Odp: Vector replace 0 elements without using a loop

2010-10-07 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Petr PIKAL Sent: Thursday, October 07, 2010 12:13 AM To: rivercode Cc: r-help@r-project.org Subject: [R] Odp: Vector replace 0 elements without using a loop Hi

Re: [R] aggregate text column by a few rows

2010-10-07 Thread David Winsemius
Or: data.frame( hobs= tapply(a$hobby, list( a$name), c)) hobs Tom fishing, reading Mary reading, running John boating Note Jim's gives you the names as columns while this has them as rownames. Further differences : my version has the column as lists whereas Jim's

Re: [R] How to run own R functions in JRI

2010-10-07 Thread jcress410
I guess the best answer to your question depends on the specifics of the implementation, but, i think if I were in your situation and I wanted to be able to call a function foo found in file foo.R every time a user clicked a button, i'd just source(path to foo.R) which just parses the

[R] Lottery with Data Frame Rows

2010-10-07 Thread Rodrigo Aluizio
Hi List. I've to perform a sequence of conditional sampling without repetition from a very simple data frame. It contains the samples and people names (which picked the sample). Something like this (but much more longer): Sample Picker 4ME1B2 B Ana 4ME1C1 B Ana 4ME1D2 C Ana

Re: [R] Counting unique items in a list of matrices

2010-10-07 Thread jcress410
I may or may not have the most elegant solution to this problem, but if it were me, I would probably put them all in a list and then unique_matrix_list - unique(list_of_matrix) # number of unique matricies: length(unique_matrix_list) # count the number of each matrix, for (m in

[R] How do I set the dispersion parameter in poisson glm?

2010-10-07 Thread Huso, Manuela
Dear R users, I would like to fit a glm with Poisson distribution and log link with a known dispersion parameter. I do not want to estimate the dispersion parameter. I know what it is, so I simply want to fix it at a constant for this and other models to follow. My simple, no covariate

Re: [R] How do I set the dispersion parameter in poisson glm?

2010-10-07 Thread Achim Zeileis
On Thu, 7 Oct 2010, Huso, Manuela wrote: Dear R users, I would like to fit a glm with Poisson distribution and log link with a known dispersion parameter. I do not want to estimate the dispersion parameter. I know what it is, so I simply want to fix it at a constant for this and other

Re: [R] R: Tools for thinking about data analysis and graphics

2010-10-07 Thread Greg Snow
I think that R/S's biggest advantage is in the ways you can store data. It does not force you to fit your data to a single spreadsheet like table, but rather encourages you to think about your data and find the correct way to store it. Lists and objects are a great advantage for keeping

[R] reshape from wide to long, ordering of varying

2010-10-07 Thread stefan.d...@gmail.com
Hello, I have data in the following form age sex Int.Prev.Est.1 Int.Prev.Est.2 Int.Prev.Est.3 Int.Prev.Est.4 Int.Prev.Est.5 93110 93 0 23.75482 57.86592 9.755003 4.343534 4.280714 93610 93 1 53.36475 39.47247 4.381618 1.622119 1.159044

Re: [R] aggregate text column by a few rows

2010-10-07 Thread Henrique Dallazuanna
Try this: aggregate(hobby ~ id + name, a, FUN = toString) On Thu, Oct 7, 2010 at 12:52 PM, Tan, Richard r...@panagora.com wrote: Hi, R function aggregate can only take summary stats functions, can I aggregate text columns? For example, for the dataframe below, a -

Re: [R] text/mtext axis labels on graphs

2010-10-07 Thread Greg Snow
For your specific question, Jim's answer of staxlab is the best, but for general placing of text or other graphics elements relative to figure, plot, or device look at the grconvertX and grconvertY functions. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

[R] RE : RE : R getting slower until it breaks...

2010-10-07 Thread Bastien Ferland-Raymond
Actually, I rechecked the paging and thought about it more, and realized the windows was French and therefore, the , was the decimal separator and not the thousand separator. So the paging was staying around 6 (not 6000) most of the time and hitting the 100 other times. It looks a little bit

Re: [R] aggregate text column by a few rows

2010-10-07 Thread Phil Spector
Richard - Yes, you certainly can use aggregate to acheive what you want: aggregate(a$hobby,a['name'],paste,collapse=' ') name x 1 Tom fishing reading 2 Mary reading running 3 John boating - Phil Spector

Re: [R] venneuler() - customize a few things.

2010-10-07 Thread Ista Zahn
Hi Kari, On Thu, Oct 7, 2010 at 12:05 PM, Karl Brand k.br...@erasmusmc.nl wrote: Esteemed UseRs and DevelopeRs, Just coming to terms with the very attractive proportional venn gernator, venneuler(), but would like to customize a few things. Is it possible to- Say v is a VennDiagram:

Re: [R] aggregate text column by a few rows

2010-10-07 Thread Tan, Richard
Thank you! Richard -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, October 07, 2010 12:08 PM To: Tan, Richard Cc: r-help@r-project.org Subject: Re: [R] aggregate text column by a few rows try this using sqldf: a id name hobby 1 1 Tom fishing 2

[R] FDR

2010-10-07 Thread will . eagle
Dear R users, I am wondering about the following results: p.adjust(c(0.05,0.05,0.05),fdr) [1] 0.05 0.05 0.05 p.adjust(c(0.05,0.04,0.03),fdr) [1] 0.05 0.05 0.05 Why does p.adjust(..., fdr) not adjust p-values, if they are constant? Does somebody have an explanation or can point to a reference?

[R] Need help for loop code, thanks

2010-10-07 Thread wangguojie2006
Dear fellows, I've been working this problem for a day and still can't see where the problem is. I really appreciate if anyone can help me out. My data is like: V1V2 v3 1 a 1.3 1 a 1.5 1 b 2.0 1 a 2.3 1 a 3.4 1 c 5.5 1

Re: [R] How to run own R functions in JRI

2010-10-07 Thread lord12
Nevermind about the previous post. However, I in the retest sample code, I can run my own function in the command line. But, say I am creating a GUI and I want the user to enter the model parameters. How do I, within the java code, explicity call my unique function without going to the console?

[R] R - Confidence Intervals

2010-10-07 Thread Christian Goelz
Dear Sirs, I was hoping you can help me, I am quite desperate in finding a solution for my problem! I have looked everywhere on the net and tried hundreds of codes, but I am still not anywhere close to the solution. I am quite new to R, so please excuse if this seems simple: I am trying to

Re: [R] reshape from wide to long, ordering of varying

2010-10-07 Thread Henrique Dallazuanna
Try this: reshape(UK.INT, direction = 'long', varying = list(grep(Int.Prev.Est, names(UK.INT On Thu, Oct 7, 2010 at 2:05 PM, stefan.d...@gmail.com stefan.d...@gmail.com wrote: Hello, I have data in the following form age sex Int.Prev.Est.1 Int.Prev.Est.2 Int.Prev.Est.3

Re: [R] reshape from wide to long, ordering of varying

2010-10-07 Thread Gabor Grothendieck
On Thu, Oct 7, 2010 at 1:05 PM, stefan.d...@gmail.com stefan.d...@gmail.com wrote: Hello, I have data in the following form      age sex Int.Prev.Est.1 Int.Prev.Est.2 Int.Prev.Est.3 Int.Prev.Est.4 Int.Prev.Est.5 93110  93   0       23.75482       57.86592       9.755003 4.343534      

Re: [R] Does R have function/package works similar to SAS's 'PROC REG'?

2010-10-07 Thread CZ
Hi, Josh, What we are doing is, we have a microarray data set with 2000 genes and roughly 60 samples split 2:1 cancer:normal. So we essentially have one binary response and 2000 continuous predictors. We want to use this to develop an ensemble-based classifier method in which the members of

Re: [R] FDR

2010-10-07 Thread Jeremy Miles
This is correct. Wikipedia is not bad, and provides some references. Another web page: http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm Jeremy On 7 October 2010 10:37, will.ea...@gmx.net wrote:

[R] problem with colors

2010-10-07 Thread ANJAN PURKAYASTHA
Hi, I have a data set of 47 columns. I would like to create a boxplot for each column, each boxplot of a different colour. So I created a vector col1. This vector has a subset of the colors returned by color()- red, cyan, green etc. Now I use the command: boxplot(dataset, col= col1) expecting to

Re: [R] Computing a Mantel-Haenszel chi-square using a continuous variable as the matching criterion

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 2:21 PM, Barth B. Riley wrote: Dear list I would like to compute a Mantel-Haenszel chi-square in which the matching variable is a continuous variable. The MH chi-square is used to assess the relationship between two categorical variables at each level or strata

Re: [R] problem with colors

2010-10-07 Thread Phil Spector
Anjan - I think you'll need to give us more information -- I can't reproduce the problem. For example, dat = data.frame(matrix(rnorm(47000),100,47)) cols = sample(colors(),47) boxplot(dat,col=cols) doesn't repeat any of the colors in cols. -

Re: [R] How do I set the dispersion parameter in poisson glm?

2010-10-07 Thread Huso, Manuela
Thank you so much for your reply, Z. Of course, you are correct about the overdispersion not affecting parameter estimation. But my goal is comparison of several models using QAIC and the dispersion parameter enters the QAIC calculation. I suppose I could calculate the QAIC of all models

[R] confusion matrix

2010-10-07 Thread Gregory Ryslik
Hi Everyone, In follow up to my previous question, I wrote some code that correctly makes a confusion matrix as I need it. However, it only works when the numbers are between 1 and n. If the possible outcomes are between 0 and n, then I can't reference row 0 of the matrix and the code breaks.

Re: [R] R - Confidence Intervals

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 12:01 PM, Christian Goelz wrote: Dear Sirs, I was hoping you can help me, I am quite desperate in finding a solution for my problem! I have looked everywhere on the net and tried hundreds of codes, but I am still not anywhere close to the solution. I am quite new to R, so

Re: [R] How do I set the dispersion parameter in poisson glm?

2010-10-07 Thread Ben Bolker
Huso, Manuela manuela.huso at oregonstate.edu writes: Thank you so much for your reply, Z. Of course, you are correct about the overdispersion not affecting parameter estimation. But my goal is comparison of several models using QAIC and the dispersion parameter enters the QAIC

Re: [R] Need help for loop code, thanks

2010-10-07 Thread Peter Ehlers
On 2010-10-07 12:09, Phil Spector wrote: Is this what you're looking for? dat = read.table(textConnection('V1V2 v3 + 1 a 1.3 + 1 a 1.5 + 1 b 2.0 + 1 a 2.3 + 1 a 3.4 + 1 c 5.5 + 1 d 6.0 + 1 a 7.0 +

Re: [R] R - Confidence Intervals

2010-10-07 Thread Christian Goelz
Dear David, Thank you for your prompt response. I understand that this may seem like an simple problem to you, but I have never done this before, so please excuse the mistakes along the line! May I revise the code according to your suggestion and, should I have further problems, ask you for

  1   2   >