[R] Help on tcl/tk package installation

2010-01-21 Thread 李道丰
Hi, Dear all, i encounted a problem with tcl/tk installation actually i want to install q-value package i use the R CMD INSTALL command: [r...@bioinfo ~]# R CMD INSTALL qvalue_1.20.0.tar.gz * Installing to library â€?usr/local/lib64/R/libraryâ€? * Installing *source* package ‘qvalueâ€?... ** R *

[R] [Fwd: RSPerl help.]

2010-01-21 Thread yvijayalakshmi
Dear Sir, I am Vijaya, working as a research assistant in one small research organisation named IBAB in India. Here is my problem, after installing RSPerl in linux, I tried to test it by executing test.pl program which is present in RSPerl/script directory but I am getting the following

[R] RSPerl installation problem.

2010-01-21 Thread vijayayarra
Hi, After installing RSPerl module, when I tried to test the module, I am getting the following error. Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/R/R.so' for module R: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/R/R.so: undefined symbol: R_ClassSymbo

[R] what "~1"stands for?

2010-01-21 Thread 孟欣
Hi all: In the expression: lme(y~1,random=~1|time) What "~1" stands for? Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Create a multi dimensional array from a data frame

2010-01-21 Thread David Winsemius
On Jan 21, 2010, at 6:06 PM, LCOG1 wrote: Hello all, I have data from a csv that i need to coerce into a multi dimensional array. As you can see from my sample code i have yet to master building efficient code. I can sort of do what i want but its very cumbersome code and i know ther

Re: [R] Fremingham Heart Study data set

2010-01-21 Thread Jim Lemon
On 01/22/2010 07:38 AM, franck kalala wrote: Hey all, I am just born today in the r language and I discover that it the language that I need for my research. I don't too much yet about this language. I want to know if I can find in this language and install the package data set related to "

Re: [R] Conditional density plot in lattice

2010-01-21 Thread Jim Lemon
On 01/22/2010 04:05 AM, Dieter Menne wrote: Dear group, I want to create a plot similar to cdplot or cd_plot I vcd : http://addictedtor.free.fr/graphiques/graphcode.php?graph=120 with lattice and support for multiple panels. Densities should not be computed, these are stored in a data frame as

Re: [R] Create a multi dimensional array from a data frame

2010-01-21 Thread ROLL Josh F
Hmmm...The project i am working on does not necessitate the 27 matrix array, but i it will down the line. Im guessing the "all of that" is complicated? I figured, it would be by the time it took me to figure out that i dont possess the skills to craft the correct code. If there is anyone will

[R] Once again: Error: cannot allocate vector of size

2010-01-21 Thread Werner W.
Hi, I have browsed the help list and looked at the FAQ but I don't find conclusive evidence if this is normal or I am doing something wrong. I am running a lm() on a data.frame with 27136 observations of 6 variables (3 num and 3 factor). After a while R throws this: > lm(log(y) ~ log(a) + log(

[R] Invalid input error in tm package

2010-01-21 Thread Shreyasee
Hello, I am working on "tm" package. I have 2 pdf files saved in the directory D:/Files I issued the following commands (marked in red bold) for which I got some errors and warnings (marked in bold) *surgj <- Corpus(DirSource("D:/Files"), readerControl = list(language = "ansi"))* *Warning messag

Re: [R] cross validation function translated from stata

2010-01-21 Thread zhu yao
Thanks Frank and Steve. I rewrite the R code as follows. # m is the number of fold to split sample, n is the loop number of cross validation library(caret) calcvnb<-function(formula,dat,m,n) { cvnb<-rep(0,2) dim(cvnb)<-c(200,100) for (i in 1:n) { group<-rep(0,length=110) sg<-createFolds(d

Re: [R] How to write '"' to a csv with the default setting ofwrite.csv?

2010-01-21 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Peng Yu > Sent: Thursday, January 21, 2010 3:38 PM > To: milton ruser > Cc: r-h...@stat.math.ethz.ch > Subject: Re: [R] How to write '"' to a csv with the default > setting ofwri

Re: [R] Na.omit on matrix, does the matrix have to have a limited size

2010-01-21 Thread Charles C. Berry
On Thu, 21 Jan 2010, anna wrote: [in response to a suggestion (that was deleted in this reply) that there are NAs where OP did not expect them] No, the NA values are in the same rows and there are only 28 of missing value rows... Sorry, but I'm with Peter on this one. You must have NAs in

Re: [R] Data Manipulation

2010-01-21 Thread Peter Rote
Thank you Dieter and Rolf, I have solved the slash Problem, but I still struggling with the output files. I have tried this by(AlexETF,AlexETF$Industry,function(a) {filename = paste("C:/ab/",gsub(" ","",a$Industry[1]),".txt",sep="") print(filename) write.table(a,file=filename,c

Re: [R] Logistic regression

2010-01-21 Thread milton ruser
Dear someone, Take a look at drc and Hmisc/Design packages. Next time could be polite you identify yourself bests milton On Thu, Jan 21, 2010 at 4:17 PM, DispersionMap wrote: > > can you do Logistic regression in R, if so how do you do it and how do you > test the fit of a model? > -- > View t

Re: [R] Logistic regression

2010-01-21 Thread Alexandre Serra Barreto
you may use the function glm() to do all of it, see the R help for more about. Em 21/01/2010 19:17, DispersionMap < frenc...@btinternet.com > escreveu: can you do Logistic regression in R, if so how do you do it and how do you test the fit of a model? -- View this mes

Re: [R] How to open .rda file in R

2010-01-21 Thread AMBUJ
Hi Steve,    It worked!! Thank you very much.. Regards, Ambuj A Thacker --- On Fri, 22/1/10, Steve Lianoglou wrote: From: Steve Lianoglou Subject: Re: [R] How to open .rda file in R To: "AMBUJ" Cc: r-help@r-project.org Date: Friday, 22 January, 2010, 12:30 AM Hi, 1. Please keep replies

Re: [R] How to write '"' to a csv with the default setting of write.csv?

2010-01-21 Thread milton ruser
Peng, Are you having doble quotes? It is what you want? Did you tried the suggestion? bests milton On Thu, Jan 21, 2010 at 6:38 PM, Peng Yu wrote: > On Thu, Jan 21, 2010 at 5:32 PM, milton ruser > wrote: > > Hi Peng, > > > > May be write.table(...,quote=F) > > > > bests > > > > milton > > Woul

Re: [R] use R from python

2010-01-21 Thread Barry Rowlingson
On Thu, Jan 21, 2010 at 8:35 PM, Massimo Di Stefano wrote: > Hi All, > > please aplogize me if my qustion is a bit OT here, > but maybe is there someone that uses R from inside python > using rpy or rpy2 interface. > In [54]: x = rdiv( ( rdiff( x, rmin(x) ) ) , ( rdiff( rmax(x) , rmin(x) ) ) ) >

Re: [R] How to write '"' to a csv with the default setting of write.csv?

2010-01-21 Thread Peng Yu
On Thu, Jan 21, 2010 at 5:32 PM, milton ruser wrote: > Hi Peng, > > May be write.table(...,quote=F) > > bests > > milton Would this cause some trouble when filed is missing, etc.? Although I don't have a concrete example, I think that it might happen. So I prefer to have quote=T. I have looking

Re: [R] How to write '"' to a csv with the default setting of write.csv?

2010-01-21 Thread milton ruser
Hi Peng, May be write.table(...,quote=F) bests milton On Thu, Jan 21, 2010 at 6:29 PM, Peng Yu wrote: > Please see the following example. I can not write '"' to a csv file > successfully. Could somebody let me if it is possible to write '"' to > a csv file with the default setting of write.cs

[R] How to write '"' to a csv with the default setting of write.csv?

2010-01-21 Thread Peng Yu
Please see the following example. I can not write '"' to a csv file successfully. Could somebody let me if it is possible to write '"' to a csv file with the default setting of write.csv? my_home$ Rscript main_quote.R > x=rbind( + "\"A\"" + , "\"B\"" + ) > x [,1] [1,] "\"A\"" [2,] "\"B\

Re: [R] Create a multi dimensional array from a data frame

2010-01-21 Thread Dennis Murphy
Hi: Before you do all of that, might one inquire about which goal you are trying to achieve? Perhaps a 27-dimensional array may not be the wisest choice of data structure for your goal. Dennis On Thu, Jan 21, 2010 at 3:06 PM, LCOG1 wrote: > > Hello all, > I have data from a csv that i need t

Re: [R] Na.omit on matrix, does the matrix have to have a limited size

2010-01-21 Thread anna
No, the NA values are in the same rows and there are only 28 of missing value rows... -- View this message in context: http://n4.nabble.com/Na-omit-on-matrix-does-the-matrix-have-to-have-a-limited-size-tp1068000p1069099.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Na.omit on matrix, does the matrix have to have a limited size

2010-01-21 Thread Peter Alspach
Tena koe Anna Presumably because only 69 rows of your matrix have no missing values in any column? HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of anna > Sent: Friday, 22 January 2010 12:01 p.m. > To

[R] Create a multi dimensional array from a data frame

2010-01-21 Thread LCOG1
Hello all, I have data from a csv that i need to coerce into a multi dimensional array. As you can see from my sample code i have yet to master building efficient code. I can sort of do what i want but its very cumbersome code and i know there is a better way to do it, i am just not experein

[R] correlation significance testing with multiple factor levels

2010-01-21 Thread Jack Tanner
[Apologies in advance if this is too "statistics" and not enough "R".] I've got an experiment with two sets of treatments. Each subject either received all treatments from set A or all treatments from set B. I can compute the N pairwise correlations for all treatments in either set using cor().

[R] Na.omit on matrix, does the matrix have to have a limited size

2010-01-21 Thread anna
Hello everyone, I am using the na.omit() function on a 785 x 79 matrix. When I restrict the matrix to 10 columns for example it returns me the right result with the na rows deleted: 756 x 10 matrix. But, if I enter the whole matrix it returns me a 64 x 79 matrix, ununderstandable, I have no idea w

[R] Rscript question

2010-01-21 Thread OS
Hi, I have some code I run interactively through the R interpreter and it works fine. I then run it as a script with Rscript and I get an error. The error is coming when Rscript builds a model matrix. Here is the Rscript code : #!/usr/lib/R/bin/Rscript --verbose require(MASS) options(contrasts =

Re: [R] Displaying Equation With Numerator and Demomenator On A Plot...

2010-01-21 Thread Dennis Murphy
Hi: Try this: plot(c(0, 1), c(0, 1)) text(0.5, 0.5, expression(x == over(-b %+-% sqrt(b^2 - 4 * a * c), 2 * a))) I've found it useful to print out the different plotmath expressions: pdf('plotmath.pdf') demo(plotmath) dev.off() HTH, Dennis On Thu, Jan 21, 2010 at 2:10 PM, Jason Rupert wrote:

Re: [R] Help with subset

2010-01-21 Thread Jerry Floren
Thank you very much Peter. I'm off until Monday, but now I have an interesting project to think about over the weekend. It looks pretty simple, and it sure will beat over 2,000 pages of code to cut and paste. Thanks again, Jerry Floren Minnesota Department of Agriculture -- View this message in

Re: [R] Help with subset

2010-01-21 Thread Peter Alspach
Tena koe Jerry myVars would be the unique values of Anlysis_Soil. I guess Anlysis_Soil is a factor, in which case myVars <- levels(Anlysis_Soil) The for() loop then steps through each of these in turn. HTH Peter Alspach PS If you'd like more details it might be better to contact me of

[R] Problem on results of runmean function

2010-01-21 Thread anna
Hello R specialists, I am using the runmean function to get the moving averages of a time serie. Here is the code that I enter: ma<-runmean(na.remove(myTimeSerie),20,align="right",endrule="NA") I get the vector that I want except for one detail: the first 20 values are supposed to be NAs but I ge

[R] Displaying Equation With Numerator and Demomenator On A Plot...

2010-01-21 Thread Jason Rupert
Is there a way to display something like the quadratic equation, i.e. with a numerator and demonator on a plot? I think there is a way to create the equation in Latex, but wasn't sure if this format would translate to plotting. \begin{equation}   x = \frac{b +/- sqrt(b^2 - 4*a*c)}{2*a} \end{eq

Re: [R] Logistic regression

2010-01-21 Thread Dennis Murphy
?glm. Run the examples. This might also help: http://nlp.stanford.edu/manning/courses/ling289/logistic.pdf DM On Thu, Jan 21, 2010 at 1:17 PM, DispersionMap wrote: > > can you do Logistic regression in R, if so how do you do it and how do you > test the fit of a model? > -- > View this message

Re: [R] Double inequality with plotmath

2010-01-21 Thread Mark Seeto
Thank you very much Duncan. I see I also had the mistake of a "c" instead of "expression" in my question. Mark On Fri, Jan 22, 2010 at 7:59 AM, Duncan Murdoch wrote: > On 21/01/2010 3:50 PM, Mark Seeto wrote: >> >> Hello, >> >> I'm fairly new to R and I can't work out how to produce a double >>

Re: [R] What is the difference between S and R?

2010-01-21 Thread milton ruser
Hi There, If you are starting with S or R, don't be worried. If you just started (I suppose with R), don't be worried too. Just enjoy and be happy :-) bests milton On Thu, Jan 21, 2010 at 10:44 AM, Peng Yu wrote: > On Thu, Jan 21, 2010 at 9:07 AM, Giovanni Petris wrote: > > > > I have found

[R] Logistic regression

2010-01-21 Thread DispersionMap
can you do Logistic regression in R, if so how do you do it and how do you test the fit of a model? -- View this message in context: http://n4.nabble.com/Logistic-regression-tp1059870p1059870.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] What is the difference between S and R?

2010-01-21 Thread Greg Snow
Read FAQ 3.3 as a starting place. -- 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 [mailto:r-help-boun...@r- > project.org] On Behalf Of Peng Yu > Sent: Thursday, J

Re: [R] Anova unequal variance

2010-01-21 Thread Peng Yu
On Thu, Jan 21, 2010 at 2:41 PM, Dennis Murphy wrote: > Hi: > > On Thu, Jan 21, 2010 at 12:29 PM, Peng Yu wrote: >> >> On Thu, Jan 21, 2010 at 2:16 PM, Dennis Murphy wrote: >> > Hi: >> > >> > This paper was a prelude to his first book 'Exact Statistical Methods >> > for >> > Data Analysis'. >> >

Re: [R] Double inequality with plotmath

2010-01-21 Thread Duncan Murdoch
On 21/01/2010 3:50 PM, Mark Seeto wrote: Hello, I'm fairly new to R and I can't work out how to produce a double inequality like (LaTeX) $0 \leq x \leq 1$ in the legend of a graph. If I try > legend(50, 0.1, legend = c(expression(0 <= x <= 1), c(2 <= x <= 3)), pch = c(1,1), col = c(2, 3)) the

Re: [R] Help with subset

2010-01-21 Thread Jerry Floren
Thank you Peter. I am really new to this. The spreadsheet I am working with has 12,379 rows with the first row consisting of the variable names and 12,378 rows of data. There are seven columns, and the 7th column is the only one with numerical data ("Results"). I need to match up the variable Re

[R] Double inequality with plotmath

2010-01-21 Thread Mark Seeto
Hello, I'm fairly new to R and I can't work out how to produce a double inequality like (LaTeX) $0 \leq x \leq 1$ in the legend of a graph. If I try > legend(50, 0.1, legend = c(expression(0 <= x <= 1), c(2 <= x <= 3)), pch = > c(1,1), col = c(2, 3)) then I get an error message "unexpected '<='

[R] Fremingham Heart Study data set

2010-01-21 Thread franck kalala
Hey all, I am just born today in the r language and I discover that it the language that I need for my research. I don't too much yet about this language. I want to know if I can find in this language and install the package data set related to " The Framingham Heart Study", see references he

Re: [R] 3d trend line

2010-01-21 Thread Duncan Murdoch
On 21/01/2010 2:43 PM, mlcarte3 wrote: I have a 3d scatter plot and I need to add a trend line. I can add a regression plane, but I need a line, not a plane. Which line do you want? There's more than one choice. For example, you could regress y and z on x, or you could find the principle

[R] use R from python

2010-01-21 Thread Massimo Di Stefano
Hi All, please aplogize me if my qustion is a bit OT here, but maybe is there someone that uses R from inside python using rpy or rpy2 interface. i'm at my first experience using rpy2. i need to port torpy some R code .. but i'm having little problems i hope yopu can help me. The R code is : #

Re: [R] 3d trend line

2010-01-21 Thread milton ruser
Hi mlcarte3 (it is you?) ?contour Try algo google R graph gallery bests milton On Thu, Jan 21, 2010 at 2:43 PM, mlcarte3 wrote: > > I have a 3d scatter plot and I need to add a trend line. I can add a > regression plane, but I need a line, not a plane. > > Thanks. > -- > View this message in

Re: [R] Anova unequal variance

2010-01-21 Thread Peng Yu
On Thu, Jan 21, 2010 at 2:16 PM, Dennis Murphy wrote: > Hi: > > This paper was a prelude to his first book 'Exact Statistical Methods for > Data Analysis'. > He uses what is called a generalized p-value approach to inference, and for > the > book he wrote commercial software. AFAIK, no R package i

[R] 3d trend line

2010-01-21 Thread mlcarte3
I have a 3d scatter plot and I need to add a trend line. I can add a regression plane, but I need a line, not a plane. Thanks. -- View this message in context: http://n4.nabble.com/3d-trend-line-tp1053686p1053686.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Retrieving an evaluated gradient value (UNCLASSIFIED)

2010-01-21 Thread Henrique Dallazuanna
Try this: attr(junk1(k=0,b0=-14.0236,b1=2.44031), 'gradient') On Thu, Jan 21, 2010 at 6:05 PM, Park, Kyong H Mr CIV USA AMC wrote: > Classification:  UNCLASSIFIED > Caveats: NONE > > Dear R users, > > How can I retrieve an evaluated gradient value from "deriv" function > provided below? I want t

[R] testing the fit of a regression and comparing regressn models

2010-01-21 Thread DispersionMap
I got the usual regression output from a model i did in R. Im looking for alternative test criteria that can be done in R which are not in the standard lm output. I need to: a) asses the fit of a logistic regression model and of a linear regression model b) compare the fit of models against

[R] Retrieving an evaluated gradient value (UNCLASSIFIED)

2010-01-21 Thread Park, Kyong H Mr CIV USA AMC
Classification: UNCLASSIFIED Caveats: NONE Dear R users, How can I retrieve an evaluated gradient value from "deriv" function provided below? I want to retrieve b0 value. Appreciate your help. Kyong junk1<-deriv(~(1/b1)*k-b0/b1,"b0",c("k","b0","b1"),formal=T) junk1(k=0,b0=-14.0236,b1=2.4403

[R] Anova unequal variance

2010-01-21 Thread Peng Yu
I found this paper on ANOVA on unequal error variance. Has this be incorporated to any R package? Is there any textbook that discuss the problem of ANOVA on unequal error variance in general? http://www.jstor.org/stable/2532947?cookieSet=1 __ R-help@r-p

Re: [R] Factor contingency tables

2010-01-21 Thread David Winsemius
On Jan 21, 2010, at 12:38 PM, b k wrote: Hello, I know there must be a simple soluton to this problem but it eludes me currently. My data is partitioned into two subsets, each subset has a common column factor but with varying levels: levels(fdf_ghc$AgeDemo) [1] "26TO35" "36TO45" "46TO55"

Re: [R] Help with subset

2010-01-21 Thread Peter Alspach
Tena koe Jerry I'm not sure exactly what you wish to do, but it would seem you could create a character vector (myVars) containing all your merge field names and then use a for() loop. Something like: for (myV in myVars) { x116 <- subset(napt, Analysis_Soil %in% myV) if (nrow(x116) > 8) {

[R] FW: help with time Series regression please

2010-01-21 Thread snowcat wong
Dear all, I am having difficulty to built a model of quarter sales of spirits data, and deciding which is the best model. The yfit2, yfit3, and yfit4 lines was not appeared right at the end. The data and script is enclosed with this email. I am using the harmonic regression model to e

Re: [R] GARCH AIC

2010-01-21 Thread Stephan Kolassa
Hi David, str(g) gives you a ton of output, and the @fit slot has a $ics component, part of which has the promising name of "AIC"... (g...@fit)$ics[1] HTH, Stephan David Rubins schrieb: Hi, Is there anyway to extract the AIC and BIC from the summary statistics in fGarch package? g <- gar

Re: [R] How to open .rda file in R

2010-01-21 Thread Steve Lianoglou
Hi, 1. Please keep replies on list -- note that you have to click "reply all", not just "reply" 2. For your new problem: On Thu, Jan 21, 2010 at 1:22 PM, AMBUJ wrote: > Hi Steve, > Thankyou for the reply. I still did not get the data from the > file.I executed the following commands:

[R] GARCH AIC

2010-01-21 Thread David Rubins
Hi, Is there anyway to extract the AIC and BIC from the summary statistics in fGarch package? g <- garchfit(data) summary(g) will display the AIC and BIC, but I can't find a way to store those in a variable (in order to loop through different parameters, investigating their effect). Thank you, D

[R] filehash does not install on FreeBSD

2010-01-21 Thread Rainer Hurling
Trying to install package 'filehash' I get the following error on FreeBSD 9.0-CURRENT (amd64) with R version 2.11.0 (2010-01-15 r50990): --- R CMD INSTALL filehash_2.0-1.tar.gz * installing to library '/usr/local/lib/R/library' * installing *source* package 'file

Re: [R] Mutliple sets of data in one dataset....Need a loop?

2010-01-21 Thread Matthew Dowle
> but I have thousands of results so it would be really hand to find away of > doing this quickly > its a little difficult to follow those examples Given your data in data.frame DF, maybe add the following to your list to investigate : > dat = data.table(DF) > dat[, cor(Score1,Score2), by="Expe

[R] Merging and extracting data from list

2010-01-21 Thread Dr. Viviana Menzel
Hello R-help group, I have a question about merging lists. I have two lists: Genes list (hSgenes) namechrstrandstartendtransStarttransEnd symboldescriptionfeature ENSG02239721111874144121187414412 DEAD/H box polypeptide 11 l

Re: [R] Conditional density plot in lattice

2010-01-21 Thread Deepayan Sarkar
On Thu, Jan 21, 2010 at 9:05 AM, Dieter Menne wrote: > Dear group, > > I want to create a plot similar to cdplot or cd_plot I vcd : > > http://addictedtor.free.fr/graphiques/graphcode.php?graph=120 > > with lattice and support for multiple panels. Densities should not be > computed, these are stor

Re: [R] Simple effects with Design / rms ols() function

2010-01-21 Thread Frank E Harrell Jr
Ista Zahn wrote: Hi everyone, I'm having some difficulty getting "simple effects" for the ols() function in the rms package. The example below illustrates my difficulty -- I'll be grateful for any help. #make up some data exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L,

Re: [R] loop on list levels and names

2010-01-21 Thread Matthew Dowle
One way is : dataset = data.table(ssfamed) dataset[, < whatever "some functions" are on Asfc, Smc, epLsar, etc >, by="SPECSHOR,BONE"] Your SPECSHOR and BONE names will be in your result alongside the results of the Or try package plyr which does this sort of thing too. And sqldf may be bett

[R] Simple effects with Design / rms ols() function

2010-01-21 Thread Ista Zahn
Hi everyone, I'm having some difficulty getting "simple effects" for the ols() function in the rms package. The example below illustrates my difficulty -- I'll be grateful for any help. #make up some data exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L

Re: [R] Ask about drawing kernel density estimation

2010-01-21 Thread Dennis Murphy
Hi: Perhaps this is what you were looking for: densityplot(Age ~ Year, data = ages, group = ID, plot.points = FALSE) HTH, Dennis On Thu, Jan 21, 2010 at 7:30 AM, Yi Du wrote: > Hi, > > > I have a data set about age from 2006 to 2009 for certain individual. I > would like to draw the kernel de

Re: [R] How to open .rda file in R

2010-01-21 Thread Steve Lianoglou
Hi, On Thu, Jan 21, 2010 at 11:12 AM, AMBUJ wrote: > Hi, >    I have a file containing gene expressions written using the tillingArray > package. I used load() and attach() to get the data into R. Both of them > works fine. Now I want to see the contents of the file. How can I see the > conten

[R] Factor contingency tables

2010-01-21 Thread b k
Hello, I know there must be a simple soluton to this problem but it eludes me currently. My data is partitioned into two subsets, each subset has a common column factor but with varying levels: levels(fdf_ghc$AgeDemo) [1] "26TO35" "36TO45" "46TO55" "56TO65" "66TO75" "76TO85" levels(fdf_ghcnull$A

Re: [R] Retrieving data through bbg or excel, what is faster?

2010-01-21 Thread jim holtman
Have you timed both solutions? Are you asking us to do you analysis/debugging? It should be easy enough for you to setup a test case and try it. That is what I would have to do to answer your question and I don't use bloomberg. On Wed, Jan 20, 2010 at 2:56 PM, anna wrote: > > Hello, I need to

[R] presence/absence similarities

2010-01-21 Thread Galanidis Alexandros
Greetings to all, I have presence/absence data for species in plots in different years. My matrices looks like that: YEAR1 sp1 sp2 sp3 sp4 11 1 0 1 21 1 1 1 31 1 0 1 41 1 0 1 51 1 0

[R] Conditional density plot in lattice

2010-01-21 Thread Dieter Menne
Dear group, I want to create a plot similar to cdplot or cd_plot I vcd : http://addictedtor.free.fr/graphiques/graphcode.php?graph=120 with lattice and support for multiple panels. Densities should not be computed, these are stored in a data frame as in the example. My current workaround with b

[R] unexpected behaviour of R-2.10.1 regular expression in UTF-8 locale

2010-01-21 Thread axel . klenk
Dear R-helpers, I have encountered the following unexpected behaviour of R-2.10.1, but not R-2.9.0, on both RHEL 4 and Ubuntu Karmic (precompiled via synaptic or built from source). I have a character vector from which I want to extract a certain pattern that is surrounded by junk as in: > nn

Re: [R] Problems completely reading in a "large" sized data set

2010-01-21 Thread jim holtman
Just use what='' in your scan since all your data appears to be character. Also use comment.char='', quote='' if there is the possibility of a misplaced quote or a comment character. I have not problem reading in files of that size. Also use 'count.fields' to see what your file looks like.

Re: [R] Updating R on Linux

2010-01-21 Thread David Winsemius
On Jan 21, 2010, at 11:00 AM, wrote: I know my question has been asked many times. Please, forgive me for asking it once more. It's time to update R version. I run R on Windows, Linux, and Mac OS/X. I think I remember on Windows R comes with the un-installer. So I uninstall it first and t

Re: [R] Problems completely reading in a "large" sized data set

2010-01-21 Thread Charles C. Berry
On Wed, 20 Jan 2010, Robin Jeffries wrote: I have been through the help file archives a number of times, and still cannot figure out what is wrong. I have a tab-delimited text file. 76Mb, so while it's large.. it's not -that- large. I'm running Win7 x64 w/4G RAM and R 2.10.1 When I open this da

Re: [R] Yet another question about importing Excel *.xls files

2010-01-21 Thread Gabor Grothendieck
The error message says that it can't find perl on your system so either you don't have perl or its not on your path. If you don't have it at all install it. If its not on your path either add it to your path or use the perl= argument to read.xls to tell it where to find perl. One of the examples

[R] sp package - How to join two or more polygons from a SpatialPolygonsDataFrames

2010-01-21 Thread Mark Heckmann
I have a SpatialPolygonsDataFrame object (sp package). It contains 40 polygons. Now I want to join some of the polygones. I cannot figure out how to do that? Any ideas? The code below produces a map of Germany and I need to join some counties. library(sp) library(RColorBrewer) # get spatial

Re: [R] Yet another question about importing Excel *.xls files

2010-01-21 Thread Jerry Floren
Hi Gabor, Thanks for all of your help and the additional code. Sorry, about the confusion on my part about the directory and file names. Since my first posts, I have simplified file names, directory names, and the spreadsheets by removing all the worksheets but the one needed. I tried this code

Re: [R] Updating R on Linux

2010-01-21 Thread Paul Hiemstra
mau...@alice.it wrote: I know my question has been asked many times. Please, forgive me for asking it once more. It's time to update R version. I run R on Windows, Linux, and Mac OS/X. I think I remember on Windows R comes with the un-installer. So I uninstall it first and then I install the

Re: [R] barchart with stacked and beside bars

2010-01-21 Thread RICHARD M. HEIBERGER
## There are at least two options, one using mosaic and the other using barchart. ## Here are both. ## this is your data ld<-matrix(c(25,25,50,10,30,60,15,35,50,30,30,40),nrow=4,byrow=T) ntreat2<-c("n0","n96","n0","n96") rownames(ld)<-ntreat2 typ<-c("gr","fo","le") colnames(ld)<-typ ## now some r

[R] How to open .rda file in R

2010-01-21 Thread AMBUJ
Hi,    I have a file containing gene expressions written using the tillingArray package. I used load() and attach() to get the data into R. Both of them works fine. Now I want to see the contents of the file. How can I see the contents of the file? Thankyou for your time. Regards, Ambuj

[R] loop on list levels and names

2010-01-21 Thread Ivan Calandra
Hi everybody! To use some functions, I have to transform my dataset into a list, where each element contains one group, and I have to prepare a list for each variable I have (altogether I have 15 variables, and many entries per factor level) Here is some part of my dataset: SPECSHORBONE

[R] Help with subset

2010-01-21 Thread Jerry Floren
I am so happy about learning how to read in multiple Excel files, that I have to try and make another improvement. I know what I have been doing is clumsy, but it works. Hopefully, someone can suggest a more elegant solution. As a novice, I have been using MS-Word and mail merge to write my code.

Re: [R] CAMAN R package

2010-01-21 Thread Peter Dalgaard
David Winsemius wrote: > > On Jan 18, 2010, at 10:55 PM, David Winsemius wrote: > >> >> On Jan 18, 2010, at 8:58 PM, Jim Silverton wrote: >> >>> Hello everyone, >>> I tried searching for a manual for CAMAN package for mixture models, >>> but was >>> unable to find one. Does anyone have the pdf ma

[R] Updating R on Linux

2010-01-21 Thread mauede
I know my question has been asked many times. Please, forgive me for asking it once more. It's time to update R version. I run R on Windows, Linux, and Mac OS/X. I think I remember on Windows R comes with the un-installer. So I uninstall it first and then I install the latest version. On Mac OS

[R] Ask about drawing kernel density estimation

2010-01-21 Thread Yi Du
Hi, I have a data set about age from 2006 to 2009 for certain individual. I would like to draw the kernel density estimation to age for each year. But I don't know how to draw the different plots in one graph. The data looks like: YearID Age 20061 20 20062 30 2007

Re: [R] Yet another question about importing Excel *.xls files

2010-01-21 Thread Gabor Grothendieck
Based on the information below C:\TestR is not a file. Its a directory. Try any of these three: read.xls(file.choose(), sheet = 3, pattern = "NAPT ID", as.is = TRUE) read.xls("C:\\TestR\\MAP_2009Round2_2002Soiltest9-21-09.xls", sheet = 3, pattern = "NAPT ID", as.is = TRUE) setwd(""C:\\TestR")

Re: [R] why scores are different in rda() and princomp()

2010-01-21 Thread Gavin Simpson
On Thu, 2010-01-21 at 21:56 +0800, echo_july wrote: > hello, >I am doing PCA in R using some habitat factors, and I used the > function result1=rda() and result2=princomp(),then pick up scores of > the result1 and result2 using scores(),but the scores are > significantly different,i do not know

Re: [R] A question

2010-01-21 Thread Wolfgang Amadeus
Hi About your question, I not so clear what your specific context is. So I create a general one for you, hope this can help. a<-function(x,y)sum(x*(10^seq(0,(y-1 You type a(2,4) then you have a(3,5) you have 555 If what you need here is only , you can use a<- an

[R] What is the difference between S and R?

2010-01-21 Thread Peng Yu
On Thu, Jan 21, 2010 at 9:07 AM, Giovanni Petris wrote: > > I have found a good refernce to be "S Programming" by Venables and > Ripley. I'll take a look at this book. Since S and R are not completely the same, there are delicate differences between S and R, which an S book may be confusing if I

Re: [R] Yet another question about importing Excel *.xls files

2010-01-21 Thread Jerry Floren
Thanks Gabor, David, and David for all of your help. I did get it to work with this code that I modified from the R Wiki from Gabor's original suggestion: START OF CODE library(RODBC) ### "setwd" Set the working directory ### setwd("C:/Documents and Settings/jfloren/My D

Re: [R] cross validation function translated from stata

2010-01-21 Thread Frank E Harrell Jr
Take a look at the validate.lrm function in the rms package. Note that the use of threshold probabilities results in an improper scoring rule which will mislead you. Also note that you need to repeat 10-fold CV 50-100 times for precision, and that at each repeat you have to start from zero in

Re: [R] Mutliple sets of data in one dataset....Need a loop?

2010-01-21 Thread BioStudent
Hi Thanks for all your help Its a little difficult to follow those examples as all seem so different and its hard to see how I do what I want to my data from the help files but i'll try... -- View this message in context: http://n4.nabble.com/Mutliple-sets-of-data-in-one-dataset-Need-a-loop-tp1

[R] why scores are different in rda() and princomp()

2010-01-21 Thread echo_july
hello, I am doing PCA in R using some habitat factors, and I used the function result1=rda() and result2=princomp(),then pick up scores of the result1 and result2 using scores(),but the scores are significantly different,i do not know the meaning of it. Best wishes!

Re: [R] cross validation function translated from stata

2010-01-21 Thread Steve Lianoglou
Hi, On Thu, Jan 21, 2010 at 8:55 AM, zhu yao wrote: > Hi, everyone: > > I ask for help about translating a stata program into R. > > The program perform cross validation as it stated. > > #1. Randomly divide the data set into 10 sets of equal size, ensuring equal > numbers of events in each set >

Re: [R] standardizing one variable by dividing each value by the mean - but within levels of a factor

2010-01-21 Thread Dimitri Liakhovitski
Thanks a lot, everyone! On Thu, Jan 21, 2010 at 9:44 AM, hadley wickham wrote: > On Wed, Jan 20, 2010 at 4:37 PM, Dimitri Liakhovitski > wrote: >> Hello! >> >> I have a data frame with a factor and a numeric variable: >> >> x<-data.frame(factor=c("b","b","d","d","e","e"),values=c(1,2,10,20,100,

Re: [R] standardizing one variable by dividing each value by the mean - but within levels of a factor

2010-01-21 Thread hadley wickham
On Wed, Jan 20, 2010 at 4:37 PM, Dimitri Liakhovitski wrote: > Hello! > > I have a data frame with a factor and a numeric variable: > > x<-data.frame(factor=c("b","b","d","d","e","e"),values=c(1,2,10,20,100,200)) > > For each level of "factor" - I would like to divide each value of > "values" by t

Re: [R] standardizing one variable by dividing each value b y the mean -but within levels of a factor

2010-01-21 Thread Jason Smith
Dimitri Liakhovitski gmail.com> writes: > > One follow up question - the proposed solution was (notice - this time > I am introducing one NA in data frame "x") > > x<-data.frame(factor=c("b","b","d","d","e","e"),values=c(1,NA,10,20,100,200)) > x$std.via.ave<-ave(x$values, x$factor, FUN=functio

Re: [R] Yet another question about importing Excel *.xls files

2010-01-21 Thread Jerry Floren
Hi David, Thanks for your response, and I should warn you that both my programming and statistical experience is very limited. I am pretty sure Perl is not installed. I'll take care of that first thing. Thank you so much. Jerry Floren Minnesota Department of Agriculture -- View this message in

  1   2   >