[R] How to get the tuning parameter lamda in storey's qvalue package

2011-04-19 Thread Chee Chen
Dear All, In Storey's estimator of the proportion of true nulls, the estimator depends on the tuning parameter lamda. Suppose now that an estimator of this proportion has been obtained by the qvalue package, what is the lamda that corresponds to the estimate? How to get this lamda? Thanks, -Chee

[R] Rd file processing suggestion - % sign in examples

2011-04-19 Thread Peter Langfelder
Hi folks, I have come across a simple quirk that took me a long time to figure out. The gist is that if I write, in the example section of an Rd file, the line c = a %*% b what R will see when running the example is c = a since the % signs are apparently considered comment signs even in the

Re: [R] Where did my packages go ?

2011-04-19 Thread Andreas Borg
Hi Eric, I have the same issue in Windows. When I upgrade, I just copy all the packages I need from the 2.12 to the 2.13 library folder and run update.packages afterwards. However, be careful not to replace any of the existing packages with older versions, as this might break the

Re: [R] print.raw - but convert ASCII?

2011-04-19 Thread Duncan Murdoch
On 11-04-18 9:51 PM, Matt Shotwell wrote: Does anyone know if there is a simple way to print raw vectors, such that ASCII characters are printed for bytes in the ASCII range, and their hex representation otherwise? rawToChar doesn't work when we have something like c(0x00, 0x00, 0x44, 0x00).

Re: [R] Rd file processing suggestion - % sign in examples

2011-04-19 Thread Duncan Murdoch
On 11-04-19 2:26 AM, Peter Langfelder wrote: Hi folks, I have come across a simple quirk that took me a long time to figure out. The gist is that if I write, in the example section of an Rd file, the line c = a %*% b what R will see when running the example is c = a since the % signs

[R] Simple Missing cases Function

2011-04-19 Thread Tim Elwell-Sutton
Dear all I have written a function to perform a very simple but useful task which I do regularly. It is designed to show how many values are missing from each variable in a data.frame. In its current form it works but is slow because I have used several loops to achieve this simple task.

[R] Odp: Simple Missing cases Function

2011-04-19 Thread Petr PIKAL
Hi Hi try colSums(is.na(data.m)) It is not in data frame but you can easily transform it if you want. Regards Petr r-help-boun...@r-project.org napsal dne 19.04.2011 09:29:08: Dear all I have written a function to perform a very simple but useful task which I do regularly. It is

Re: [R] Simple Missing cases Function

2011-04-19 Thread Philipp Pagel
On Tue, Apr 19, 2011 at 03:29:08PM +0800, Tim Elwell-Sutton wrote: Dear all I have written a function to perform a very simple but useful task which I do regularly. It is designed to show how many values are missing from each variable in a data.frame. In its current form it works but is

Re: [R] Simple Missing cases Function

2011-04-19 Thread Philipp Pagel
On Tue, Apr 19, 2011 at 03:29:08PM +0800, Tim Elwell-Sutton wrote: Dear all I have written a function to perform a very simple but useful task which I do regularly. It is designed to show how many values are missing from each variable in a data.frame. In its current form it works but is

[R] Data frame with 3 columns to matrix

2011-04-19 Thread Michael Bach
Dear R Users, Lets assume I have this data frame: x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4 x and y columns are sorted and the values not necessarily integers. z values are not sorted. Now I would like to create a matrix out of this with x as first column values and y

Re: [R] Simple Missing cases Function

2011-04-19 Thread Tyler Rinker
I use the following code/function which gives me some quick descriptives about each variable (ie. n of missing values, % missing, case #'s missing, etc.): Fairly quick, maybe not pretty but effective on either single variables or entire data sets. NAhunter-function(dataset) {

[R] Plotting lines with equidistant points for identification

2011-04-19 Thread Timo Schneider
Dear R Gurus, I would like to make a line-plot of a large data-set (200 data-points) for a document which will be printed in black and white. The plot will contain 5 different lines. So i need a way to differentiate between the lines. Since color is not an option i tried different line styles

Re: [R] Simple Missing cases Function

2011-04-19 Thread Tim Elwell-Sutton
Dear Petr Thanks so much. That is a LOT more efficient. Tim -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Tuesday, April 19, 2011 3:37 PM To: tesutton Cc: r-help@r-project.org Subject: Odp: [R] Simple Missing cases Function Hi Hi try colSums(is.na(data.m))

Re: [R] Simple Missing cases Function

2011-04-19 Thread Tim Elwell-Sutton
Thanks Tyler This function has some useful features Tim From: Tyler Rinker [mailto:tyler_rin...@hotmail.com] Sent: Tuesday, April 19, 2011 3:52 PM To: tesutton; r-help@r-project.org Subject: RE: [R] Simple Missing cases Function I use the following code/function which gives me some

Re: [R] Plotting lines with equidistant points for identification

2011-04-19 Thread Jim Lemon
On 04/19/2011 06:05 PM, Timo Schneider wrote: Dear R Gurus, I would like to make a line-plot of a large data-set (200 data-points) for a document which will be printed in black and white. The plot will contain 5 different lines. So i need a way to differentiate between the lines. Since color is

Re: [R] How to Extract Information from SIMEX Output

2011-04-19 Thread Peter Ehlers
On 2011-04-18 17:52, Tom La Bone wrote: Below is a SIMEX object that was generated with the simex function from the simex package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$

Re: [R] Applying interpolation within a convex hull

2011-04-19 Thread sam.e
Thank Rolf, I am aware of the extrapolation possibilities within the interpolation packages within akima but this interpolation often leads to unrealistic results for my sedimentary units. Therefore I would like to be able to just apply the interpolation to the thickness measurements within the

[R] PDF help for linux

2011-04-19 Thread Feng Li
Dear R, Usually when I want to read pdf help for R functions under Linux, I do the following steps help(par,help_type=pdf) system(paste(getOption(pdfviewer),par.pdf)) which works well. First question, can I let help to save the pdf file to a different place other than current working

[R] Entire part of number

2011-04-19 Thread Barbara . Rogo
What is the function to have the entire part of a number? [[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

[R] zero fill empty cell in data.frame

2011-04-19 Thread Simone Gabbriellini
Hello List, I have a data frame like: V130V131V132V133V134V135V136 1 0 0 0.9 0 0.9 0 0 2 0 0 0 0 0

Re: [R] Entire part of number

2011-04-19 Thread Gerrit Eichner
What is the function to have the entire part of a number? If entire refers to integer take a look at ?trunc Hth -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212

Re: [R] Windows 7, update.packages problem: unable to move temporary installation?

2011-04-19 Thread Tal Galili
Just to update everyone, I found out the source of the problem: antivirus. The real time file system protection was blocking R from copying the files between folders once they were downloaded. Upon adding the R directory to the exception list, the problem went away :) (I updated my post with the

[R] Robustbase source question

2011-04-19 Thread kv
Dear All, in the sources of robustbase, there appears a function called rPsort() (say l253 of qn_sn.c). I could not find its source in the robustbase package and a google search yields too many unrelated response. Can anyone point to its source ? thanks, -- View this message in context:

Re: [R] Entire part of number

2011-04-19 Thread Rolf Turner
On 19/04/11 21:30, barbara.r...@uniroma1.it wrote: What is the function to have the entire part of a number? [[alternative HTML version deleted]] I'm not quite sure what you mean, but perhaps you want floor(). cheers, Rolf Turner

Re: [R] SQLDF syntax

2011-04-19 Thread Gabor Grothendieck
On Mon, Apr 18, 2011 at 6:34 PM, new2R bv_agr...@yahoo.co.in wrote: Hi, I am new to R and trying to migrate from SAS. I am trying to use sqldf to create a new table from existed table and change some of the columns. I have table called DataOld with columns commodity, rate and total and I am

Re: [R] zero fill empty cell in data.frame

2011-04-19 Thread Dimitris Rizopoulos
you could try something along these lines: DF - data.frame(V1 = c(0, 0.9, , 0.8, 0.1, 0), V2 = c(0.9, , 0.8, 0.7, , 1)) DF sapply(DF, function (x) as.numeric(gsub((^ +)|( +$), 0, x))) I hope it helps. Best, Dimitris On 4/19/2011 11:39 AM, Simone Gabbriellini wrote: Hello List,

Re: [R] Entire part of number

2011-04-19 Thread Ivan Calandra
By the way, is there any difference between trunc() and floor()? x - c(1.05, 1.95, 2.5, 3.51) trunc(x) [1] 1 1 2 3 floor(x) [1] 1 1 2 3 identical(trunc(x), floor(x)) Ivan Le 4/19/2011 11:46, Rolf Turner a écrit : On 19/04/11 21:30, barbara.r...@uniroma1.it wrote: What is the function to

Re: [R] zero fill empty cell in data.frame

2011-04-19 Thread Jim Lemon
On 04/19/2011 07:39 PM, Simone Gabbriellini wrote: Hello List, I have a data frame like: V130V131V132V133V134V135V136 1 0 0 0.9 0 0.9 0 0 2 0 0

[R] Error message in package:bayesSurv. Why?

2011-04-19 Thread David Foreman
Dear folks, I have been struggling to create what I fondly imagined would be a straightforward adaptation of the package's example to my own dataset, which looks at incidence of depression following the birth of initial and up to 3 subsequent children (4 children in all, with all subjects having

Re: [R] Entire part of number

2011-04-19 Thread Ted Harding
trunc(-1.5) # [1] -1 floor(-1.5) # [1] -2 Ted. On 19-Apr-11 09:57:43, Ivan Calandra wrote: By the way, is there any difference between trunc() and floor()? x - c(1.05, 1.95, 2.5, 3.51) trunc(x) [1] 1 1 2 3 floor(x) [1] 1 1 2 3 identical(trunc(x), floor(x)) Ivan Le

Re: [R] From nested loop to mclapply

2011-04-19 Thread Alaios
Dear Allan, thank you very much for your answer. If I got it right your idea is a: create first all the i,j combinations and then b. use mclapply (parallel version of lapply). so I wrote some draft and run three experiments: # code require('multicore') sr-matrix(data=NA,ncol=256,nrow=256)

Re: [R] Markov transition matrices , missing transitions for certain years

2011-04-19 Thread Rolf Turner
Make two assumptions: (1) The initial state probability distribution (``ispd'') is *NOT* a function of the transition probability matrix (``tpm''). (2) The boxes are stochastically independent of each other. Both of these assumptions may be dubious. The second assumption is the crucial

Re: [R] zero fill empty cell in data.frame

2011-04-19 Thread Rolf Turner
On 19/04/11 21:39, Simone Gabbriellini wrote: Hello List, I have a data frame like: V130V131V132V133V134V135V136 1 0 0 0.9 0 0.9 0 0 2 0 0 0

Re: [R] zero fill empty cell in data.frame

2011-04-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.04.2011 12:02:31: On 04/19/2011 07:39 PM, Simone Gabbriellini wrote: Hello List, I have a data frame like: V130 V131 V132 V133 V134 V135 V136 1 0 0 0.9 0 0.9 0 0 2 0 0 0

[R] Odp: Data frame with 3 columns to matrix

2011-04-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.04.2011 09:46:47: Dear R Users, Lets assume I have this data frame: x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4 x and y columns are sorted and the values not necessarily integers. z values are not sorted. Now I

[R] rownames in an apply function

2011-04-19 Thread santosh
Dear Group, I am doing an apply function on a zoo object. I need the rownames to be passed to the function. Any suggestions on how to accomplish this? Here is the code I am using tmp - structure(c(611.55, 611.55, 611.55, 611.55, 611.55, 520, 520, 520, 520, 520, 425, 425, 425, 432.2, 432.2, 337,

Re: [R] Data frame with 3 columns to matrix

2011-04-19 Thread David Winsemius
On Apr 19, 2011, at 3:46 AM, Michael Bach wrote: Dear R Users, Lets assume I have this data frame: x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4 x and y columns are sorted and the values not necessarily integers. z values are not sorted. Now I would like to create a

Re: [R] zero fill empty cell in data.frame

2011-04-19 Thread Kenn Konstabel
On Tue, Apr 19, 2011 at 1:45 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 19/04/11 21:39, Simone Gabbriellini wrote: Hello List, I have a data frame like:        V130    V131    V132    V133    V134    V135    V136 1       0               0               0.9             0 0.9          

Re: [R] rownames in an apply function

2011-04-19 Thread David Winsemius
On Apr 19, 2011, at 6:59 AM, santosh wrote: Dear Group, I am doing an apply function on a zoo object. I need the rownames to be passed to the function. Any suggestions on how to accomplish this? Here is the code I am using tmp - structure(c(611.55, 611.55, 611.55, 611.55, 611.55, 520, 520,

Re: [R] rownames in an apply function

2011-04-19 Thread santosh
Thanks David. Is there a way of explicitly passing the rowname since I need it in the function. On Apr 19, 4:19 pm, David Winsemius dwinsem...@comcast.net wrote: On Apr 19, 2011, at 6:59 AM, santosh wrote: Dear Group, I am doing an apply function on a zoo object. I need the

Re: [R] Define ylim in lattice plot based upon panel function output

2011-04-19 Thread Sébastien Bihorel
Dear Deepayan, Thank you for pointing out those functions. They will be helpful to me. If you don't mind, I may get back to you on that topic if I cannot find a way to apply them to my actual problem (the example I gave was just for illustration). This problem is more complex and involves

Re: [R] rownames in an apply function

2011-04-19 Thread Gabor Grothendieck
On Tue, Apr 19, 2011 at 6:59 AM, santosh santosh.srini...@gmail.com wrote: Dear Group, I am doing an apply function on a zoo object. I need the rownames to be passed to the function. Any suggestions on how to accomplish this? Here is the code I am using tmp - structure(c(611.55, 611.55,

[R] Several factors same levels

2011-04-19 Thread dereksloan
This is probably very simple but I'm new to R so apologies for being stupid. I have some data with No coded as 0 and yes coded as 1. e.g. id sex alcohol smoker 1 M 01 2 F 10 3 M 00 I realise I can covert the numerical variable back to a factor by

[R] combining n imputed dataset

2011-04-19 Thread wiplash
Hi, I'm using the library MICE to make multiple imputations. I'can pool the results to show how the predicted values fit, but how to combine the five imputed datasets? I take the mean? for exemple : x1-complete(imp) x2-complete(imp, 2) x3-complete(imp, 3) x4-complete(imp, 4) x5-complete(imp,

[R] Prediction interval with GAM?

2011-04-19 Thread yosuke kimura
Hello, Is it possible to estimate prediction interval using GAM? I looked through ?gam, ?predict.gam etc and the mgcv.pdf Simon Wood. I found it can calculate confidence interval but not clear if I can get it to calculate prediction interval. I read Inference for GAMs is difficult and somewhat

Re: [R] Entire part of number

2011-04-19 Thread Ivan Calandra
Nice example, I forgot about negative numbers... Thanks Ivan Le 4/19/2011 12:17, (Ted Harding) a écrit : trunc(-1.5) # [1] -1 floor(-1.5) # [1] -2 Ted. On 19-Apr-11 09:57:43, Ivan Calandra wrote: By the way, is there any difference between trunc() and floor()? x- c(1.05, 1.95,

[R] SPDEP Package, neighbours list for Moran's I on large grid dataset

2011-04-19 Thread Laurent Jégou
Hello list members, i'd like to calculate the Moran I on a large dataset, a 8640x3432 grid of values. When i try to create the neighbours list with the cell2nb function, on such a scale, R works for several hours and seems to crash. I'm using the last version (2.13), 64 bits, on a mac pro with

[R] RHmm, mixture of gaussians, memory could not be read error

2011-04-19 Thread Xirisx
Hi, I'm trying to fit a hidden Markov model (mixture of Gaussians) to stock prices (Open, High, Low, Close) data. Here's my code: #First download the data with package TTR library(TTR) n - 200 data - getYahooData(GOOG, strftime(as.POSIXlt(Sys.time() - n*24*3600),format=%Y%m%d)) keep -

Re: [R] rownames in an apply function

2011-04-19 Thread Santosh Srinivas
Thanks. On Tue, Apr 19, 2011 at 5:16 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Tue, Apr 19, 2011 at 6:59 AM, santosh santosh.srini...@gmail.com wrote: Dear Group, I am doing an apply function on a zoo object. I need the rownames to be passed to the function. Any suggestions

[R] factor analysis - constraints

2011-04-19 Thread Robert Ruser
Dear R Users, I'm wondering how is it possible to get |factor loadings| 1 in factor analysis model (factanal) performing maximum-likelihood estimation. Is it caused by some constraints? If so, what kind of constraints are placed and when (during the estimation or after)? Robert

Re: [R] Several factors same levels

2011-04-19 Thread Dimitris Rizopoulos
one way is the following: DF - data.frame(id = 1:6, sex = gl(2, 3, labels = c(M, F)), x = sample(0:1, 6, TRUE), y = sample(0:1, 6, TRUE), z = rnorm(6)) f - function (x) { if (all(unique(x) %in% 0:1)) factor(x, levels = 0:1, labels = c(No, Yes)) else x } DF[]

Re: [R] A question regarding RFreak

2011-04-19 Thread Uwe Ligges
On 18.04.2011 23:41, James Shaw wrote: I am using robreg.evol (part of the RFreak package) to fit models via least trimmed squares (LTS) regression and am encountering the following error message when attempting to access the coefficients: Error in fit1$coef : $ operator not defined for this

Re: [R] Several factors same levels

2011-04-19 Thread peter dalgaard
On Apr 19, 2011, at 10:57 , dereksloan wrote: This is probably very simple but I'm new to R so apologies for being stupid. I have some data with No coded as 0 and yes coded as 1. e.g. id sex alcohol smoker 1 M 01 2 F 10 3 M 00 I

Re: [R] Data frame with 3 columns to matrix

2011-04-19 Thread Michael Bach
David Winsemius dwinsem...@comcast.net writes: Perhaps but only if the third row of your example was incorrectly constructed: dta - rd.txt( x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4) #rd.txt() is a combo fn of read.table and textConnection mat - matrix(NA,

Re: [R] Which should I use? system.file() path.package() find.package()

2011-04-19 Thread Uwe Ligges
On 19.04.2011 05:19, Kevin Wright wrote: For a package that I am creating, I have some files in the inst directory. In the package man pages, I want to have R code that accesses these files. As of R-2.13.0, it looks like I can use any of: system.file() path.package() find.package() There

Re: [R] Error is assocplot

2011-04-19 Thread Uwe Ligges
On 14.04.2011 14:37, suparna mitra wrote: Hello, I have a contingency table showing relation between two datasets. I tried to see association among them with the assocplot, but it shows error. mosaicplot of the same data worked perfectly. Can anyone please help me. Perhaps, given you

Re: [R] Odp: Data frame with 3 columns to matrix

2011-04-19 Thread Michael Bach
Petr PIKAL petr.pi...@precheza.cz writes: Hi r-help-boun...@r-project.org napsal dne 19.04.2011 09:46:47: Dear R Users, Lets assume I have this data frame: x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4 x and y columns are sorted and the values not necessarily

Re: [R] Way OT: Anyone know where to get data on relationship between education and salary

2011-04-19 Thread Gene Leynes
This is an amazing website which would definitely have what you want, probably in many ways. *http://www.gapminder.org/* There are a wealth of data sources, and the GUI is very intuitive and interesting. I encourage you to view a few samples to get an idea of what you can do with the

Re: [R] factor analysis - constraints

2011-04-19 Thread peter dalgaard
On Apr 19, 2011, at 13:58 , Robert Ruser wrote: Dear R Users, I'm wondering how is it possible to get |factor loadings| 1 in factor analysis model (factanal) performing maximum-likelihood estimation. Is it caused by some constraints? If so, what kind of constraints are placed and when

Re: [R] Data frame with 3 columns to matrix

2011-04-19 Thread David Winsemius
On Apr 19, 2011, at 8:16 AM, Michael Bach wrote: David Winsemius dwinsem...@comcast.net writes: Perhaps but only if the third row of your example was incorrectly constructed: dta - rd.txt( x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1 4 1.06 9 0.4) #rd.txt() is a combo fn of read.table

Re: [R] Power Analysis

2011-04-19 Thread Schatzi
Inter ocular data Quite amusing :) Thank you for the help. For some reason I was thinking that I could get the n values for the combined test, but that doesn't make sense as there could be an infinite number of combinations of n values. Thanks again for the replies. -- View this message in

Re: [R] Odp: Data frame with 3 columns to matrix

2011-04-19 Thread Petr PIKAL
Hi Michael Bach pha...@gmail.com napsal dne 19.04.2011 14:21:13: Petr PIKAL petr.pi...@precheza.cz writes: Hi r-help-boun...@r-project.org napsal dne 19.04.2011 09:46:47: Dear R Users, Lets assume I have this data frame: x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04

Re: [R] How to get the tuning parameter lamda in storey's qvalue package

2011-04-19 Thread Uwe Ligges
Just load the package and type qvalue so you will see what the underlying R code is. You will find some parts of the code may be worth to be improved, hence time to contribute to the package. Uwe Ligges On 19.04.2011 07:53, Chee Chen wrote: Dear All, In Storey's estimator of the

Re: [R] print.raw - but convert ASCII?

2011-04-19 Thread Matt Shotwell
On Tue, 2011-04-19 at 03:14 -0400, Duncan Murdoch wrote: On 11-04-18 9:51 PM, Matt Shotwell wrote: Does anyone know if there is a simple way to print raw vectors, such that ASCII characters are printed for bytes in the ASCII range, and their hex representation otherwise? rawToChar doesn't

Re: [R] SQLDF syntax

2011-04-19 Thread new2R
Thank you very much. Its working. -- View this message in context: http://r.789695.n4.nabble.com/SQLDF-syntax-tp3458919p3460448.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] cut histogram

2011-04-19 Thread Santosh
Dear Rxperts, Below is a small sample of values (cut short due to space considerations while posting).. I was wondering if it is possible to construct boundaries (or intervals) based on the distribution of points. Is it anything similar to boundary detection of distributions? x1 -

[R] Prediction in gamlss package

2011-04-19 Thread IhorB
Hello! I've just build one-inflated beta regression model using package GAMLSS. It all worked very nicely but now I want to make prediction using it. I use typical function predict() give all necessary arguments (my new data is in data frame and all relevant columns have same names as before).

Re: [R] Power Analysis

2011-04-19 Thread Marc Schwartz
On Apr 19, 2011, at 8:43 AM, Schatzi wrote: Inter ocular data Quite amusing :) Thank you for the help. For some reason I was thinking that I could get the n values for the combined test, but that doesn't make sense as there could be an infinite number of combinations of n values. Thanks

Re: [R] cut histogram

2011-04-19 Thread David Winsemius
On Apr 19, 2011, at 10:32 AM, Santosh wrote: Dear Rxperts, Below is a small sample of values (cut short due to space considerations while posting).. I was wondering if it is possible to construct boundaries (or intervals) based on the distribution of points. Is it anything similar to

Re: [R] str() on a data frame with 600 variables

2011-04-19 Thread Greg Snow
An alternative that you may find interesting is the TkListView function in the TeachingDemos package. This opens a separate window and shows the list structure there with options for scrolling and expanding/collapsing sublists. You will probably need to be a little patient while the display

[R] Reducing dimension of a list object

2011-04-19 Thread Bogaso Christofer
Hi all, I generally use the Reduce() function to reduce the dimension of list object. However in my current session I have few objects which are actually list of list of list..(say n step). If I reduce their dimension then I have call Reduce() function many times. Therefore my question is, is

Re: [R] Reducing dimension of a list object

2011-04-19 Thread Ivan Calandra
Hi, Would unlist() do what you want? unlist(lis3) [1] 4 1 8 HTH, Ivan Le 4/19/2011 17:32, Bogaso Christofer a écrit : Hi all, I generally use the Reduce() function to reduce the dimension of list object. However in my current session I have few objects which are actually list of list of

Re: [R] Data frame with 3 columns to matrix

2011-04-19 Thread Michael Bach
David Winsemius dwinsem...@comcast.net writes: On Apr 19, 2011, at 8:16 AM, Michael Bach wrote: David Winsemius dwinsem...@comcast.net writes: Perhaps but only if the third row of your example was incorrectly constructed: dta - rd.txt( x y z 1 1.00 5 0.5 2 1.02 5 0.7 3 1.04 7 0.1

Re: [R] Prediction interval with GAM?

2011-04-19 Thread Simon Wood
Is it possible to estimate prediction interval using GAM? I looked through ?gam, - The easiest and most general way is by posterior simulation. Here's an example... ## Prediction interval example for Gamma GAM library(mgcv) ## simulate some data... f - function(x) (0.2 * x^11 * (10 * (1

Re: [R] Matching Problem: Want to match to data.frame with inexact matching identifier (one identifier has to be in the range of the other).

2011-04-19 Thread Christoph Jäckel
Hi together, I found a solution to my problem that works for me and performs reasonable well in my opinion. Instead of looping through both datasets, I decided to replicate each row in d2 from Min_Month to Max_Month and then use the match-function. Here is the code (I changed the original example

Re: [R] Robustbase source question

2011-04-19 Thread Peter Ehlers
On 2011-04-19 02:45, kv wrote: Dear All, in the sources of robustbase, there appears a function called rPsort() (say l253 of qn_sn.c). I could not find its source in the robustbase package and a google search yields too many unrelated response. Can anyone point to its source ? It's not in

Re: [R] A question regarding RFreak

2011-04-19 Thread James Shaw
Dr. Ligges: Thank you for the prompt reply. I am sorry that I did not include my code. I submitted my post as I was running to a meeting and did not have time to provide more detail. Given the information you provided, I was able to access the coefficient vector. -- Jim 2011/4/19 Uwe Ligges

[R] How to program with colleagues

2011-04-19 Thread Alaios
Dear all, my colleagues and I have to write some R code for some of our projects. I would like to ask you help to organize us a little. a. Do you know if there is any system that can convert our R scripts to html pages with some nice dependency graphs (which functions calls which). b. Could you

Re: [R] How to program with colleagues

2011-04-19 Thread Seeliger . Curt
Alex writes: Dear all, ... a. Do you know if there is any system that can convert our R scripts to html pages with some nice dependency graphs (which functions calls which). b. Could you please suggest me an easy way to exchange the R code with my colleagues. I know about these version

Re: [R] How to program with colleagues

2011-04-19 Thread Barry Rowlingson
On Tue, Apr 19, 2011 at 6:20 PM, Alaios ala...@yahoo.com wrote: b. Could you please suggest me an easy way to exchange the R code with my colleagues. I know about these version systems but unfortunately they look pretty bizarre to me. Nothing looks more bizarre than a project that isn't

Re: [R] How to program with colleagues

2011-04-19 Thread Smith, Dale
a. Check out Roxygen. b. Use version control. You will not regret it. Thanks, Dale Smith, Ph.D. Senior Financial Quantitative Analyst Risk Compliance Fiserv. 107 Technology Park Norcross, GA 30092 Direct NYC: 212-419-3242 Mail: dale.sm...@fiserv.com www.fiserv.com -Original Message-

Re: [R] Markov transition matrices , missing transitions for certain years

2011-04-19 Thread Chris Stubben
To keep the table dimensions the same, try changing the columns to factors... boxes$y97-factor(boxes$y97, 1:4) boxes$y98-factor(boxes$y98, 1:4) boxes$y99-factor(boxes$y99, 1:4) ... table(boxes$y98, boxes$y97) 1 2 3 4 1 1 0 1 0 2 0 0 0 0 3 0 0 0 0 4 1 0 0 1 table(boxes$y99,

[R] Axes Alignment Problem for Multiple Plots

2011-04-19 Thread Barbaglia, Guido (ESA)
Dear all, I'm trying to plot, in the same window, two different series, using barplot() for the first one and plot() for the second. What happens is that the second chart has a different axes origin, therefore the final plot is wrong. This piece of code shows the differences between the

Re: [R] simple user input

2011-04-19 Thread Greg Snow
If you don't need the web browser part then look at the tkexamp function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org

Re: [R] Axes Alignment Problem for Multiple Plots

2011-04-19 Thread John Kane
What is Coredata(Z0)? It would be very useful. as the posting guidelines suggest to supply working code and sample data. --- On Tue, 4/19/11, Barbaglia, Guido (ESA) guido.barbag...@fao.org wrote: From: Barbaglia, Guido (ESA) guido.barbag...@fao.org Subject: [R] Axes Alignment Problem for

Re: [R] Robustbase source question

2011-04-19 Thread kv
Thank you very much Peter, Best, -- View this message in context: http://r.789695.n4.nabble.com/Robustbase-source-question-tp3459966p3461263.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Subsetting a data frame by dropping correlated variables

2011-04-19 Thread Rita Carreira
Hello R Users! I have a data frame that has many variables, some with missing observations, and some that are correlated with each other. I would like to subset the data by dropping one of the variables that is correlated with another variable that I will keep int he data frame. Alternatively,

[R] A small problem with PDF manuals

2011-04-19 Thread apjaworski
Hello, I am not sure if I have done something wrong or something changed between 12.2.2 and 2.13.0, but I just installed R-2.13.0 from CRAN install executable on 64 bit Windows 7 Pro and when I try HelpManuals (in PDF)An Introduction to R I get the following Error: 'doc\manual\R-intro.pdf'

Re: [R] A small problem with PDF manuals

2011-04-19 Thread Duncan Murdoch
On 19/04/2011 3:14 PM, apjawor...@mmm.com wrote: Hello, I am not sure if I have done something wrong or something changed between 12.2.2 and 2.13.0, but I just installed R-2.13.0 from CRAN install executable on 64 bit Windows 7 Pro and when I try HelpManuals (in PDF)An Introduction to R I get

[R] problem reading csv file

2011-04-19 Thread Petr Pikal
Dear all I have several files which claim to be *.csv (one attached, maybe it will come through) . They can be read to Open Office without much problem, however I can not read them into R. I tried read.table(H2O.CSV, sep=,, dec=.) V1 1 ˙ţ1 2 3 read.table(H2O.CSV, sep=,, dec=., skip=1) Error

[R] Simple question

2011-04-19 Thread Steven Wolf
I am trying to convert a string to a vector, and I'm stuck! Suppose you have a string of numbers (string) that you want to convert to a vector (vec). I am able to split the string turning it into a list by using strsplit, but this makes a list, which I can't seem to access the way that I'd

[R] cr.setup predict with se.fit

2011-04-19 Thread apeer
Hello, I've recently started using the rms package to fit some continuation ratio models using cr.setup. The package runs beautifully and I'm getting good fits with my data, however, I'm having trouble getting plots of the predicted mean values of y in relation to predictor variables with

Re: [R] splom, plotmath: how to add three lines of information with alignment?

2011-04-19 Thread Marius Hofert
Dear guys, I'm almost there... how can I fix the final problems? Cheers, Marius PS: the info function is the one I will then try to call within splom... library(lattice) library(gridExtra) ## trial 1 info - function(a,b){ grid.table(as.expression(substitute(expression(alpha==alph,

Re: [R] Simple question

2011-04-19 Thread David Winsemius
On Apr 19, 2011, at 3:19 PM, Steven Wolf wrote: I am trying to convert a string to a vector, and I'm stuck! Suppose you have a string of numbers (string) that you want to convert to a vector (vec). I am able to split the string turning it into a list by using strsplit, but this makes a

[R] doSMP package works better than perfect, at least sometimes.

2011-04-19 Thread Seeliger . Curt
Some might have noticed that REvolution Computing released the doSMP package to the general public about a month and a half ago, which allows multiple cores to be accessed for parallel computation in R. Some of our physical habitat calculations were taking an extraordinary amount of time to

Re: [R] problem reading csv file

2011-04-19 Thread Uwe Ligges
On 19.04.2011 20:47, Petr Pikal wrote: Dear all I have several files which claim to be *.csv (one attached, maybe it will come through). Can you provide the file on some webspace or send it to me privately, I will take a look tomorrow then. Uwe Ligges They can be read to Open Office

Re: [R] problem reading csv file

2011-04-19 Thread David Winsemius
Not attached. You might succeed if you rename the file with a .txt extension and re-post. Almost surely an encoding issue. We may need your session Info to get locale. -- David On Apr 19, 2011, at 2:47 PM, Petr Pikal wrote: Dear all I have several files which claim to be *.csv (one

Re: [R] Way OT: Anyone know where to get data on relationship between education and salary

2011-04-19 Thread Thomas Lumley
I'm sorry for the way OT post, but here goes.  I'm an informatics specialist, and R user.  My wife is a secondary school maths teacher. The first place to look for this sort of information in the US is the Statistical Abstract of the United States [which is, sadly, scheduled to be a victim of

Re: [R] Axes Alignment Problem for Multiple Plots

2011-04-19 Thread mat
Ok, I can replicate your problem, with following code: dat - 1:10 barplot(dat, beside=TRUE,ylim=c(0,100)); par()$usr; par(new=T); plot(dat, ylim=c(0,100), type=l); par()$usr; So it looks like even if you specify yourself ylim, the resulting effective ylim (usr[3:4] ) will be

Re: [R] splom, plotmath: how to add three lines of information with alignment?

2011-04-19 Thread baptiste auguie
Hi, This is always a challenge with expressions vs calls, etc. grid.table expects an input that can be coerced into a matrix of unevaluated expressions. This seems to work, info - function(a,b){ grid.table(c(bquote(alpha==.(a)), bquote(beta==.(b))), parse=TRUE, # parse labels as

  1   2   >