[R] Generate random sample interval

2009-08-23 Thread Tammy Ma
Hi, R users, I have a problem about how to generate random sample interval from a duration. For example, during a time duration 0-70s, I want to generate a sample which last 10s. the sample could be 0-10 or 30-40s or 25-35s etc How could I do it in R`?? Thanks a lot. Tammy __

Re: [R] customizing RGui/Rconsole

2009-08-23 Thread Dieter Menne
Philip A. Viton wrote: > > > Is it possible to change the behavior of RGui/RConsole under MS > Windows so that, if you submit a bunch of commands from a script > window, when they've finished, focus is given to the Console, and not > (as now) to the script? > > That's normally the job of

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread hpdutra
When we ran a regular ANOVA we showed that both mice and raccoons respond positively to cover. So we decided to use raccoons as a co-variate because those are mouse predators and their presence per se could explain part of the variation on mice activity. That is the reason why I'm running this AN

[R] coeftab

2009-08-23 Thread alexander russell
Hello, I'd like to ask: going on from Richard McElreath's coursework in which he says(my paraphrase) basically that the constancy with which a parameter appears satisfactory with respect to its standard error over a series of different models is a good measure of its usefulness, where is the "coeft

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread David Winsemius
On Aug 24, 2009, at 12:24 AM, Steven Kang wrote: Hi David, I have another question regarding the R statement you have provided which is: for (zz in unique(a$xx) ) assign( paste("sub.a", zz, sep="."), sum(subset(a, xx==zz)$xxx) ) If the xx variables were characters instead of nume

Re: [R] read data element from data frame

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 7:30 AM, rami jiossy wrote: Hi; I have a very basic question about reading element from dataframe T (2 dimentional) I want to extract element T[1,1] as a string. T[1,1] returns an element with "names", means header. this i cannot compare with any other list of str

Re: [R] How to generate more triangles in sequences?

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 11:29 PM, Hemavathi Ramulu wrote: Hi everyone, I want to plot some pattern. For example, I have some coding as below, plot(0:11,type="n") polygon(c(6,8,10), c(7,3,5),bor=6) polygon(c(2,4,6), c(5,3,7),bor=6) polygon(c(6,10,8), c(7,9,11),bor=6) polygon(c(2,6,4), c(9,7,11),bor

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 10:51 PM, Steven Kang wrote: > David, apreciate for your help. > > However, the result is not what I was expecting. > > Following on from your code, for example say the input is: > >a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2), > xxx=rep(12:15,1)) > >

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 10:51 PM, Steven Kang wrote: David, apreciate for your help. However, the result is not what I was expecting. Following on from your code, for example say the input is: a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2), xxx=rep(12:15,1)) x y xx x

[R] How to generate more triangles in sequences?

2009-08-23 Thread Hemavathi Ramulu
Hi everyone, I want to plot some pattern. For example, I have some coding as below, plot(0:11,type="n") polygon(c(6,8,10), c(7,3,5),bor=6) polygon(c(2,4,6), c(5,3,7),bor=6) polygon(c(6,10,8), c(7,9,11),bor=6) polygon(c(2,6,4), c(9,7,11),bor=6) This coding will give me four triangles, but how to g

Re: [R] Is there a fast way to do several hundred thousand ANOVA tests?

2009-08-23 Thread Charles C. Berry
On Mon, 24 Aug 2009, big permie wrote: Dear R users, I have a matrix a and a classification vector b such that str(a) num [1:50, 1:80] and str(b) Factor w/ 3 levels "cond1","cond2","cond3" I'd like to do an anova on all 80 columns and record the F statistic for each test; I curren

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread Steven Kang
David, apreciate for your help. However, the result is not what I was expecting. Following on from your code, for example say the input is: a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2), xxx=rep(12:15,1)) x y xx xxx 1 1 4 8 12 2 2 5 9 13 3 3

[R] Textplot question

2009-08-23 Thread mauede
I have a long list of flags with relative values to print out. If I draw it all on a panel of a (2x2) plot it gets chopped at the bottom. I wonder whether it is possible to plot it on two columns. Something like: Flag1 Value1Flag4 Value4 Flag2 Vauel2Flag5 Value5 Flag3 Value3

Re: [R] Is there a fast way to do several hundred thousand ANOVA tests?

2009-08-23 Thread hadley wickham
You might find the article "Computing Thousands of Test Statistics Simultaneously in R" in http://stat-computing.org/newsletter/issues/scgn-18-1.pdf helpful. Hadley On Sun, Aug 23, 2009 at 7:55 PM, big permie wrote: > Dear R users, > > I have a matrix a and a classification vector b such that > >

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 10:12 PM, David Winsemius wrote: On Aug 23, 2009, at 9:56 PM, Steven Kang wrote: Dear R users, I am using "subset" function to filter out specific conditions and would like to use the value of subsetted argument as a name of an object. Specifically, from the followin

Re: [R] Assigning value of subset argument in "subset" function

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 9:56 PM, Steven Kang wrote: Dear R users, I am using "subset" function to filter out specific conditions and would like to use the value of subsetted argument as a name of an object. Specifically, from the following statement: a <- subset(dat, dat$x == "A" & dat$xx

[R] Assigning value of subset argument in "subset" function

2009-08-23 Thread Steven Kang
Dear R users, I am using "subset" function to filter out specific conditions and would like to use the value of subsetted argument as a name of an object. Specifically, from the following statement: a <- subset(dat, dat$x == "A" & dat$xx == 1 & dat$xxx == "AB" & dat$y == "B" & dat$yy == 2)

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread Richard M. Heiberger
Ok, now we can talk. 1. covariates: coon Your model specification put coon sequentially last, effectively testing the hypothesis that the slope associated with coon, after adjusting for all the factors, is zero. My model place coon sequentially first, effectively testing the hypotheses that the

Re: [R] Is there a fast way to do several hundred thousand ANOVA tests?

2009-08-23 Thread glen_b
The usual methods of avoiding loops may provide some speedup (but you've already done the allocation of the full results vector outside the loop, which is probably a major saving) - others may have more detailed advice on that score. Within the loop there are some speedups possible. update() wi

Re: [R] Reading jpeg-files

2009-08-23 Thread Oliver Bandel
Oliver Bandel first.in-berlin.de> writes: > > Hello, > > I want to read jpeg-files to create 2D-histograms of them. > Is there a package available for this binary-input issue? > > Ciao, >Oliver > > "In install.packages("rimages") : package ‘rimages’ is not available" OK, it's "rim

Re: [R] Reading jpeg-files

2009-08-23 Thread Oliver Bandel
Oliver Bandel first.in-berlin.de> writes: > > Hello, > > I want to read jpeg-files to create 2D-histograms of them. > Is there a package available for this binary-input issue? > > Ciao, >Oliver > > Ok, sorry, I now found something in the archive: the rimage-package might be the right

Re: [R] dificult loop "for"

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 4:34 PM, Grzes wrote: Hi, My english isn't briliant and my problem is very dificult to descripe but I try ;) My first question is: May I write loop "for" like this or similar - for (i in sth : sth[length(sth)], k in sth else : length(sth else) ) - I'd like to have

[R] Reading jpeg-files

2009-08-23 Thread Oliver Bandel
Hello, I want to read jpeg-files to create 2D-histograms of them. Is there a package available for this binary-input issue? Ciao, Oliver __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

[R] Is there a fast way to do several hundred thousand ANOVA tests?

2009-08-23 Thread big permie
Dear R users, I have a matrix a and a classification vector b such that > str(a) num [1:50, 1:80] and > str(b) Factor w/ 3 levels "cond1","cond2","cond3" I'd like to do an anova on all 80 columns and record the F statistic for each test; I currently do this using f.stat.vec <- numeric(l

Re: [R] dificult loop "for"

2009-08-23 Thread milton ruser
Hi gregorio, I think you can have nested for() without problem, like: for (i in sth : sth[length(sth)]) { for (k in A:B) { } } or you can build conditional for's like: rangeNegative<-1:10 rangePositive<-1:20 if (rnorm(1)>=0) MYRANGE<-rangePositive if (rnorm(1)<0)

Re: [R] Surpress one panel in lattice plot..?

2009-08-23 Thread Ben Bolker
Fredrik Karlsson wrote: > > Dear list, > > I have a two character vector with two different values in them (two > each, that is). Naturally, when I use these vectors as grouping > factors in a lattice plot, I get four panels. > Now, one of the possible four combinations will never have data, s

Re: [R] LASSO: glmpath and cv.glmpath

2009-08-23 Thread Max Kuhn
The train() function in the caret package can help automate this process. Their are 3 package vignettes and a JSS paper with documentation. See http://cran.r-project.org/web/packages/caret/index.html and www.jstatsoft.org/v28/i05/ If I remember correctly, one of the earlier papers on the lasso

Re: [R] [R-SIG-Finance] study resources for time series?

2009-08-23 Thread Shane Conway
Ruey Tsay's "Analysis of Financial Time Series" is an excellent resource, along with the associated R package FinTS ( http://lib.stat.cmu.edu/R/CRAN/web/packages/FinTS/). You can also find the courses that Tsay teaches at U. Chicago on his homepage, such as this recent course: http://faculty.chica

[R] dificult loop "for"

2009-08-23 Thread Grzes
Hi, My english isn't briliant and my problem is very dificult to descripe but I try ;) My first question is: May I write loop "for" like this or similar - for (i in sth : sth[length(sth)], k in sth else : length(sth else) ) - I'd like to have two independent conditions in the same loop "for".

[R] Surpress one panel in lattice plot..?

2009-08-23 Thread Fredrik Karlsson
Dear list, I have a two character vector with two different values in them (two each, that is). Naturally, when I use these vectors as grouping factors in a lattice plot, I get four panels. Now, one of the possible four combinations will never have data, so one panel will always be empty. So now m

Re: [R] Help on comparing two matrices

2009-08-23 Thread Steve Lianoglou
Hi, On Sun, Aug 23, 2009 at 4:14 PM, Michael Kogan wrote: > Thanks for all the replies! > > Steve: I don't know whether my suggestion is a good one. I'm quite new to > programming, have absolutely no experience and this was the only one I could > think of. :-) I'm not sure whether I'm able to put

Re: [R] A matrix calculation

2009-08-23 Thread Erich Neuwirth
as.vector(t(mat[7:1,])) On Aug 23, 2009, at 9:35 PM, David Winsemius wrote: There is another "matrix" strategy that succeeds, although it is clearly less economical that the transpose approach: matrix(mat[7:1, ], ncol=nrow(mat), byrow=TRUE) # will transpose the matrix I offer this only

[R] R: upgraging R from 2.9.0 to 2.9.1

2009-08-23 Thread mauede
Great ! Then I can wait a couple more days. Anyway, I do not need or want more than one R version at a time. So my question is: How can I avoid having coexisting R versions when I install a new one ? Thank you, Maura -Messaggio originale- Da: Robert Baer [mailto:rb...@atsu.edu] Inviato:

Re: [R] Help on comparing two matrices

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 4:14 PM, Michael Kogan wrote: Thanks for all the replies! Steve: I don't know whether my suggestion is a good one. I'm quite new to programming, have absolutely no experience and this was the only one I could think of. :-) I'm not sure whether I'm able to put your tip

Re: [R] Help on comparing two matrices

2009-08-23 Thread Michael Kogan
Thanks for all the replies! Steve: I don't know whether my suggestion is a good one. I'm quite new to programming, have absolutely no experience and this was the only one I could think of. :-) I'm not sure whether I'm able to put your tips into practice, unfortunately I had no time for much re

Re: [R] upgraging R from 2.9.0 to 2.9.1

2009-08-23 Thread Robert Baer
FWIW, the R homepage says, "R 2.9.2 Release Candidates will appear August 17-24. Final release is scheduled for 2009-08-24." (Tomorrow?) Maybe a short upgrade delay is in order? ;-) On Windows, I routinely install new versions without removing the previous version. They always seem to coexist ha

Re: [R] A matrix calculation

2009-08-23 Thread David Winsemius
There is another "matrix" strategy that succeeds, although it is clearly less economical that the transpose approach: matrix(mat[7:1, ], ncol=nrow(mat), byrow=TRUE) # will transpose the matrix I offer this only as a reminder that the byrow= parameter is available when appropriate. --

Re: [R] A matrix calculation

2009-08-23 Thread Ted Harding
The problem with David's proposal is revealed by: mat[7:1,] # [,1] [,2] [,3] # [1,]7 14 21 # [2,]6 13 20 # [3,]5 12 19 # [4,]4 11 18 # [5,]3 10 17 # [6,]29 16 # [7,]18 15 which simply reverses the rows. Then: c(

Re: [R] A matrix calculation

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 2:53 PM, Bogaso wrote: No no, I actually want following result : 7, 14, 21, 6, 13, 20, 5, 12, 19, Ooops. That is what I thought you wanted, but I didn't check very carefully, did I? c(apply(mat[7:1,],1,I) ) # the I() function just returns "it

Re: [R] A matrix calculation

2009-08-23 Thread Michael Knudsen
On Sun, Aug 23, 2009 at 8:53 PM, Bogaso wrote: > No no, I actually want following result : > > 7,   14,   21, 6,   13,   20, 5,   12,   19, How about this? x = c() for (i in 7:1) x = c(x,mat[i,]) Guess that would do the trick. Best, Michael -- Michael Knudsen micknud...@gmail.com

Re: [R] A matrix calculation

2009-08-23 Thread Peter Dalgaard
Bogaso wrote: No no, I actually want following result : 7, 14, 21, 6, 13, 20, 5, 12, 19, c(t(mat[7:1,])) then. David Winsemius wrote: On Aug 23, 2009, at 2:37 PM, Bogaso wrote: I have suppose a matrix like that mat <- matrix(1:21, 7) mat [,1] [,2] [,3]

Re: [R] A matrix calculation

2009-08-23 Thread Bogaso
No no, I actually want following result : 7, 14, 21, 6, 13, 20, 5, 12, 19, David Winsemius wrote: > > > On Aug 23, 2009, at 2:37 PM, Bogaso wrote: > >> >> I have suppose a matrix like that >> >>> mat <- matrix(1:21, 7) >>> mat >> [,1] [,2] [,3] >> [1,]18

Re: [R] A matrix calculation

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 2:37 PM, Bogaso wrote: I have suppose a matrix like that mat <- matrix(1:21, 7) mat [,1] [,2] [,3] [1,]18 15 [2,]29 16 [3,]3 10 17 [4,]4 11 18 [5,]5 12 19 [6,]6 13 20 [7,]7 14 21 From this matrix, I want t

Re: [R] lrm in Design package, missing value problem

2009-08-23 Thread Frank E Harrell Jr
James Fearon wrote: Hi, This concerns lrm in the Design package, which I need for the clustered errors option with panel data. I have created a variable (using sign()) that has values -1, 0, and 1 (and some NAs). call this variable x3. lrm does not like t = lrm(y ~ x1 + x2 + I(x3==-1) +

[R] A matrix calculation

2009-08-23 Thread Bogaso
I have suppose a matrix like that > mat <- matrix(1:21, 7) > mat [,1] [,2] [,3] [1,]18 15 [2,]29 16 [3,]3 10 17 [4,]4 11 18 [5,]5 12 19 [6,]6 13 20 [7,]7 14 21 >From this matrix, I want to create a vector like tha : c(mat[7,], mat

Re: [R] Problems with loading 'wordnet' in a standalone pc

2009-08-23 Thread Uwe Ligges
Looks like nobody answered so far: Kelvin Lam wrote: Hi group, I have the following error code after submitting library(wordnet) in a standalone pc. rJava is already in place. Please read the posting guide and tell us: - Which version of R? - Which version of wordnet? - Which version of r

Re: [R] install package version compatible with on older version of R

2009-08-23 Thread Uwe Ligges
Renaud Gaujoux wrote: Hi, I'm trying to install Chipster (for microarray analysis: http://chipster.csc.fi/), which expressly relies on R 2.6.1 (for now). So I'd like to install automatically (i.e. using a 'install.packages' like function) the last version of a package compatible with the r

Re: [R] image() generates many border lines in pdf, not on screen (quartz) - R 2.9.1 GUI 1.28 Tiger build 32-bit (5444) - OS X 10.5.8

2009-08-23 Thread Uwe Ligges
Since it looks like nobody answered so far: Your code is not reproducible, we do not have rfc, y, zVals nor NoCols. You could also try to place a screenshot somewhere on a webpage including the info about the settings of the corresponding viewer. Best, Uwe Ligges Andreas Fischlin wrote:

Re: [R] help with functions "spec" and "specprop"

2009-08-23 Thread Uwe Ligges
Looks like nobody answered so far. If you want help: It is a good idea to say which package you are talking about. In a clean R session I get: > specprop Error: object 'specprop' not found > spec Error: object 'spec' not found hence no idea which functions from which package we are talking a

Re: [R] multiple downloads of data when evaluating plot() vs. xyplot()

2009-08-23 Thread Uwe Ligges
Greg Hirson wrote: I have noticed an interesting behavior when comparing how the base plot() function deals with a data argument that downloads data from the internet vs. how xyplot() in lattice performs the same task. The goal is to plot hourly temperature data. The data is downloaded and

Re: [R] "helper" lines in plot. From point to axis.

2009-08-23 Thread Uwe Ligges
Looks like nobody answered so far? If I understood it correctly, you want something like: x <- 1:36 plot(x, log(x, 1.1), xlab="Number of months", ylab="Visits(1000)", main="webpage visits") helper.lines <- function(x, y, lty=2, col="red", text=TRUE){ segments(par("usr")[1], y, x, y, col

Re: [R] using the RODBC for excel

2009-08-23 Thread Uwe Ligges
Han Chin Chan wrote: Hi, I am trying to import data directly from an excel spreadsheet using the RODBC package. I am getting the following error messages, wondering if anyone can help me with it? connection = odbcConnectExcel('D:\\R files\\TestData.xls') tables = sqlTables(connection) tab

Re: [R] Trying something for fun...

2009-08-23 Thread Charles C. Berry
On Sun, 23 Aug 2009, Charles C. Berry wrote: On Sat, 22 Aug 2009, Noah Silverman wrote: And, of course that leads me to another question... With svm {e1071} I can ask the predict function to give me probabilities with lrm {Desigh} I can ask the predict function to give me probabilities

Re: [R] Trying something for fun...

2009-08-23 Thread Charles C. Berry
On Sat, 22 Aug 2009, Noah Silverman wrote: And, of course that leads me to another question... With svm {e1071} I can ask the predict function to give me probabilities with lrm {Desigh} I can ask the predict function to give me probabilities I can't see how to do this with clogit. Would some

[R] lrm in Design package, missing value problem

2009-08-23 Thread James Fearon
Hi, This concerns lrm in the Design package, which I need for the clustered errors option with panel data. I have created a variable (using sign()) that has values -1, 0, and 1 (and some NAs). call this variable x3. lrm does not like t = lrm(y ~ x1 + x2 + I(x3==-1) + I(x3==1), data=data,x

[R] study resources for time series?

2009-08-23 Thread Luna Moon
Hi all, I am looking for study resources for (financial) time series? Hopefully I could find video lectures then it will reduce the learning curve. Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:/

Re: [R] upgraging R from 2.9.0 to 2.9.1

2009-08-23 Thread Marc Schwartz
On Aug 23, 2009, at 11:28 AM, mau...@alice.it wrote: I am still running 2.9.0 and came across a package that was built with 2.9.1. I got a warning upon loading the package. I tried to launch a function from such a package. It seems to hang up. I can't believe it takes forever. I am resolved t

[R] upgraging R from 2.9.0 to 2.9.1

2009-08-23 Thread mauede
I am still running 2.9.0 and came across a package that was built with 2.9.1. I got a warning upon loading the package. I tried to launch a function from such a package. It seems to hang up. I can't believe it takes forever. I am resolved to upgrade my R version to the newest one. But on a Window

Re: [R] lme function problem

2009-08-23 Thread Marc Schwartz
On Aug 23, 2009, at 10:14 AM, Brittany Hall wrote: Hello, I am fairly new to R and having a problem with the lme command. I have searched on forums, read the Fox 2002 chapter, and R help, but the suggestions that I have tried have not helped me. My data file is called Acsdata. This is my

[R] Table in adefor

2009-08-23 Thread Evelina
Dear all, I am trying to run the dudi functions in R (ade4 package) to run an ecological analysis. In particular it is a traits analysis. I am having problems at understanding how to make the table to be read prperly by the software. Example is given in the link below http://pbil.univ-lyon1.fr/AD

[R] customizing RGui/Rconsole

2009-08-23 Thread Philip A. Viton
Is it possible to change the behavior of RGui/RConsole under MS Windows so that, if you submit a bunch of commands from a script window, when they've finished, focus is given to the Console, and not (as now) to the script? Philip A. Viton City Planning, Ohio State Un

[R] lme function problem

2009-08-23 Thread Brittany Hall
Hello,   I am fairly new to R and having a problem with the lme command. I have searched on forums, read the Fox 2002 chapter, and R help, but the suggestions that I have tried have not helped me.   My data file is called Acsdata.   This is my script:   Acsdata.1 <- lme(Acsdata$gsi ~ Acsdata$asi

Re: [R] ggplot2 and mtext question

2009-08-23 Thread Ben Bolker
Data Analytics Corp. wrote: > > Hi, > > In R base graphics, the function mtext can be used to add text to the > margins of a plot. This is very useful for adding notes (such as data > source, sample size, etc.) to the bottom of a graph. How can such notes > be added to the bottom of a gra

[R] lrm in Design package, missing value problem

2009-08-23 Thread James Fearon
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Latest information on how to debug R script

2009-08-23 Thread Marc Schwartz
On Aug 22, 2009, at 7:16 PM, Peng Yu wrote: Hi, http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf There is information on how to debug R. But since it is fairly old, I am wondering what the currently best way for debugging R script. Regards, Peng There are various tools available that a

Re: [R] Call perl from R

2009-08-23 Thread Marc Schwartz
On Aug 22, 2009, at 7:06 PM, Peng Yu wrote: Hi, I see the following package that can help me call perl from R. But the webpage is about 3 years old. I am wondering what the latest package that can help calling perl from R. http://www.omegahat.org/RSPerl/ Regards, Peng RSPerl provides the ab

Re: [R] Convert list to data frame while controlling column types

2009-08-23 Thread Alexander Shenkin
On 8/23/2009 9:58 AM, David Winsemius wrote: > I still have problems with this statement. As I understand R, this should be impossible. I have looked at both you postings and neither of them clarify the issues. How can you have blanks or spaces in an R numeric vector? Just because I search numeri

Re: [R] reading from dataframe?

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 7:39 AM, rami jiossy wrote: Hi; I have a very basic question about reading element from dataframe T (2 dimentional) I want to extract element T[1,1] as a string. T[1,1] returns an element with "names", means header. this i cannot compare with any other list of str

[R] reading from dataframe?

2009-08-23 Thread rami jiossy
Hi; I have a very basic question about reading element from dataframe T (2 dimentional) I want to extract element T[1,1] as a string. T[1,1] returns an element with "names", means header. this i cannot compare with any other list of strings. how can i fix that? Thanks Rami ___

[R] read data element from data frame

2009-08-23 Thread rami jiossy
Hi; I have a very basic question about reading element from dataframe T (2 dimentional) I want to extract element T[1,1] as a string. T[1,1] returns an element with "names", means header. this i cannot compare with any other list of strings. how can i fix that? Thanks Rami __

Re: [R] Convert list to data frame while controlling column types

2009-08-23 Thread David Winsemius
On Aug 23, 2009, at 2:47 AM, Alexander Shenkin wrote: On 8/21/2009 3:04 PM, David Winsemius wrote: On Aug 21, 2009, at 3:41 PM, Alexander Shenkin wrote: Thanks everyone for their replies, both on- and off-list. I should clarify, since I left out some important information. My original dat

Re: [R] how to plot a gains chart in R?

2009-08-23 Thread Uwe Ligges
Since I have been clueless about "gains chart" in Google and found your question message within the first two pages of output, I have the impression that not very many other readers hearded about it. Reading fruther on shows that it might be very related to ROC curves and AUC calculations, hen

Re: [R] Query on Error : subscript out of bounds in Rclimdex

2009-08-23 Thread Uwe Ligges
The posting guide asks you to: "PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." Please also do the latter. Best, Uwe Ligges Bin1aya wrote: Dear All, I am trying for indices calculation in Rc

Re: [R] Function "nsl()" missing in package utils

2009-08-23 Thread Uwe Ligges
nsl is not available on all platforms since it is located in ".../Rsources/src/library/utils/R/unix" Please make use of OS functionality in order to do hostname lookup. Best, Uwe Ligges Janko Thyson wrote: Dear list, today I stumbled across the function „nsl()” for the first time in order t

[R] ggplot2 and mtext question

2009-08-23 Thread Data Analytics Corp.
Hi, In R base graphics, the function mtext can be used to add text to the margins of a plot. This is very useful for adding notes (such as data source, sample size, etc.) to the bottom of a graph. How can such notes be added to the bottom of a graph when using ggplot2? Thanks, Walt --

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread hpdutra
What does the command c:\progra~1\R\R-2.9.1\bin\Rgui --vanilla do? At first I thought that I could run it from R. But then it did not work. I'm using a mac, and I don't know how access MSDOS in a mac. I actually installed R on the pc and tried to run the command from MSDOS and it also didn't wor

Re: [R] draw two density functions at one graph

2009-08-23 Thread Jim Lemon
sendona essile wrote: I want to draw two density functions on the same graph. One of the densities is produced by density() and the other one is produced by logspline() . I want to show one of them by solid line and the other one by dashed line, but both of them on one graph. Sorry if this is

[R] my email

2009-08-23 Thread assaedi76 assaedi76
my email assaed...@yahoo.com [[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 http://www.R-project.org/posting-guide.html and prov

Re: [R] integer and character conversion

2009-08-23 Thread Gabor Grothendieck
Its not being stored as an integer. Its being stored as a double. If it were stored as an integer you would not get the e: > as.character(10L) [1] "10" > as.character(as.integer(10)) [1] "10" On Sat, Aug 22, 2009 at 7:13 PM, Dajiang J. Liu wrote: > Dear all,I wan

[R] draw two density functions at one graph

2009-08-23 Thread sendona essile
I want to draw two density functions on the same graph. One of the densities is produced by density() and the other one is produced by logspline() . I want to show one of them by solid line and the other one by dashed line, but both of them on one graph. Sorry if this is plane and trivial, I don

Re: [R] using loglog link in VGAM or creating loglog link for GLM

2009-08-23 Thread Gavin Simpson
On Fri, 2009-08-21 at 18:27 -0400, Kendra Walker wrote: > > I am trying to figure out how to apply a loglog link to a binomial > model (dichotomous response variable with far more zeros than ones). > I am aware that there are several relevant posts on this list, but I > am afraid I need a l

Re: [R] Mann Kendall test for time series data

2009-08-23 Thread Gavin Simpson
On Fri, 2009-08-21 at 20:59 -0700, Bin1aya wrote: > Dear All, > > I do not know how to perform Mann kendall test with climate data. Using > Rclimdex i have got trends of temperature and precipitation. Now I would > like to know how significant is trend at 95% level of significance. So > please sug

Re: [R] When factor is better than other types, such as vector and frame?

2009-08-23 Thread Patrick Connolly
On Sat, 22-Aug-2009 at 10:00PM -0500, Peng Yu wrote: |> Hi, |> |> It is easy to understand the types vector and frame. Types of what? Class of object? Doesn't seem likely. What do you mean by frame? It's a function, and a vector can be a factor, numeric, logical or character (and probably a

Re: [R] When factor is better than other types, such as vector and frame?

2009-08-23 Thread Paul Hiemstra
Peng Yu schreef: Hi, It is easy to understand the types vector and frame. But I am wondering why the type factor is designed in R. What is the advantage of factor compare with other data types in R? Can somebody give an example in which case the type factor is much better than other data types?