[R] AMOVA in R

2010-11-24 Thread Michael Double
Hi, I'd like to conduct an amova in R from diploid genotpyic data. The packages pegas and ade4 require a Euclidian distance matrix. Is there a simple method to generate a dist object from genotypic data at the individual level? I think the dist.genet of ade4 only generates distances at the

Re: [R] Filled contour plot showing labeled isolines?

2010-11-24 Thread Jon Tang
Thanks for your reply. My data is a 2D matrix of values: A0.1 A0.2 A0.3 A0.4 A0.5 A0.6 A0.7 A0.8 A0.9 A1.0 P0.1 0.00 0.07 0.07 0.07 0.15 0.11 0.28 0.32 0.62 0.94 P0.2 0.01 0.00 0.04 0.05 0.04 0.04 0.07 0.13 0.32 0.69 P0.3 0.01 0.00 0.00 0.02 0.00 0.04 0.02 0.05 0.08 0.50 P0.4 0.00 0.00 0.00

[R] Difficulty loading packages into R version 2.12.0

2010-11-24 Thread john moran
Apologies for my previous effort in HTML which apparently was scrubbed Dear R-users I wonder if I could get advice on the above problem I have just installed V 2.12.0 (I chose only the 32-bit version) into a new directory (C:/R) on a 64bit Windows 7 machine sessionInfo() R version 2.12.0

[R] how to make R overlook string character

2010-11-24 Thread mariaseg
I am really new to R and would appreciate some help to sort out a problem with data extraction from a large file. I have entered the following command to filter data from a large data set called upanddown such that those records in upanddown corresponding to blockType=3'UTR are transferred to a

[R] lme with time series

2010-11-24 Thread María José Sorrondegui
Hi: I'm trying to fit a linear mixed effect model to two time series. My data base has 3 columns, number of observation, y, and x. Both y and x are market and specific asset return (both measured on a daily basis for the last 3 years). I want to explain y in terms of x. Response=y

[R] Problems with implementing gwr when categorical variables are included

2010-11-24 Thread sisi1
Hi guyz I have problems running the gwr when I include the categorical/nominal variables with 2 to 3 levels. Could it be that gwr does not cater for such variables? I tried indicating that these variables are factors but this is not helping. Firstly, the cross-validation bandwidth (using

Re: [R] Wilcoxon Rank Sum in R with a multiple testing correction

2010-11-24 Thread Mark Difford
Hi Selthy, I'd like to use a Wilcoxon Rank Sum test to compare two populations of values. Further, I'd like to do this simultaneously for 114 sets of values. Well, you read your data set into R using: ## ?read.table ?read.csv There are other ways to bring in data. Save the import to a

Re: [R] Error: cannot allocate vector of size x Gb (64-bit ... yet again)

2010-11-24 Thread Prof Brian Ripley
On Tue, 23 Nov 2010, derek eder wrote: Hello, I am facing the dreaded Error: cannot allocate vector of size x Gb and don't understand enough about R (or operating system) memory management to diagnose and solve the problem -- despite studying previous posts and relevant R help -- e.g.:

Re: [R] Factor analysis and cfa with asymptotically distributed data

2010-11-24 Thread Mark Difford
Jane, Does someone know how to do fa and cfa with strong skewed data? Your best option might be to use a robustly estimated covariance matrix as input (see packages robust/robustbase). Or you could turn to packages FAiR or lavaan (maybe also OpenMx). Or you could try soft modelling via

[R] Print to the cmd line in a script

2010-11-24 Thread Joel
Hi Ive written a script that loopes throu some data, but what I want to do is to print to the cmd line how many times it has looped to the cmd line. And as it is just a counter from 1 this should be quite easy :P but ive tried things like print(counter) and so on but it dossent print anything to

Re: [R] Print to the cmd line in a function

2010-11-24 Thread Joel
I do mean function not script, edit it in the forum but for the mailinglist here you have it. -- View this message in context: http://r.789695.n4.nabble.com/Print-to-the-cmd-line-in-a-function-tp3057009p3057025.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Print to the cmd line in a script

2010-11-24 Thread Michael Bedward
Is this what you want ? printCount - function(N) { for (i in 1:N) { cat(i, \n) } } Depending on your platform, output from the print function may not appear until after your function has finished. You can try using flush.console() to give it a nudge... printCount - function(N) { for

Re: [R] how to make R overlook string character

2010-11-24 Thread Henrique Dallazuanna
Try this: new-sqldf(select * from upanddown where blockType IN(\3'ext\) ) On Wed, Nov 24, 2010 at 2:24 AM, mariaseg maria...@qut.edu.au wrote: I am really new to R and would appreciate some help to sort out a problem with data extraction from a large file. I have entered the following

[R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Richard Vlasimsky
Does anyone have any performance tuning tips when working with datasets that are extremely wide (e.g. 20,000 columns)? In particular, I am trying to perform a merge like below: merged_data - merge(data1, data2, by.x=date,by.y=date,all=TRUE,sort=TRUE); This statement takes about 8 hours to

Re: [R] problem with parameters

2010-11-24 Thread alkalinetrio
Ok, I try to explain better... I have to create a 21x21 matrix with numbers and a parameter (for example I have to put p and 1-p somewhere in the matrix). I know how to write a matrix with all numbers, but if I put the parameter inside, it says that it can't recognize the value p. What should

[R] Running R from SAS

2010-11-24 Thread Ziad.Elmously
Hello All, I am interested in running an R program with several random seeds. One approach is to launch the program from SAS. The recommended approach is to use the X command as shown below: OPTIONS XWAIT XSYNC; X r.exe --no-save --quiet c:\temp\r\program.r c:\temp\r\program.log; However,

[R] heatmap/clustering/corelation/sameorder

2010-11-24 Thread Stuart
Hi I am trying to make heatmaps first based of QTLs profile only and then I want to cluster them based on Column only!!! Expression QTLs heat map heatmap.2(expression.qtl,Rowv=F,dendrogram=column,trace=none, distfun = function(c) as.dist(1 - c), density.info=none, trace=none, cexRow = .65,

Re: [R] shifting down ylab in a plot

2010-11-24 Thread statquant2
I found it is mgp -- View this message in context: http://r.789695.n4.nabble.com/shifting-down-ylab-in-a-plot-tp3057071p3057075.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] shifting down ylab in a plot

2010-11-24 Thread statquant2
Hi guys, I am trying to shift down the ylab of my plot but can't find how to do it. I tried to tune mar but it enable more room for the labels to be displayed but it does not move to ylab as I would like. Is there a way with par to shift down my ylab ?? Cheers -- View this message in context:

Re: [R] shifting down ylab in a plot

2010-11-24 Thread statquant2
No in fact this is not working as all main,xlab,ylab are shited if mgp is changed Any help ? -- View this message in context: http://r.789695.n4.nabble.com/shifting-down-ylab-in-a-plot-tp3057071p3057081.html Sent from the R help mailing list archive at Nabble.com.

[R] Need help

2010-11-24 Thread Thileepan Sekaran
Hi, I have a affymetrix data and i have performed the Normalize the data also,Now I want to find the density plot for that data set.Pls do help me regards Thileepan [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Claudia Beleites
Dear Richard, Does anyone have any performance tuning tips when working with datasets that are extremely wide (e.g. 20,000 columns)? The obvious one is: use matrices – and take care that they don't get converted back to data.frames. In particular, I am trying to perform a merge like below:

Re: [R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Mike Marchywka
Date: Wed, 24 Nov 2010 13:23:32 +0100 From: cbelei...@units.it To: r-help@r-project.org Subject: Re: [R] Performance tuning tips when working with wide datasets Dear Richard, Does anyone have any performance tuning tips when working with

Re: [R] discriminant function analysis

2010-11-24 Thread Gavin Simpson
On Tue, 2010-11-16 at 12:01 -0500, Mike Gibson wrote: My objective is to look at differences in two species of fish from morphometric measurements. My morphometric measurements are head length, eye diameter, snout length, and measurements from tail to each fin. I want to use discrimanant

Re: [R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Prof Brian Ripley
On Wed, 24 Nov 2010, Richard Vlasimsky wrote: Does anyone have any performance tuning tips when working with datasets that are extremely wide (e.g. 20,000 columns)? Don't use data frames. In particular, I am trying to perform a merge like below: merged_data - merge(data1, data2,

Re: [R] Total inertia in package Vegan?

2010-11-24 Thread Gavin Simpson
On Wed, 2010-11-17 at 13:23 +0100, Hedberg Peter wrote: Dear all at the R-project help list. I have run into a problem when it comes to getting values for total inertia and R-squared for my DCA using decorana in the package vegan. I have tried the goodness function, but the reply indicates

[R] Getting user input without hitting enter

2010-11-24 Thread Kohleth Chia
Hi, I am writing a function which requires user to enter a single character. Something like: hello-function(){ input-scan(n=1,what=a) if(input==h)cat(Hello) # What goes after the 'if' is completely arbitrary, for simplicity sake I simply put a cat command here. } I want R to

Re: [R] About upgrade R

2010-11-24 Thread Gavin Simpson
On Sun, 2010-11-14 at 21:14 -0800, Stephen Liu wrote: Hi Josh and all, I think .Rprofile is something you have to create yourself No, it is a file on Linux OS No, it isn't! It doesn't mysteriously appear on any system. You create it to personalise certain aspects of your use of R and

Re: [R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Gabor Grothendieck
On Wed, Nov 24, 2010 at 6:51 AM, Richard Vlasimsky richard.vlasim...@imidex.com wrote: Does anyone have any performance tuning tips when working with datasets that are extremely wide (e.g. 20,000 columns)? In particular, I am trying to perform a merge like below: merged_data - merge(data1,

Re: [R] Sub-setting a data frame by partial column names?

2010-11-24 Thread barah
Hi Sarah, Thanks a lot for the suggestion. It is working for me. subsetData- bigData[,grep(partialName, colnames(bigData))] But if i want to extract multiple columns along with the columns with similar names, how do i that? Say the others column have similar values for all the columns with

Re: [R] shifting down ylab in a plot

2010-11-24 Thread Philipp Pagel
I am trying to shift down the ylab of my plot but can't find how to do it. I tried to tune mar but it enable more room for the labels to be displayed but it does not move to ylab as I would like. Is there a way with par to shift down my ylab ?? There may be a simpler/more elegant way to do

Re: [R] RCurl and cookies in POST requests

2010-11-24 Thread Christian M.
Hi Duncan. Duncan Temple Lang (Sunday 21 November 2010, 16:23): [...] There is a new version of the RCurl package on the Omegahat repository and that handles this case. [...] I just downloaded the new RCurl version (1.5-0.1, for Windows) from:

Re: [R] Filled contour plot showing labeled isolines?

2010-11-24 Thread David Winsemius
On Nov 24, 2010, at 1:48 AM, Jon Tang wrote: Thanks for your reply. My data is a 2D matrix of values: A0.1 A0.2 A0.3 A0.4 A0.5 A0.6 A0.7 A0.8 A0.9 A1.0 P0.1 0.00 0.07 0.07 0.07 0.15 0.11 0.28 0.32 0.62 0.94 P0.2 0.01 0.00 0.04 0.05 0.04 0.04 0.07 0.13 0.32 0.69 P0.3 0.01 0.00 0.00 0.02

Re: [R] Sub-setting a data frame by partial column names?

2010-11-24 Thread Ivan Calandra
Hi, I haven't followed, but I think you want something like: subsetData- bigData[ , c(Colname1, Colname2, grep(partialName, colnames(bigData)))] HTH, Ivan Le 11/24/2010 13:51, barah a écrit : Hi Sarah, Thanks a lot for the suggestion. It is working for me. subsetData-

Re: [R] Need help

2010-11-24 Thread Ben Bolker
Thileepan Sekaran thileepan.sekaran at googlemail.com writes: I have a affymetrix data and i have performed the Normalize the data also,Now I want to find the density plot for that data set.Pls do help me Please (a) post this question to the Bioconductor list, where it will be

[R] The nls2 function automatically prints the object!

2010-11-24 Thread Ivan Allaman
Good morning gentlemen! When I use the function nls2, and store it in an object, that object is automatically printed, without the summary or to draw the object. For example. model - nls2 (...) Number of iterations to convergence: ... Achieved convergence tolerance: ... Nonlinear regression

Re: [R] Population abundance, change point

2010-11-24 Thread Gavin Simpson
On Wed, 2010-11-17 at 09:17 -0500, Jonathan P Daily wrote: Indeed I have looked into various non-standard changepoint analysis methods. I figured the OP was more interested in traditional methods since you have to spend less time justifying your methodology. Wavelets are one potential

Re: [R] question about constraint minimization

2010-11-24 Thread dhacade...@gmail.com
Hi Hans, I really appreciate your help and the detailed reply. Many thanks and have a nice Thanks giving! Best, Hao On Tue, Nov 23, 2010 at 11:46 AM, Hans W Borchers [via R] ml-node+3055782-1866096000-202...@n4.nabble.comml-node%2b3055782-1866096000-202...@n4.nabble.com wrote: dhacademic

[R] nonparametric covariance analysis

2010-11-24 Thread Daniela Recchia
Hi there, I want to do a nonparametric covariance analysis and I have tried to use the package sm function sm.ancova but it didn't work for me because I have more then one covariates (I have 18 covariates and 3 factors). I want to analyse for one factor (who has 13 levels) where the

[R] R encoding question

2010-11-24 Thread Xiaobo Gu
Hi, I am using RpgSQL to retrieve data from a PostgreSQL database wich is with encoding UTF8, and I have some Chinese character in one of the columns, unfortunately R can't show it correctly. df - dbGetQuery(con, select * from test) df ab 1 1 椤惧��娉\xa2 2 2 瑕�� EURO\xa1 I see

Re: [R] Tobit model on unbalanced panel

2010-11-24 Thread Terry Therneau
For tobit regression, also see the last example of help(survreg) in the survival package. Terry Therneau __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Conditional Operation in Matrix

2010-11-24 Thread Romildo Martins
Hello, I would like to perform the operation a - b, only for the non-zero values. Thanks a lot! RMB a 0 0 0 0 4 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b

Re: [R] problem with parameters

2010-11-24 Thread Joshua Wiley
Well since you said that it cannot recognize the value of 'p', this suggests that you have not defined that object. Here is an example of what you might be trying to do (you can just copy and paste the code into R): ## create x matrix of 0s x - matrix(0,

Re: [R] Conditional Operation in Matrix

2010-11-24 Thread Ivan Calandra
Hi, Would that work for you? d - a-b d[a==0 | b==0] - 0 The output is as the one expected HTH, Ivan Le 11/24/2010 15:54, Romildo Martins a écrit : Hello, I would like to perform the operation a - b, only for the non-zero values. Thanks a lot! RMB a 0 0 0 0 4 0 0 0 0 0 0 0

[R] looking for the RMySQL package for R 2.12.0 under XP

2010-11-24 Thread PtitBleu
Hello, I convinced our new Ph student to work with R and I managed to convince the guy in charge of the computer networks to install R 2.12.0 (we haven't the admin rights). I wanted to install on his computer the same packages I use (but I have R 2.11) and especially RMySQL. Problem : there is

[R] Error in solve.default(V, W) with ProDenICA and the required sample size for stable result

2010-11-24 Thread Randel
Hi ALL, Recently I confronted with a error in using package ProDenICA, when let kp (exactly the example code with k=1, http://finzi.psych.upenn.edu/R/library/ProDenICA/html/ProDenICA.html), Error in solve.default(V, W) : 'b' must be compatible with 'a' I have examined the code of function

Re: [R] looking for the RMySQL package for R 2.12.0 under XP

2010-11-24 Thread Henrique Dallazuanna
You need compile it from source code. On Wed, Nov 24, 2010 at 1:48 PM, PtitBleu ptit_b...@yahoo.fr wrote: Hello, I convinced our new Ph student to work with R and I managed to convince the guy in charge of the computer networks to install R 2.12.0 (we haven't the admin rights). I wanted

Re: [R] Population abundance, change point

2010-11-24 Thread Jonathan P Daily
I agree that SiZer is not the ultimate answer to all changepoint analysis, but that is why there are so many changepoint detection methods used. I will clarify, though, that my understanding of SiZer (which may be wrong) was that the smoothing splines are just a vessel for finding the

[R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Santosh Srinivas
Hello Group, I have the following options and future data in zoo objects head(optData.z) ExpDt OptTyp Strike TrdPrice TotTrdQty 2009-01-01 09:55:03 20090129 1 2900 180.50 2009-01-01 09:55:31 20090129 1 2900 188.50 2009-01-01 09:55:37

[R] Haver connectivity progress and issues

2010-11-24 Thread amit jain
Dear All, I have been trying to connect to haver to download data and have made some good progress. I am stuck at a point and would appreciate your help. Haver provides a dll called DLXAPI32 using which i can connect to excel/vb/c etc. Now i tried calling it from R and used following code:

Re: [R] looking for the RMySQL package for R 2.12.0 under XP

2010-11-24 Thread Spencer Graves
Hello: That package needs to be compiled from source on the computer you are using. Instructions for doing so can be found at http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL;. I'm not sure of all the issues, but I believe it needs to be configured to the specific version of

Re: [R] How to start default browser on R

2010-11-24 Thread Gavin Simpson
On Mon, 2010-11-22 at 23:31 -0800, Stephen Liu wrote: Hi David, I see. File: gives the full path to the .html file created/download. Then the browser will open that file. Thanks. I don't have hwriter package installed. A side question, what will be the corresponding command on R

Re: [R] Performance tuning tips when working with wide datasets

2010-11-24 Thread Matthew Dowle
Richard, Try data.table. See the introduction vignette and the presentations e.g. there is a slide showing a join to 183,000,000 observations of daily stock prices in 0.002 seconds. data.table has fast rolling joins (i.e. fast last observation carried forward) too. I see you asked about that on

Re: [R] Population abundance, change point

2010-11-24 Thread Mike Marchywka
To: gavin.simp...@ucl.ac.uk CC: carus...@gmail.com; marchy...@hotmail.com; r-help@r-project.org; r-help-boun...@r-project.org Subject: Re: [R] Population abundance, change point From: jda...@usgs.gov Date: Wed, 24 Nov 2010 10:59:17 -0500 I

Re: [R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Matthew Dowle
Try data.table with the roll=TRUE argument. Set your keys and then write : futData[optData,roll=TRUE] That is fast and as you can see, short. Works on many millions and even billions of rows in R. Matthew http://datatable.r-forge.r-project.org/ Santosh Srinivas

[R] negative binomial regression, unbalanced panel

2010-11-24 Thread hl
I am a student who is doing empirical work for his thesis and trying to switch to R. I am familiar with Stata, and at the moment I am trying to replicate some of my previous work. I have a large unbalanced panel data set, observations for different countries between 1970 and 2007. My

Re: [R] cross validation using e1071:SVM

2010-11-24 Thread Neeti
thank you so much for your help. if i am not wrong then createDataPartition can be used to create stratified random splits of a data set. is there other way to do that? Thank you -- View this message in context:

[R] adding blocks to arrays

2010-11-24 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
I have a four-dimensional array. I have a three-dimensional array I want to add to it. My particular problem is conceptually very simple because the new array is just going to go into the end of the 4D array; i.e. will be added into the final index. I think I have seen an R command that can do

Re: [R] Population abundance, change point

2010-11-24 Thread Gavin Simpson
On Wed, 2010-11-24 at 10:59 -0500, Jonathan P Daily wrote: I agree that SiZer is not the ultimate answer to all changepoint analysis, but that is why there are so many changepoint detection methods used. I will clarify, though, that my understanding of SiZer (which may be wrong) was that

[R] diverting output from nested loops

2010-11-24 Thread Lara Poplarski
Dear List, I have a series of nested loops with the structure shown below, and I am struggling to figure out how to divert output to folders created with dir.create() within the loops. What I need is for the output to end up as topNameK/subNameL/objNameM.pdf; what I get instead is a series of

[R] Cannot update R

2010-11-24 Thread alon.benari
Hello I cannot update the package rjags. Although I am a su. Running openSUSE R version : language R version.string R version 2.12.0 Under development (unstable)

Re: [R] Running R from SAS

2010-11-24 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of ziad.elmou...@tnsglobal.com Sent: Wednesday, November 24, 2010 3:27 AM To: r-help@r-project.org Subject: [R] Running R from SAS Hello All, I am interested in running an R

Re: [R] The nls2 function automatically prints the object!

2010-11-24 Thread Henrique Dallazuanna
Ivan, Try this: invisible(capture.outuput( model - nls2 (...) )) On Wed, Nov 24, 2010 at 12:07 PM, Ivan Allaman ivanala...@yahoo.com.brwrote: Good morning gentlemen! When I use the function nls2, and store it in an object, that object is automatically printed, without the summary or to

Re: [R] Population abundance, change point

2010-11-24 Thread Jonathan P Daily
I understand that smoothing splines produce continuous models, however the end product of SiZer is not a single model that is then used in any predictive manner. Rather, the end product is a map of potential changepoint locations along a gradient. Are you suggesting that SiZer would not find a

Re: [R] Cannot update R

2010-11-24 Thread Phil Spector
I believe R is complaining that it can't find the jags library. You can find out about it here: http://www-fis.iarc.fr/~martyn/software/jags/ There appear to be rpms available. - Phil Spector Statistical

Re: [R] the first. from SAS in R

2010-11-24 Thread David Katz
Often the purpose of first/last in sas is to facilitate grouping of observations in a sequential algorithm. This purpose is better served in R by using vectorized methods like those in package plyr. Also, note that first/last has different meanings in the context of by x; versus by x notsorted;.

[R] Aligning Grid Lines with Date Ticks in Trellis Plot

2010-11-24 Thread Elliot Joel Bernstein
I know this issue has been discussed before, but I hoped the advent of pretty.Date would resolve it. In the following code, the first plot produces misaligned vertical grid lines, while in the second plot they are properly aligned. Is there any way to get something along the lines of the first

Re: [R] shifting down ylab in a plot

2010-11-24 Thread statquant2
thanks Phillip for the trick. However I am a bit surprised that something as trivial as this is not accessible via par options... If somebody know how to do it with par ... or anything from graphics would be nice to know Cheers -- View this message in context:

Re: [R] Filled contour plot showing labeled isolines?

2010-11-24 Thread jt306
Sorry, I guess I didn't make it clear. I mentioned it in the subject of my post, but not in the body. Is it possible to have a filled contour plot (showing the colors) with the isolines labeled? On Wed, Nov 24, 2010 at 5:35 AM, David Winsemius [via R]

[R] Tinn R to R problem

2010-11-24 Thread Rudev
I am trying to send complete R code to R from Tinn R by pressing R send:contiguous button. I get following error: source(.trPaths[5], echo=TRUE, max.deparse.length=150) Error in source(.trPaths[5], echo = TRUE, max.deparse.length = 150) : object '.trPaths' not found Anyone has any idea?

Re: [R] adding blocks to arrays

2010-11-24 Thread David Winsemius
On Nov 24, 2010, at 12:08 PM, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: I have a four-dimensional array. I have a three-dimensional array I want to add to it. My particular problem is conceptually very simple because the new array is just going to go into the end of the 4D array;

Re: [R] Filled contour plot showing labeled isolines?

2010-11-24 Thread David Winsemius
On Nov 24, 2010, at 10:19 AM, jt306 wrote: Sorry, I guess I didn't make it clear. I mentioned it in the subject of my post, but not in the body. Is it possible to have a filled contour plot (showing the colors) with the isolines labeled? Then levelplot _was_ (perhaps) the right

[R] rbind error (maybe a problem with chron package?)

2010-11-24 Thread Timothy W. Hilton
Hello, I have a list of data frames that I would like to combine to a single data frame. I typically do this with: do.call(rbind, list.of.dataframes) This time, I get Error in class(x) - cl : cannot set class to array unless the dimension attribute has length 0 I'm not sure what's

Re: [R] Cannot update R

2010-11-24 Thread alon.benari
Thanks Phil, To complicate matters still let me add that I have been using JAGS and rjags for a while, never had a problem , so R can find JAGS and I can interface with JAGS using rjags... but I cannot update it? Your opinion? Maybe I need to update a path to rjags? maybe I can move it to the

Re: [R] Cannot update R

2010-11-24 Thread Phil Spector
Alon - It says it couldn't find it in /usr/local/lib -- is it in some non-standard location? If so, you could modify the ~/.R/Makevars file to contain PKG_LIBS=/location/of/jagslibrary before trying to build the package. - Phil On Wed, 24 Nov

Re: [R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Gabor Grothendieck
On Wed, Nov 24, 2010 at 11:04 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: Hello Group, I have the following options and future data in zoo objects head(optData.z)                       ExpDt OptTyp Strike TrdPrice TotTrdQty 2009-01-01 09:55:03 20090129      1   2900 180.      

Re: [R] Cannot update R

2010-11-24 Thread Joshua Wiley
Two comments: http://www.r-project.org/nosvn/R.check/r-release-linux-ix86/rjags-00check.html CRAN checks show rjags is having errors (maybe because of the library issue, I'm not certain) You are using an old unstable version of 2.12.0---the stable release has come out since. It might be worth

[R] Custom ticks on x axis when dates are involved

2010-11-24 Thread Monica Pisica
Hi, I have a set of irregular time series and i want to produce a simple plot, with dates on x axis and attribute value of y axis. This is simple enough but my x axis is divided automatically by ticks every 5 years. I would like to have a tick every year at January 1st. I am not sure how i

[R] Change the class of columns in a data frame

2010-11-24 Thread Άγνωστος μέσα στο πλήθος
Hi. First of all, excuse me if I do any mistakes, but English is not a language I use very often. I have a data frame with numbers. A small part of the data frame is this: nominal ordinal 2 2 2 1 2 1 2 2 So, I want to use the gower

[R] Par() Variables, Timing, and Resizing

2010-11-24 Thread ckemendo
Hello, R-help, Although this is my first post to the mailing list, I have been a subscriber for a while now, and have found all of the posts to be very informative in my quest to attempt to master R. Thank you for that in advance. This question involves the use of the par() variables pin,

Re: [R] Change the class of columns in a data frame

2010-11-24 Thread Dimitris Rizopoulos
you can do it like this: # example data DF - data.frame(nominal = rep(2, 5), ordinal = c(1,2,2,1,2)) DF$nominal - factor(DF$nominal) DF$ordinal - ordered(DF$ordinal) DF str(DF) I hope it helps. Best, Dimitris On 11/24/2010 8:27 PM, Άγνωστος μέσα στο πλήθος wrote: Hi. First of all, excuse

[R] apply over list of data.frames

2010-11-24 Thread Tim Howard
R users, This probably involves a simple incantation of one of the flavors of apply... that I can't yet figure out. Consider a list of data frames. I'd like to apply a function (mean) across the list and return a dataframe of the same dimensions where each cell represents the mean of that cell

Re: [R] Cannot update R

2010-11-24 Thread alon.benari
Thank you Josh Updating, you suggest I do it through the GUI of the package manager? unless you know how to do it from the the command line I tried to get rid of rjags but it still says it cannot find it, How do I locate the library? Thanks Alon -- View this message in context:

Re: [R] Cannot update R

2010-11-24 Thread alon.benari
Thanks Phil, I may not be as versed in UNIX as you. Can I ask you to show me the BASH command sequence. I did find the original package, I must have downloaded it mannualy. But I do not know where I installed it, how can I find that? Thanks Alon -- View this message in context:

Re: [R] apply over list of data.frames

2010-11-24 Thread baptiste auguie
Hi, Try this, do.call(`+`, x) / length(x) HTH, baptiste On 24 November 2010 20:37, Tim Howard tghow...@gw.dec.state.ny.us wrote: R users, This probably involves a simple incantation of one of the flavors of apply... that I can't yet figure out. Consider a list of data frames. I'd like to

Re: [R] apply over list of data.frames

2010-11-24 Thread Dimitris Rizopoulos
try this: DF.lis - list( one = data.frame(x = c(1,2,3), y = c(1,2,2), z = c(3,1,1)), two = data.frame(x = c(2,5,2), y = c(2,3,1), z = c(4,1,2)) ) Reduce(+, DF.lis) / length(DF.lis) I hope it helps. Best, Dimitris On 11/24/2010 8:37 PM, Tim Howard wrote: R users, This probably

Re: [R] apply over list of data.frames

2010-11-24 Thread Joshua Wiley
Hi Tim, It may not be possible, but if you can use an array, it is super easy: ## convert to array Sue - array(unlist(x), dim = c(3, 3, 2)) ## use apply() on first two dimensions (collapse across 3rd) apply(X = Sue, MARGIN = c(1, 2), FUN = mean) Cheers, Josh On Wed, Nov 24, 2010 at 11:37 AM,

Re: [R] Getting user input without hitting enter

2010-11-24 Thread Greg Snow
This is a user interface issue. The standard command line user interfaces all wait for the user to hit enter before sending the information to the parser, so this cannot be done using the standard command line interface. You could rewrite the source code, but that is probably overkill. The

Re: [R] Par() Variables, Timing, and Resizing

2010-11-24 Thread Greg Snow
I would suggest using the layout function instead of the mfcol and pin with par. The layout function gives you more control of the size of areas to be plotted to. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original

[R] Laplace Approximation

2010-11-24 Thread zerfetzen
Does anyone have any R code that shows how to do a Laplace Approximation? I know there are a variety of these numerical approximation algorithms and I'm pretty open at this point, I'm just curious how it's approximated in R code. I have seen some functions in packages, but I think they all call

[R] Change the class of columns in a data frame

2010-11-24 Thread Άγνωστος μέσα στο πλήθος
Hi. First of all, excuse me if I do any mistakes, but English is not a language I use very often. I have a data frame with numbers. A small part of the data frame is this: nominal ordinal 2 2 2 1 2 1 2 2 So, I want to use the gower

[R] Hospital ANOVA/ANCOVA problem

2010-11-24 Thread edamamebuffet
Hi everyone, I've only been using R for a week or so now, and am now required to work with some pretty mixed data at my hospital. Basically, we're looking to see if hypertension status (nominal) affects cardiac function (multiple continuous). In order to do this, we've collected multiple

[R] Is there an equivalent to predict(..., type=linear) of a Proportional hazard model for a Cox model instead?

2010-11-24 Thread Ben Rhelp
Hi all, Is there an equivalent to predict(...,type=linear) of a Proportional hazard model for a Cox model instead? For example, the Figure 13.12 in MASS (p384) is produced by: (aids.ps - survreg(Surv(survtime + 0.9, status) ~ state + T.categ + pspline(age, df=6), data = Aidsp)) zz -

Re: [R] apply over list of data.frames

2010-11-24 Thread Tim Howard
Fabulous! I'll start with trying out Reduce, and then explore do.call or converting it to an array if I need to. Thank you Dimitris, Baptiste, and Josh for the very quick help! Best, Tim Dimitris Rizopoulos d.rizopou...@erasmusmc.nl 11/24/2010 2:43 PM try this: DF.lis - list( one =

Re: [R] Tobit model on unbalanced panel

2010-11-24 Thread Arne Henningsen
On 23 November 2010 23:32, Achim Zeileis achim.zeil...@uibk.ac.at wrote: On Tue, 23 Nov 2010, Liang Peng wrote: Appreciate any suggestions regarding how to fit an unbalanced panel data to a Tobit model using R functions. I am trying to analyze how real estate capital expenditures (CapEx) are

Re: [R] Tobit model on unbalanced panel

2010-11-24 Thread Arne Henningsen
Hi Terry On 24 November 2010 15:34, Terry Therneau thern...@mayo.edu wrote: For tobit regression, also see the last example of help(survreg) in the survival package. How does the survreg() function of the survival package account for the panel structure of the data? Best wishes, Arne --

Re: [R] Custom ticks on x axis when dates are involved

2010-11-24 Thread jim holtman
Try this: d - c(4/6/1984, 9/29/1984, 1/19/1985, 3/27/1986, 10/3/1987, 10/8/1987, 1/28/1988, 12/16/1989, 10/11/1991, 10/5/1992, 11/15/1995, 4/7/1996, 10/3/1997, 2/28/1998, 10/11/2000, 10/30/2001, 2/27/2002, 12/28/2002, 10/20/2003, 10/20/2003, 10/20/2003, 11/7/2004, 10/9/2005, 10/9/2005,

Re: [R] Problem setting the number of digits in xtable

2010-11-24 Thread Brian Diggs
On 11/22/2010 9:16 AM, wphantomfr wrote: DEar list members, I am currently using Sweave with LaTeX which is great. I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe. I have found an example on the net ith

[R] RJDBC doesn't load Oracle driver?

2010-11-24 Thread Andre Zege
After installing RJDBC on RedHat Linux and using it successfully with mySQL JDBC driver i am trying to use it with Oracle database. I use the JDBC driver that works fine elsewhere (use it in DBVizualizer). However, when i try to load the driver, drv-JDBC(oracle.jdbc.driver.OracleDriver,

Re: [R] Tinn R to R problem

2010-11-24 Thread JCFaria
Hello, All you need are explained at Help/Main/User guide/HTML from Tinn-R menu. Basically: 1. Close R 2. Menu R/Configure/ Pemanent (Rprofile.site) - Tinn-R will generate a small script inside of the file Rprofile.site (located on the folder 'etc' where R is istalled) 3. Reboot R 4. It is

  1   2   >