[R] where I can find more color names or color definition?

2012-03-15 Thread Henrik Pärn
Another alternative: http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.pdf http://research.stowers-institute.org/efg/R/Color/Chart/ Best regards, Henrik hi everyone . Now I want to draw several lines in one frame.And it seems needs more colors except for blue red,black .Wher

Re: [R] expand.grid using a matrix and a vector as input

2012-03-15 Thread Dimitris Rizopoulos
One possibility is to use something like the following: a1 <- matrix(1:4, 2, 2) a2 <- c(8, 9) cbind(a1[rep(1:nrow(a1), length(a2)), ], rep(a2, each = nrow(a1))) I hope it helps. Best, Dimitris On 3/15/2012 1:33 PM, eugen pircalabelu wrote: Hello R-users, I have the following question, fo

Re: [R] Average row and column

2012-03-15 Thread Petr PIKAL
Hi > > Hello > > I have this code for the count the occurrences between V_source and > V_destine, its can possible make the same, but in local the total the > occurrences to appear the mean or the minimum Your question is rather cryptic and I am rather confused what you really want. For row/co

Re: [R] Improving help in R

2012-03-15 Thread Duncan Murdoch
On 12-03-14 6:39 PM, Tomáš Křehlík wrote: Hello R people I always wander what other people say about the R help. Finally after some years of using, I decided that it is probably time to try to do something about it, because the feeling of gritting teeth does not go away with years of usage. :

Re: [R] climate data, Netcdf

2012-03-15 Thread Roy Mendelssohn
Hi Amen: On Mar 15, 2012, at 2:19 AM, Amen wrote: > I am a PhD student working on global scale. I am working at INRA in France.I > am new to R > > I downloaded a netcdf file cruncep_tair_2010.nc.gz from > http://dods.extra.cea.fr/data/p529viov/cruncep/t2m/ > > in this file, tempera

Re: [R] how to assign "writeLines" function

2012-03-15 Thread R. Michael Weylandt
I'm not sure what writeLines is for here(); just a <- strwrap(k, width = 80, indent = 7, exdent = 6) if I understand you correctly. cat(a, "\n"") Michael On Thu, Mar 15, 2012 at 5:13 AM, mrzung wrote: > hi, > what I want to do is assigning following code to any object. > > k<-paste("thank") > >

Re: [R] how to bind uneven column (not equal length) into matrix without recycling values

2012-03-15 Thread Gabor Grothendieck
On Thu, Mar 15, 2012 at 5:08 AM, sagarnikam123 wrote: > i have >> x > [1] 1 2 3 4 5 6 >> y > [1] 34  5  6 >> z<-cbind(x,y) >> z >     x  y > [1,] 1 34 > [2,] 2  5 > [3,] 3  6 > [4,] 4 34 > [5,] 5  5 > [6,] 6  6 > > i don't want recycling, instead can we put NA /0 like below> z >     x  y > [1,] 1

Re: [R] Integrate inside function

2012-03-15 Thread R. Michael Weylandt
I believe the difficulty is that the integrate function isn't vectorized: add this line and you should be good pmixedgamma3 <- Vectorize(pmixedgamma3) Read ? Vectorize for details if you only need to vectorize certain arguments. Michael On Thu, Mar 15, 2012 at 6:08 AM, Mauro Rossi wrote: > Dea

Re: [R] R CMD Rd2pdf [options] files

2012-03-15 Thread Duncan Murdoch
On 12-03-14 11:58 PM, casperyc wrote: Hi all, Sorry if I seem a bit pissed because I am! I'd recommend calming down, and explaining the problem clearly. You tell us about the research you did, but you don't say: 1. What exactly did you do? 2. What was the result? Without those two bits

Re: [R] Subtract Date Between columns

2012-03-15 Thread Jim Holtman
use POSIXct instead Sent from my iPad On Mar 15, 2012, at 6:21, MSousa wrote: > Hello > > I have this little dataset, my goal is create one column in the > data.frame with between the diference DataTime and Duration. > I'm using the next code to make do this > > TIME_STAMP SESSIONTIME

Re: [R] gam - Y axis probability scale with confidence/error lines

2012-03-15 Thread ONKELINX, Thierry
I find plogis() is easier to remember all.equal(binomial()$linkinv(seq(-2, 2, length = 101)), plogis(seq(-2, 2, length = 101))) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assu

[R] expand.grid using a matrix and a vector as input

2012-03-15 Thread eugen pircalabelu
  Hello R-users,   I have the following question, for which my search did not really return any usable result. If I have a matrix a1, and a vector a2 like below   a1<-matrix(c(1:4),2,2) a2<-c(8,9)   is there any function like the expand.grid (or some clever calling of the function) such that it

Re: [R] how to bind uneven column (not equal length) into matrix without recycling values

2012-03-15 Thread Berend Hasselman
On 15-03-2012, at 10:08, sagarnikam123 wrote: > i have >> x > [1] 1 2 3 4 5 6 >> y > [1] 34 5 6 >> z<-cbind(x,y) >> z > x y > [1,] 1 34 > [2,] 2 5 > [3,] 3 6 > [4,] 4 34 > [5,] 5 5 > [6,] 6 6 > > i don't want recycling, instead can we put NA /0 like below> z > x y > [1,] 1 34 >

[R] Average row and column

2012-03-15 Thread MSousa
Hello I have this code for the count the occurrences between V_source and V_destine, its can possible make the same, but in local the total the occurrences to appear the mean or the minimum Dataset df.v_source df.v_destine df.dif 1 33 4 2 7

[R] PCA R

2012-03-15 Thread Samantha Allcock
Hello can anyone help, I have been running the following script to obtain a PCA plot but the end result is rather disappointing as the points are very very small and there are no titles etc geochemdata<-read.csv(file.choose(),header=TRUE) names(geochemdata) library(vegan) bstick<-function(n,

Re: [R] lme code help

2012-03-15 Thread ONKELINX, Thierry
You want lme(logSSP~logM + K,random=~logM + K|species,data=data1) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium +

[R] Subtract Date Between columns

2012-03-15 Thread MSousa
Hello I have this little dataset, my goal is create one column in the data.frame with between the diference DataTime and Duration. I'm using the next code to make do this TIME_STAMP SESSIONTIMETime TimeStart 1162343932 83202006-10-31 19:01:34 20

[R] how to assign "writeLines" function

2012-03-15 Thread mrzung
hi, what I want to do is assigning following code to any object. k<-paste("thank") writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) To assign the "writeLines" code, I try this a<-writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) or assign(a,writeLines(strwrap(k, width = 80,ind

[R] How to choose the most 2 different samples in an array experiment

2012-03-15 Thread ali_protocol
Dear all, What test should be done on ~40 samples (matrixes of 400x1), each in triplicate, to determine which sample is the most different to all samples? and What test should be done to determine the two samples which are most different? -- View this message in context: http://r.789695.n4.nab

[R] how to bind uneven column (not equal length) into matrix without recycling values

2012-03-15 Thread sagarnikam123
i have > x [1] 1 2 3 4 5 6 > y [1] 34 5 6 > z<-cbind(x,y) > z x y [1,] 1 34 [2,] 2 5 [3,] 3 6 [4,] 4 34 [5,] 5 5 [6,] 6 6 i don't want recycling, instead can we put NA /0 like below> z x y [1,] 1 34 [2,] 2 5 [3,] 3 6 [4,] 4 NA [5,] 5 NA [6,] 6 NA & want distance matrix -

[R] Using Metropolis Hastings to calculate integration

2012-03-15 Thread Dinh Tuan
Hi list members, I have a question about application of Metropolis-Hastings (MH) algorithm in R. It is said that using this kind of algorithm (MCMC), one can integrate any complexe function. Is it true ? And how can I proceed with a whole new one function, which does not include any obvious probab

[R] climate data, Netcdf

2012-03-15 Thread Amen
I am a PhD student working on global scale. I am working at INRA in France.I am new to R I downloaded a netcdf file cruncep_tair_2010.nc.gz from http://dods.extra.cea.fr/data/p529viov/cruncep/t2m/ in this file, temperature was measured every 6 hours for 2010, I want to convert to dail

Re: [R] substituting own test statistics in a built-in function

2012-03-15 Thread Sarah Goslee
Hi, On Mar 15, 2012 4:28 AM, "Aparna Sampath" wrote: > > Hi All > > I would like to compute the raw p-value from permutation tests and I found > mt.sample.rawp() from the package multtest almost similar to what I want to > do. But in the function definition: > > mt.sample.rawp(V,classlabel,test="t

Re: [R] Visualising multiple response contingency tables

2012-03-15 Thread Marcos Pelenur
Dear Ilai, Thank you for your helpfulresponse. My question had two parts. 1. Are mosaic plots a good way to visualise multiple response data? Or are there better alternatives? 2. How can I do my modified chi-square tests in R (which you were able answer, so thank you very much :) ) All the best,

Re: [R] Improving help in R

2012-03-15 Thread Berend Hasselman
On 14-03-2012, at 23:39, Tomáš Křehlík wrote: > Hello R people > > I always wander what other people say about the R help. Finally after some > years of using, I decided that it is probably time to try to do something > about it, because the feeling of gritting teeth does not go away with year

[R] Integrate inside function

2012-03-15 Thread Mauro Rossi
Dear R users, first I take this opportunity to greet all the R community for your continuous efforts. I wrote a function to calculate the pdf and cdf of a custom distribution (mixed gamma model). The function is the following: pmixedgamma3 <- function(y, shape1, rate1, shape2, rate2, prev)

Re: [R] Creat a new list with names of other list

2012-03-15 Thread Petr Savicky
On Thu, Mar 15, 2012 at 01:44:10AM -0700, ali_protocol wrote: > Hi all, > > I want to create a new list with names of another list. Eeach sublist from > both lists is a matrix, but the matrices with the same name (eg. list.1 > [[1]] and list.2 [[1]]) have different dimensions. How can I create th

Re: [R] Source code

2012-03-15 Thread Joshua Wiley
Hi, function is a primitive, so seeing its source will take some work. See page 43 of http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf for a guide on viewing compiled code sources. Cheers, Josh On Thu, Mar 15, 2012 at 1:05 AM, AnaKar wrote: > Hi everyone, > I need to see the source code of

Re: [R] Source code

2012-03-15 Thread Petr PIKAL
Hi > > Hi everyone, > I need to see the source code of "function" > Does anybody know how can I find so. > Thanks a lot. What function? mean.default function (x, trim = 0, na.rm = FALSE, ...) { if (!is.numeric(x) && !is.complex(x) && !is.logical(x)) { warning("argument is not n

Re: [R] Improving help in R

2012-03-15 Thread Barry Rowlingson
2012/3/14 Tomáš Křehlík : > Hello R people > I get the feeling (by some experience with learning programming languages > when I am not primarily a programmer but economist/statistician) that > structure of help really helps and I would like to have it to go in the way > > basic syntax (by basic

[R] Creat a new list with names of other list

2012-03-15 Thread ali_protocol
Hi all, I want to create a new list with names of another list. Eeach sublist from both lists is a matrix, but the matrices with the same name (eg. list.1 [[1]] and list.2 [[1]]) have different dimensions. How can I create the 2nd list? tSE = list () Norm <- names(Normal) names(tSE) <- Norm

Re: [R] Equation as a character string

2012-03-15 Thread Joshua Wiley
Hi Emily, Yes (see below), but you might be better off by writing a simple function. Here are examples both ways (usually eval parse is highly discouraged). Cheers, Josh # eqn1string <- "x^2 + x + 5" x <- 6 ## works eval(parse(text = eqn1string)) ## better f <- functio

[R] Error in prune in the rEMM package

2012-03-15 Thread vioravis
I am trying to use rEMM package for the Extensible Markov Models. I tried the following sequence of code: emmt=EMM(measure="euclidean",threshold=0.75,lambda=0.001) emmt=build(emmt,data) new_threshold=sum(cluster_counts(emmt))*0.002 emmt_ new=prune(emmt,new_threshold) However, I get the following

[R] Source code

2012-03-15 Thread AnaKar
Hi everyone, I need to see the source code of "function" Does anybody know how can I find so. Thanks a lot. -- View this message in context: http://r.789695.n4.nabble.com/Source-code-tp4474173p4474173.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Equation as a character string

2012-03-15 Thread Emily Weiser
I'm trying to figure out if it's possible to use a character string as an equation, e.g: eqn1string <- "x^2 + x + 5" Then I want to tell R: 1) that eqn1string is actually an equation (even though it was stored as a character string), and 2) to apply the equation to a specified value of x (e.g. g

[R] substituting own test statistics in a built-in function

2012-03-15 Thread Aparna Sampath
Hi All I would like to compute the raw p-value from permutation tests and I found mt.sample.rawp() from the package multtest almost similar to what I want to do. But in the function definition: mt.sample.rawp(V,classlabel,test="t",side="abs",fixed.seed.sampling="y",B=1,na=.mt.naNUM,nonpara="n

Re: [R] aggregate

2012-03-15 Thread Petr PIKAL
Hi > Dear all I am having a vector with large length and I would like to ask > you if I can aggregate the values by constant sized windows. For example > for the following vector, I would like to take 30 points until the end > and find their mean. > > > > myData<-seq(1:10) > > > > c(mean(

Re: [R] Improving help in R

2012-03-15 Thread Patrick Connolly
On Wed, 14-Mar-2012 at 11:39PM +0100, Tomáš Křehlík wrote: |> Hello R people |> [...] |> The best documentation that I ever used is probably one of |> Mathematica, look for example here |> http://reference.wolfram.com/mathematica/ref/Fit.html (it is |> somehow related to the stuff below). [..

Re: [R] how to dev.off() all devices

2012-03-15 Thread Prof Brian Ripley
On 15/03/2012 07:36, Alaios wrote: Dear all, I would like at the beginning of my code to turn off all the remaining open devices. How can I do that by using dev.off()? See the help page. Hint: there is a function graphics.off() on the same page. I would like to thank you in advance for you

Re: [R] how to dev.off() all devices

2012-03-15 Thread baptiste auguie
Hi, Try this, replicate(sample(10,1), dev.new()) graphics.off() HTH, baptiste On 15 March 2012 20:36, Alaios wrote: > Dear all, > I would like at the beginning of my code to turn off all the remaining open > devices. > > How can I do that by using dev.off()? > > I would like to thank you in a

Re: [R] Help with operation on list of matrices

2012-03-15 Thread Petr Savicky
On Wed, Mar 14, 2012 at 09:10:49PM -0400, Axel Urbiz wrote: > I'll appreciate your help on this. I have values stored in a list as in > "mylist" below. I need to sum the values over all elements of the list > aggregated by the names of the matrices. > mylist <- list(matrix(c(0.2, 0.4), 1, 2, dimnam

[R] how to dev.off() all devices

2012-03-15 Thread Alaios
Dear all, I would like at the beginning of my code to turn off all the remaining open devices. How can I do that by using dev.off()? I would like to thank you in advance for your help B.R Alex [[alternative HTML version deleted]] __ R-help@r

<    1   2