[R] [R-pkgs] PerformanceAnalytics version 0.9.6 released to CRAN

2007-12-31 Thread Brian G. Peterson
We are pleased to announce the availability on CRAN of PerformanceAnalytics version 0.9.6. This is a feature and bugfix release. http://cran.r-project.org/src/contrib/Descriptions/PerformanceAnalytics.html PerformanceAnalytics is a library of econometric functions for performance and risk analys

Re: [R] How to import ENSEMBL text data using R

2007-12-31 Thread Charles C. Berry
On Mon, 31 Dec 2007, Martin Morgan wrote: [substantive part of reply deleted] > > Congratulations, Charles, on the first posts of the new year! > > Martin > Martin, Thanks! It really feels good to know I am 'ahead of my time'. I'd never thought of this before, but it's a great incentive to po

Re: [R] How to import ENSEMBL text data using R

2007-12-31 Thread Martin Morgan
The biomaRt package might be what you're interested in. See the Bioconductor web site http://bioconductor.org for details, in particular http://bioconductor.org/download for instructions on downloading Bioconductor packages and http://www.bioconductor.org/packages/release/Software.html for cu

Re: [R] How to import ENSEMBL text data using R

2007-12-31 Thread Charles C. Berry
On Mon, 31 Dec 2007, mohamed nur anisah wrote: > Dear all, > I have a data which is in text file and i would like to import the data > to R. From the manual, i've found the read.table command function is > the most appropriate but when i wrote the command an error had occur. > It say 'Error in

Re: [R] Program output to file using a batch command file

2007-12-31 Thread Charles C. Berry
On Mon, 31 Dec 2007, Jean-Victor C?t? wrote: If I copy the following commands in my batch file to the R console, R creates a file named "basicStatsIBM.lis" with the program output in it: Sortie <- file(description = "basicStatsIBM.lis", open = "wt", blocking = TRUE, encoding = "UTF-8") sin

[R] Bootstrapping

2007-12-31 Thread Anup Nandialath
Dear friends, I'm interested in obtaining bootstrapped standard errors for a model that I'm estimating. I do realize that i can use the sample command and do the bootstrap by hand. But I was hoping somebody can help me on how to use the "boot" package. The model is as follows # Likelihood fu

[R] How to import ENSEMBL text data using R

2007-12-31 Thread mohamed nur anisah
Dear all, I have a data which is in text file and i would like to import the data to R. From the manual, i’ve found the read.table command function is the most appropriate but when i wrote the command an error had occur. It say “Error in read.table"C:/Users/user/Documents/cfa-1.txt", header =

Re: [R] stack charts right on top of each other

2007-12-31 Thread tom soyer
Thanks Jim! On 12/31/07, jim holtman <[EMAIL PROTECTED]> wrote: > > To make the charts the same size, try setting the top and bottom > margins to be the same; e.g., > > layout(rbind(1,2)) > par(mar=c(0,4,4,2)) > plot(rnorm(1:3),xaxt="n",xlab="") > par(mar=c(4,4,0,2)) > plot(rnorm(1:3)) > > On Dec

Re: [R] stack charts right on top of each other

2007-12-31 Thread tom soyer
Sorry Gabor, you are right, using mar= alone is enough to do the stacking. I was wrong. On 12/31/07, tom soyer <[EMAIL PROTECTED]> wrote: > > Thanks Gabor. mar= and oma= by themselves won't be able to do it. layout() > is necessary per Jim's post. But now I am stuck with another problem when I > t

Re: [R] stack charts right on top of each other

2007-12-31 Thread jim holtman
To make the charts the same size, try setting the top and bottom margins to be the same; e.g., layout(rbind(1,2)) par(mar=c(0,4,4,2)) plot(rnorm(1:3),xaxt="n",xlab="") par(mar=c(4,4,0,2)) plot(rnorm(1:3)) On Dec 31, 2007 1:16 PM, tom soyer <[EMAIL PROTECTED]> wrote: > Thanks Jim! It seems layout(

[R] Program output to file using a batch command file

2007-12-31 Thread Jean-Victor Côté
If I copy the following commands in my batch file to the R console, R creates a file named "basicStatsIBM.lis" with the program output in it: Sortie <- file(description = "basicStatsIBM.lis", open = "wt", blocking = TRUE, encoding = "UTF-8") sink(file = Sortie, append = FALSE, type = "outp

Re: [R] stack charts right on top of each other

2007-12-31 Thread tom soyer
Thanks Gabor. mar= and oma= by themselves won't be able to do it. layout() is necessary per Jim's post. But now I am stuck with another problem when I tried to define the height of each chart: layout(rbind(1,2)) par(mar=c(0,4,4,2),pin=c(4,2)) plot(rnorm(1:3),xaxt="n",xlab="") par(mar=c(5,4,0,2),pi

Re: [R] Histogram with different colors for different portions

2007-12-31 Thread Greg Snow
One of the wonderful things about R/S is how easy it is to turn code into a new function definition. Here is a function based on your code (with a couple of small modifications): col.sd.hist <- function(x, cols=c('red','blue','pink'), ...) { xbar <- mean(x) SD <- sd(x) BR <- seq(xbar - 4*SD

Re: [R] stack charts right on top of each other

2007-12-31 Thread Gabor Grothendieck
Check out: http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm On Dec 31, 2007 11:53 AM, tom soyer <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to stack two charts on top of each other using the following > R functions: > > par(mfrow=c(2,1)) > plot(rnorm(1:3),xaxt="n",xla

Re: [R] stack charts right on top of each other

2007-12-31 Thread tom soyer
Thanks Jim! It seems layout() is necessary in addition to mar=. I have a follow up question: is there a way to specify the height of each chart so that all the charts have the same height? I tried pin=, but it created more space (if the height is set to a small value) between the charts, although i

[R] Optimize jackknife code

2007-12-31 Thread mw-u2
Hi, I have the following jackknife code which is much slower than my colleagues C code. Yet I like R very much and wonder how R experts would optimize this. I think that the for (i in 1:N_B) part is bad because Rprof() said sum() is called very often but I have no idea how to optimize it. #

Re: [R] SVM error

2007-12-31 Thread Uwe Ligges
Are we talking about package "e1071"? [EMAIL PROTECTED] wrote: > Hi all, > > I'm having this error, since I'm working with a data matrix I don't > understand what's happening; I've tried several ways to solve this, even > working with sparse matrix, but nothing seems to solve it, I've also tri

Re: [R] Different number of labels in different panels

2007-12-31 Thread Deepayan Sarkar
On 12/31/07, Hofert Marius <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to put a number to each of the plotted curves in each > panel. The problem is that there are different numbers of curves in > different panels, so as you can see from the code below, I could put > the correct numbers to th

Re: [R] stack charts right on top of each other

2007-12-31 Thread Uwe Ligges
See ?par and its argument "mar" Uwe Ligges tom soyer wrote: > Hi, > > I tried to stack two charts on top of each other using the following > R functions: > > par(mfrow=c(2,1)) > plot(rnorm(1:3),xaxt="n",xlab="") > plot(rnorm(1:3)) > > This created two charts, one on top of the other, but the

Re: [R] stack charts right on top of each other

2007-12-31 Thread jim holtman
try this to get them to butt up against each other: layout(rbind(1,2)) par(mar=c(0,4,3,2)) plot(rnorm(1:3),xaxt="n",xlab="") par(mar=c(4,4,0,2)) plot(rnorm(1:3)) On Dec 31, 2007 11:53 AM, tom soyer <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to stack two charts on top of each other using the fol

[R] stack charts right on top of each other

2007-12-31 Thread tom soyer
Hi, I tried to stack two charts on top of each other using the following R functions: par(mfrow=c(2,1)) plot(rnorm(1:3),xaxt="n",xlab="") plot(rnorm(1:3)) This created two charts, one on top of the other, but there is too much space between them. Does anyone know how to elimiate the space in bet

Re: [R] Different number of labels in different panels

2007-12-31 Thread Gabor Grothendieck
Use this panel function: function(x,y,subscripts,...){ panel.superpose(x, y, subscripts, ...) grps <- as.character(sort(unique(dataframe[subscripts,2]))) draw.key(simpleKey(grps), TRUE, vp = viewport(0.15, 0.9)) } The code below is the same as in your post except we have added library

Re: [R] help on ROC analysis

2007-12-31 Thread Frank E Harrell Jr
zhijie zhang wrote: > Dear all, > Some functions like 'ROC(Epi)' can be used to perform ROC analyssi, but it > needs us to specify the fitting model in the argument. Now i have got the > predicted p-values (0,1) for the 0/1 response variable using some other > approach, see the following example

Re: [R] Symbolic substitution in parallel; use infinity symbol?

2007-12-31 Thread Bert Gunter
Happy New year John! Is the following what you are looking for: y <- rnorm(40) breaks <- c(-Inf, -1, 1, Inf) x <- cut(y, breaks=breaks) plot(unclass(x), y, xaxt="n", xlab="") leftlab <- expression("(-" * infinity * "]") rightlab<- expression("[+" * infinity * ")") axlab <- leve

[R] Different number of labels in different panels

2007-12-31 Thread Hofert Marius
Hi, I would like to put a number to each of the plotted curves in each panel. The problem is that there are different numbers of curves in different panels, so as you can see from the code below, I could put the correct numbers to the curves in the first panel, but for the second panel, bo

Re: [R] help on ROC analysis

2007-12-31 Thread Wensui Liu
Hi, ZJ, In verification package, there is a function that takes observed response and predicted probability and then calculate the ROC. I am not sure if it is what you are after. On Dec 31, 2007 10:27 AM, zhijie zhang <[EMAIL PROTECTED]> wrote: > Dear all, > Some functions like 'ROC(Epi)' can be

Re: [R] Survival analysis with no events in one treatment group

2007-12-31 Thread Terry Therneau
John, The key issue with a data set that has no events in one group is that the usual Wald tests, i.e., beta/se(beta), do not work. They is based on a Taylor series argument of the usual type: f(x) = f(x0) + a polynomial in (x-x0), and for infinite beta "x" and "x0" are so far apart that the

[R] help on ROC analysis

2007-12-31 Thread zhijie zhang
Dear all, Some functions like 'ROC(Epi)' can be used to perform ROC analyssi, but it needs us to specify the fitting model in the argument. Now i have got the predicted p-values (0,1) for the 0/1 response variable using some other approach, see the following example dataset: id mark predict.p

[R] R to LaTeX Univariate Analysis

2007-12-31 Thread Christophe Genolini
Hi all Well, first: happy new year... Second: I write a function in R that might interest some other people. On the other hand, I am closer to beginners than experts; I don't know how valuable my code is. I don't know how long it will take to me to create a library and I don't know if it's wor

Re: [R] updating R version and packages.

2007-12-31 Thread diegol
A menu-driven alternative: in the R Console GUI, select Packages | Update packages. Milton Cezar Ribeiro wrote: > > Dear All, > > Is there a way of I update automatically the R version and the respective > packages which I have installed on my computer? Case not, how can I know > about what p

Re: [R] refering to variable names in lm where the variable name isin another variable

2007-12-31 Thread Bert Gunter
The semantic gymnastics below aren't necessary (nor are necessarily they a bad idea). This is basically FAQ 7.21. So, e.g. z <- c("x1","x2") mod <- lm(y ~ get(z[1]) + get(z[2])) Bert Gunter Genentech -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chari

Re: [R] Avoiding "." when importing from csv

2007-12-31 Thread Frank E Harrell Jr
Prof Brian Ripley wrote: > See the help, especially argument 'check.names'. > > On Sat, 29 Dec 2007, Thomas Schwander wrote: > >> Hi guys, another question today: >> >> >> >> If I import an external csv-file with headers (with read.csv2), the blanks >> are interpreted as points. So "Test 1" becom

Re: [R] Trying to install rjags on Mac OS X 10.5

2007-12-31 Thread Lindsay Stirton
Thanks Rob, Since I already had Xcode 3.0, I re-installed gfortran (from the R website, not from the .dmg) and gcc4.2.1 preview. I am afraid the outcome was the same, i.e. jags 1.0.1 not found. Yes I do use Macports (and formery used Fink, which is still installed). What issues does this raise?

[R] SVM error

2007-12-31 Thread pedrosmarques
Hi all, I'm having this error, since I'm working with a data matrix I don't understand what's happening; I've tried several ways to solve this, even working with sparse matrix, but nothing seems to solve it, I've also tried svm (with a simple matrix 3*3 and still got the same error. > dados<-

Re: [R] read.dta error after OSX change in time zone

2007-12-31 Thread Prof Brian Ripley
This _is_ Mac-specific, so please use R-sig-mac. It looks like changing the time zone is changing the behaviour of the system function strptime. But we need a reproducible example (see the footer of this and every message). You can probably create one by debugging the failing call and seeing

Re: [R] updating R version and packages.

2007-12-31 Thread Henrique Dallazuanna
See ?update.packages function. On 30/12/2007, Milton Cezar Ribeiro <[EMAIL PROTECTED]> wrote: > Dear All, > > Is there a way of I update automatically the R version and the respective > packages which I have installed on my computer? Case not, how can I know > about what packages I installed by

Re: [R] Avoiding "." when importing from csv

2007-12-31 Thread Prof Brian Ripley
See the help, especially argument 'check.names'. On Sat, 29 Dec 2007, Thomas Schwander wrote: > Hi guys, another question today: > > > > If I import an external csv-file with headers (with read.csv2), the blanks > are interpreted as points. So "Test 1" becomes "Test.1". > > > > Is there a way to

Re: [R] Another problem with encoding

2007-12-31 Thread Peter Dalgaard
Matthias Wendel wrote: > Hi > I've imported an spss-file using read.spss. One variable has value like > 'Ärzte'. I thought this is UTF-8 encoded, but it is not > (as the results of iconv and utf8ToInt suggest). Is there any way to find out > how these spss-values are encoded? > You are ass

Re: [R] the woes of NA

2007-12-31 Thread Peter Dalgaard
Galkowski, Jan wrote: > Joyful. > > I'm adapting a FORTRAN 77 package for use with R. Pretty > straightforward. > > Except for a glitch it took me some time to figure out. This existing > package has subroutines which have parameters called "NA". So, I called > subroutines like > > bnodes <- fu

[R] Another problem with encoding

2007-12-31 Thread Matthias Wendel
Hi I've imported an spss-file using read.spss. One variable has value like 'Ärzte'. I thought this is UTF-8 encoded, but it is not (as the results of iconv and utf8ToInt suggest). Is there any way to find out how these spss-values are encoded? Regards, Matthias __

[R] joint probability

2007-12-31 Thread Ricardo Perrone
Hi, I need some instructoins about: Given two larger vectors(A and B) with discrite time values, and considering that each vector was ordered previously. how to compute the joint probability for each pair of values, considering the restriction that each element in A(Ai) is combined only with

[R] plot.augPred with grouping factors

2007-12-31 Thread Dan Bebber
I fitted the following model: dgr.lme2 <- lme(Average ~ poly(Time, 2) * Treatment, random = ~1|Replicate, data = dgr, correlation = corAR1(), method = "ML") I plotted the data in separate panels for each Treatment: xyplot(Average ~ Time|Treatment, groups = Replicate, data = dgr, type = c("p","l"),

[R] how to run my R code in Mac OS X 10.5 Leopard

2007-12-31 Thread LUZhiping
Hi, I have a question in running R 2.4.1 in the Mac OS X 10.5 Leopard. I write all my R code without using any packages in R. When I run it in Windows system, it runs smoothly and correctly. Then I try to run the same code in Mac OS X 10.5 Leopard. I just copy the script file on the deskt

[R] Avoiding "." when importing from csv

2007-12-31 Thread Thomas Schwander
Hi guys, another question today: If I import an external csv-file with headers (with read.csv2), the blanks are interpreted as points. So "Test 1" becomes "Test.1". Is there a way to change this? Thanks, Thomas I'm using XP and R 2.6.1 [[alternative HTML version deleted]]

Re: [R] A function for random test based on longest run (UNCLASSIFIED)

2007-12-31 Thread Dirk Eddelbuettel
Brian, On 29 December 2007 at 17:03, Prof Brian Ripley wrote: | On Thu, 27 Dec 2007, Dirk Eddelbuettel wrote: | | > | > On 27 December 2007 at 12:08, bogdan romocea wrote: | > | > require(tseries) | > | > ?runs.test | > | Also, take a look at dieharder, it implements a large number of | >

Re: [R] Trying to install rjags on Mac OS X 10.5

2007-12-31 Thread Vincent
I had the same issue on my Mac. After install pkg-config from MacPorts Martyn suggested to add the following 2 lines to my .bashrc file: export LD_LIBRARY_PATH="/usr/local/lib" export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" Everything worked after that. Best, Vincent On Dec 30, 11:56 am, L

Re: [R] tcltk again (solved)

2007-12-31 Thread Richard Müller
> I wrote the following code: > X11() > # some code to generate a plot on the screen omitted > > res <-tkmessageBox(title="Finish?", > message="save as PDF?", > icon="question", type="okcancel") > > if (tclvalue(res) == "ok") > Datei <- tkgetSaveFile(initialdir="temp/",defaultex