Re: [R] help with rle function on paired data

2012-06-08 Thread raishilpa
hello, I have a question regarding the function WebCorpus..When I am using this function its showing error: couldnt find the function...I have downloaded the tm package...Can you help me in this regard? Also I want to know how we can data/information about a product or topic from google,facebook e

[R] Re : Matrix package loading problem "Error : object ‘kronecker’ is not exported by 'namespace:methods'"

2012-06-08 Thread Pascal Oettli
Hello, Did you upgrade your R version from a previous one to the current one? If yes, probably you should use: > update.packages(checkBuilt=TRUE). Best Regards, Pascal - Mail original - De : RobMusk À : r-help@r-project.org Cc : Envoyé le : Samedi 9 juin 2012 9h52 Objet : [R] Matri

[R] mapping sequence data R

2012-06-08 Thread amuznetin
Hello, I am new to R appreciate all the help from the R experts in the forum I am doing a click tracking project , the click tracking tracks the click, mouse over events . I am tracking what are the follow up events before some one clicks on the main zone 4 from which we generate the revenue

[R] Round down to earliest hour or half hour

2012-06-08 Thread Phil Hurvitz
I wanted to round rather than truncate timestamps # create a data set to work with s <- 30 * rnorm(10, 1, 0.1) gps.timestamp <- Sys.time() + s*1:10 gps.timestamp <- c(round(gps.timestamp[1], "min"), gps.timestamp, as.POSIXct("2012-06-08 17:32:59"), as.POSIXct("2012-06-08 17:32:30")) f <- funct

Re: [R] Percent of a given subset

2012-06-08 Thread Rolf Turner
There are almost surely a brazillion ways. Here's one: Call your data frame "X". Do: XT <- xtabs(AvailableMW~Bands+FuelTypeNum,data=X) PXT <- 100*XT/apply(XT,1,sum) print(round(PXT,2)) This gives percent of fuel type 1 in band PB0 as 0.54 53.87 3.93 41.65 to two decimal places

[R] Help with permutation function from Turner et al. 2010 (Ecology)

2012-06-08 Thread Ashley Stasko
Hello, I'm using R code that includes a residual permutation that was written as a supplement to the paper: Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233. The supplemental code is available at: http://www.esa

[R] Matrix package loading problem "Error : object ‘kronecker’ is not exported by 'namespace:methods'"

2012-06-08 Thread RobMusk
Hi R users all , I have a clean install of R-2.15.0 in a win32 machine and a problem loading Matrix 1.0-6 that looks like this: > library(Matrix) Loading required package: lattice Error : object ‘kronecker’ is not exported by 'namespace:methods' Error: package/namespace load failed for ‘Matrix’ >

Re: [R] Percent of a given subset

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 6:15 PM, jcrosbie wrote: How would I find the Percent of FuelTypeNum within the Band given AvailableMW? example: type 1 is 1% of PB0 type 2 is 54% of PB0 type 4 is 4% of PB0 type 5 is 42% of PB0 format( 100*prop.table(table(dfrm$FuelTypeNum)), 0 ) ... should do

Re: [R] how to print global index from tapply function?

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 4:22 PM, Angelr wrote: Hi, the global row indexing for my cluster assignment is as : buf <- tapply(test1, test2, FUN = function(x){x;}) $`1` [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $`2` [1] 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

Re: [R] help with rle function on paired data

2012-06-08 Thread Peter Ehlers
On 2012-06-08 14:33, Steve E. wrote: Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values repea

[R] Percent of a given subset

2012-06-08 Thread jcrosbie
How would I find the Percent of FuelTypeNum within the Band given AvailableMW? example: type 1 is 1% of PB0 type 2 is 54% of PB0 type 4 is 4% of PB0 type 5 is 42% of PB0 Note: the Bands and fuel types are not always constant. Data: FuelTypeNum Bands AvailableMW Avai

[R] help with rle function on paired data

2012-06-08 Thread Steve E.
Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values repeat and I am interested only in the value

[R] how to print global index from tapply function?

2012-06-08 Thread Angelr
Hi, the global row indexing for my cluster assignment is as : buf <- tapply(test1, test2, FUN = function(x){x;}) $`1` [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $`2` [1] 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 I used "tapply" function to find minimum as:

Re: [R] How to build a large identity matrix faster?

2012-06-08 Thread R. Michael Weylandt
On Fri, Jun 8, 2012 at 5:31 PM, R. Michael Weylandt wrote: > For the matter and hand, you can probably get to it by simply trying > base:::diag. In this case, it's not too hard because what you're > seeing is the S4 generic that the Matrix package is defining _over_ > the regular base function gen

Re: [R] How to build a large identity matrix faster?

2012-06-08 Thread R. Michael Weylandt
For the matter and hand, you can probably get to it by simply trying base:::diag. In this case, it's not too hard because what you're seeing is the S4 generic that the Matrix package is defining _over_ the regular base function generic. More generally, going down the rabbit hole of S4: As it sugg

Re: [R] How to build a large identity matrix faster?

2012-06-08 Thread Spencer Graves
How can one get the source code for diag? I tried the following: > diag standardGeneric for "diag" defined from package "base" function (x = 1, nrow, ncol) standardGeneric("diag") Methods may be defined for arguments: x, nrow, ncol Use showMethods("diag") for currently available ones.

Re: [R] How to build a large identity matrix faster?

2012-06-08 Thread Uwe Ligges
I quickly looked at it, and the difference comes from: n <- 5e3 system.time(x <- array(0, c(n, n))) # from diag() system.time(x <- matrix(0, n, n)) # from Rdiag() Replaced in R-devel. Best, Uwe Ligges On 07.06.2012 12:11, Spencer Graves wrote: On 6/7/2012 2:27 AM, Rui Barradas wrote: Hel

Re: [R] remove leading slash

2012-06-08 Thread Ben quant
Yes, I've been messing with that. I've also been using the hexView package. Reading as characters first is just helping me figure out the structure of this binary file. In this situation it really helped. For example: È \001 \002 20012 This probably isn't how I'll do it in my final dra

Re: [R] remove leading slash

2012-06-08 Thread William Dunlap
When reading binary files, it is usually best to use readBin's what=, size=, signed=, and endian= arguments to get what you want. Reading as characters and then converting them as you are doing is a very hard way to do things (and this particular conversion doesn't make much sense). Bill Dunlap Sp

Re: [R] ggplot incorrect legend

2012-06-08 Thread jcrosbie
Thank you, that was very helpful. Would it be possible to rename the legend values as well. Example 1 as Biomass, 2 as coal, 4 as gas, 5 as hydro? ggplot(data=tempTable, aes(x=Bands8, y=AvailableMWNewFormat, fill=as.factor(FuelTypeNum))) + geom_bar(position="stack", stat="identity")+ guides(

Re: [R] remove leading slash

2012-06-08 Thread Ben quant
Okay, Bill smelt something wrong, so I must revise. This works for large numbers: prds = sapply(sapply(cnt_str,charToRaw),as.integer) PS - this also solves an issue I've been having elsewhere... PPS- Bill - I'm reading binary files...and learning. thanks! ben On Fri, Jun 8, 2012 at 12:16 PM,

Re: [R] "Re-creating" distributions

2012-06-08 Thread Özgür Asar
Of course, if you have data points at hand. Thanks Bert, for pointing out. Ozgur -- View this message in context: http://r.789695.n4.nabble.com/Re-creating-distributions-tp4632739p4632849.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] remove leading slash

2012-06-08 Thread William Dunlap
Can you tell us why you are interested in this mapping? I.e., how did the "\001" and "\102" arise and why do you want to convert them to the integers 1 and 102? Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] remove leading slash

2012-06-08 Thread Ben quant
Thanks for all your help. I did it this way: > x = sapply(cnt_str,deparse) > x \002\001\002 "\"\\002\"" "\"\\001\"" "\"\\102\"" > as.numeric(substr(x,3,5)) [1] 2 1 102 ...which is a bit of a hack, but gets me where I want to go. Thanks, Ben On Fri, Jun 8, 2012 at 11:

Re: [R] remove leading slash

2012-06-08 Thread Duncan Murdoch
On 08/06/2012 1:50 PM, Peter Langfelder wrote: On Fri, Jun 8, 2012 at 10:25 AM, David Winsemius wrote: > > On Jun 8, 2012, at 1:11 PM, Ben quant wrote: > >> Hello, >> >> How do I change this: >>> >>> cnt_str >> >> [1] "\002" "\001" "\102" >> >> ...to this: >>> >>> cnt_str >> >> [1] "2" "

Re: [R] remove leading slash

2012-06-08 Thread peter dalgaard
On Jun 8, 2012, at 19:25 , David Winsemius wrote: > > On Jun 8, 2012, at 1:11 PM, Ben quant wrote: > >> Hello, >> >> How do I change this: >>> cnt_str >> [1] "\002" "\001" "\102" >> >> ...to this: >>> cnt_str >> [1] "2" "1" "102" >> >> Having trouble because of this: >>> nchar(cnt_str[1]) >>

Re: [R] remove leading slash

2012-06-08 Thread Peter Langfelder
On Fri, Jun 8, 2012 at 10:25 AM, David Winsemius wrote: > > On Jun 8, 2012, at 1:11 PM, Ben quant wrote: > >> Hello, >> >> How do I change this: >>> >>> cnt_str >> >> [1] "\002" "\001" "\102" >> >> ...to this: >>> >>> cnt_str >> >> [1] "2" "1" "102" >> >> Having trouble because of this: >>> >>> nc

Re: [R] remove leading slash

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 1:11 PM, Ben quant wrote: Hello, How do I change this: cnt_str [1] "\002" "\001" "\102" ...to this: cnt_str [1] "2" "1" "102" Having trouble because of this: nchar(cnt_str[1]) [1] 1 "\001" is ASCII cntrl-A, a single character. ?Quotes # not the first, second or

[R] remove leading slash

2012-06-08 Thread Ben quant
Hello, How do I change this: > cnt_str [1] "\002" "\001" "\102" ...to this: > cnt_str [1] "2" "1" "102" Having trouble because of this: > nchar(cnt_str[1]) [1] 1 Thanks! Ben [[alternative HTML version deleted]] __ R-help@r-project.org maili

Re: [R] any certification for R language

2012-06-08 Thread John Kane
I doubt that there is anythig like certfication in R The same applies for interview questions. For tutorials just google "r statistics tutorial" John Kane Kingston ON Canada > -Original Message- > From: sagarnikam...@gmail.com > Sent: Fri, 8 Jun 2012 02:48:09 -0700 (PDT) > To: r-help@r

Re: [R] Problem with sample function

2012-06-08 Thread Guido Leoni
yes you are right it was my inattention it is friday and my head needs to start the week end sorry;-) 2012/6/8 David Winsemius > > On Jun 8, 2012, at 12:33 PM, Guido Leoni wrote: > > Dear list >> Is there a way to extract a random sample without duplicated row from a >> dataframe ?. >> a

Re: [R] Problem with sample function

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 12:33 PM, Guido Leoni wrote: Dear list Is there a way to extract a random sample without duplicated row from a dataframe ?. a=c(1,2,3,1,1,1,2,1) b=c(1,2,3,1,2,1,2,1) c=c(1,1,1,1,1,1,1,1) d=c(1,2,3,1,1,1,2,1) prov<-data.frame(a,b,c,d) prov2<-prov[sample(1:nrow(prov),5,repl

Re: [R] Problem with sample function

2012-06-08 Thread Özgür Asar
Dear Guido, Try prov2<-prov[sample(1:nrow(prov),5,replace=F),] which corresponds to without replacement sampling. Best Ozgur -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-sample-function-tp4632835p4632836.html Sent from the R help mailing list archive at Nabble.

[R] Problem with sample function

2012-06-08 Thread Guido Leoni
Dear list Is there a way to extract a random sample without duplicated row from a dataframe ?. a=c(1,2,3,1,1,1,2,1) b=c(1,2,3,1,2,1,2,1) c=c(1,1,1,1,1,1,1,1) d=c(1,2,3,1,1,1,2,1) prov<-data.frame(a,b,c,d) prov2<-prov[sample(1:nrow(prov),5,replace=T),] prov2 a b c d 3 3 3 1 3 6 1 1 1 1

Re: [R] Problems when install ROCR

2012-06-08 Thread Martin Morgan
On 06/08/2012 07:39 AM, R. Michael Weylandt wrote: Well, I know that ROCR and gplots are on CRAN so you should probably be installing them with install.packages() on your magical and unspecified OS and version of R. I don't really know the details, but you might check the version / reinstall g

Re: [R] "Re-creating" distributions

2012-06-08 Thread Özgür Asar
Dear Andras, A possible option might be checking the fit of your data to a specific distribution and generating the data from the distribution to which your data fit, with the parameters such as the MLE of them obtained by using the avaiable data. For instance, you can check whether your data is

Re: [R] Testing relationships in logistic regression

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 11:33 AM, Peter Milne wrote: I am interested in knowing whether and how I can test the significance of the relationship between my continuous predictor variable (a covariate) and my binary response variable according to two different groups, my categorical predictor varia

Re: [R] Holt Winters in R - Help needed

2012-06-08 Thread R. Michael Weylandt
You need to set the frequency attribute of your time series. E.g., HoltWinters(ts(sample(100))) HoltWinters(ts(sample(100), frequency = 4)) # Quarterly data See ?ts for what frequency is and to figure out what makes sense for your problem. Best, Michael On Fri, Jun 8, 2012 at 9:49 AM, anindya

[R] Fwd: How to best analyze dataset with zero-inflated loglinear dependent variable?

2012-06-08 Thread Iuri Gavronski
Dear netters, Sorry for cross-posting this question. I am sure R-Help is not a research methods discussion list, but we have many statisticians in the list and I would like to hear from them. Any function/package in R would be able to deal with the problem from this researcher? -- Forward

Re: [R] noob requesting help

2012-06-08 Thread Rui Barradas
Hello, Try something along the lines of res <- lapply(split(dat, list(dat$id, dat$trip)), function(x) x[x$time == min(x$time), ]) do.call(rbind, res) Note that 'data' is an R function, so I've called it 'dat'. And that the column names are not exactly the same. Also, you should follow the

[R] Testing relationships in logistic regression

2012-06-08 Thread Peter Milne
I am interested in knowing whether and how I can test the significance of the relationship between my continuous predictor variable (a covariate) and my binary response variable according to two different groups, my categorical predictor variable, in a logistic regression model (glm). Specifically,

Re: [R] package zoo, function na.spline with option maxgap -> Error: attempt to apply non-function?

2012-06-08 Thread May Katharina
On Jun 7, 2012, at 12:55 , Gabor Grothendieck wrote: > On Wed, Jun 6, 2012 at 4:40 PM, May Katharina > wrote: >> On Jun 6, 2012, at 10:19 , Gabor Grothendieck wrote: >> >>> On Wed, Jun 6, 2012 at 3:55 PM, May Katharina >>> wrote: Hello, I'm trying to use na.spline (package zoo)

[R] Testing relationships in logistic regression

2012-06-08 Thread Peter Milne
I am interested in knowing whether and how I can test the significance of the relationship between my continuous predictor variable (a covariate) and my binary response variable according to two different groups, my categorical predictor variable, in a logistic regression model (glm). Specifically,

Re: [R] Process XML files

2012-06-08 Thread Uwe Ligges
On 06.06.2012 22:44, Santosh wrote: Hello experts, Sorry for posting the SPlus related question here.. I have not found any solution yet after some attempts and hence, sending it to a wider spectrum of users! I was successful in processing files uing R's XML librariy. Not that we know, we ju

Re: [R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread HJ YAN
> > Dear Duncan > > Many thanks again for your help! > > Now I've mended my code in the following simplified form: > > > pdf("filename.pdf",paper="a4",width=8,height=12,encoding="default") > par(mfrow=c(2,2)) > > plot(1:length(SortedDataInList1[[3]][,1]),SortedDataInList1[[3]][,4],xlim=c(1,length(S

[R] R/C++ interfaces: documentation for SET_STRING_ELT, PROTECT, etc...

2012-06-08 Thread Franckx Laurent
Dear all, I am reading C++ code that is called in an R package. It is not clear to me what SET_STRING_ELT, getAttrib, etc exactly do. I understand that these are macros that have been declared in Rinternals.h and who are used for the correct "translation" of the R data structures, but I have n

[R] noob requesting help

2012-06-08 Thread capital_P
I'm fairly new to R and still learning how to use it. I could really use some help with the following problem. I have a huge .csv file containing thousands of measurements on 34 different birds. Measurements include longitude, latitude, altitude, speed, time, etc. All birds have a different number

[R] Holt Winters in R - Help needed

2012-06-08 Thread anindya55
Hi, I have the following data in a csv file 49893878, 54350306, 68914033, 46888379, 75506404, 54164263, 62846960, 78304638, 63721932, 70269568, 60440103, 79784327, 65918962, 76581629, 72016677, 47225594, 93944513, 65793666, 82709931, 87852261, 75876270, 88715213, 65496028, 80160380, 66089429, 1

Re: [R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread Duncan Murdoch
On 08/06/2012 10:42 AM, HJ YAN wrote: > > Dear Duncan > > Many thanks again for your help! > > Now I've mended my code in the following simplified form: > > > pdf("filename.pdf",paper="a4",width=8,height=12,encoding="default") > par(mfrow=c(2,2)) > > plot(1:length(SortedDataInList1[[3]][,1

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread Kjetil Halvorsen
?chol2inv kjetil On Fri, Jun 8, 2012 at 1:43 AM, wrote: > Dear R list members, > > I have a vector of Cholesky parameterization of a matrix let say A. I would > like to compute the determinant and inverse of the original matrix A from the > vector of cholesky parameters , would you suggest an

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread Kjetil Halvorsen
On Fri, Jun 8, 2012 at 10:08 AM, Özgür Asar wrote: > Hi, > > Isn't the Cholesky decomposition of A=L (L)^T where T stands for "transpose" > and L is the Cholesky factor of A. > > You say you have the  Cholesky decomposition, isn't it L (above)? > > A<-L%*%t(L) > det(A) > solve(A) > > would be your

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread peter dalgaard
On Jun 8, 2012, at 16:08 , Özgür Asar wrote: > Hi, > > Isn't the Cholesky decomposition of A=L (L)^T where T stands for "transpose" > and L is the Cholesky factor of A. > > You say you have the Cholesky decomposition, isn't it L (above)? > > A<-L%*%t(L) > det(A) > solve(A) > > would be your

Re: [R] Problems when install ROCR

2012-06-08 Thread R. Michael Weylandt
Well, I know that ROCR and gplots are on CRAN so you should probably be installing them with install.packages() on your magical and unspecified OS and version of R. Michael On Fri, Jun 8, 2012 at 2:07 AM, guoshicheng2005 wrote: > I meet lots of problem when installing the package ROCR, do you ha

Re: [R] extracting values from txt file that follow user-supplied quote

2012-06-08 Thread emorway
I'll summarize the results in terms of total run time for the suggestions that have been made as well as post the code for those that come across this post in the future. First the results (the code for which is provided second): What I tried to do using suggestions from Bert and Dan: t1 # user

Re: [R] "Re-creating" distributions

2012-06-08 Thread R. Michael Weylandt
I wouldn't go quite so far as to say there's absolutely nothing else -- one could, e.g., also fit lognormal, gamma, beta or most any other two parameters distributions from the supplied data [assuming the support matches]. What I did say is that you need domain specific knowledge to pick a distrib

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread Özgür Asar
Hi, Isn't the Cholesky decomposition of A=L (L)^T where T stands for "transpose" and L is the Cholesky factor of A. You say you have the Cholesky decomposition, isn't it L (above)? A<-L%*%t(L) det(A) solve(A) would be your answer. Hope this helps Ozgur -- View this message in context: ht

Re: [R] Proxy Setting

2012-06-08 Thread Uwe Ligges
On 06.06.2012 23:53, Gurubaramurugeshan, Arun wrote: Hi, I am trying to download data off of this web site http://www.eia.gov/oil_gas/petroleum/data_publications/wrgp/mogas_history.html I used to set the proxy following code to set the proxy Sys.setenv(wget="http://username:password@"proxy se

Re: [R] Saving estimates after nested loops

2012-06-08 Thread Rui Barradas
Hello, Your cbind() are wrong, they are NOT binding columns, just column. The problem would be solved with beta <- cbind(beta, summary(Res)$coef[, 1]) and the same for 't.value' and 'sd'. By the way, 'sd' is a bad name for a variable, it's already an R function. A better way of solving the pro

Re: [R] how to add a vertical line for each panel in a lattice dotplot with log scale?

2012-06-08 Thread David Winsemius
On Jun 8, 2012, at 3:52 AM, maxbre wrote: thanks david, yes, you are right PART of the confusion is because of what you mentioned (sorry for that) but going back to my own data this is JUST PART of the problem… ...see my reproducible example teq<-structure(list(site = structure(c(4L, 2L,

Re: [R] day of the year for chron objects

2012-06-08 Thread Agustin Lobo
Thanks Gabor, The trick to solve my problem is the %j, many thanks. I've seen now it's documented in the help page of strptime as you indicate. But please note that using format="ymd" I do get a chron object and note that the value is the date without the 2 first digits > require(chron) Loading

Re: [R] Simultaneous equations

2012-06-08 Thread Cren
Hi all, I was wondering why I get errors trying to solve this: *simeq <- function(x) { f <- numeric(length(x)) f[1] <- x[1] * dnorm((log(x[1]/D) + (r + x[2]^2/2) * T)/(x[2] * sqrt(T))) - D * exp(-r * T) * dnorm((log(x[1]/D) + (r + x[2]^2/2) * T)/(x[2] * sqrt(T)) - x[2] * sqrt(T)) f[2] <- dn

Re: [R] Rose plot (like a windrose)

2012-06-08 Thread MartinD
Hey, thanks a lot. The polar.plot function from plotrix did exactly what I wanted to have! -- View this message in context: http://r.789695.n4.nabble.com/Rose-plot-like-a-windrose-tp4632773p4632799.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread yhj204
Dear Duncan Thanks a lot for your hints. As you can see from my code (just one line above the command using dev.copy) I have tried using pdf but got same problem, so I hushed it out. Any ideas?? Many thanks! HJ Sent using BlackBerry® from Orange -Original Message- From: Duncan Murd

Re: [R] Sort 1-column dataframe with rownames

2012-06-08 Thread arun
Hi, Try this, df.sort<-apply(df,2,sort) > df.sort    x A  1 D  2 I  2 B  3 J  8 G 12 H 33 E 34 F 44 C 51 df.sort<-as.data.frame(df.sort) A.K. - Original Message - From: Johannes Radinger To: R-help@r-project.org Cc: Sent: Friday, June 8, 2012 3:22 AM Subject: [R] Sort 1-column

[R] Re : Rose plot (like a windrose)

2012-06-08 Thread Pascal Oettli
Hello Martin, Did you try with 'polar.plot' from the 'plotrix' package? Best Regards, Pascal - Mail original - De : MartinD À : r-help@r-project.org Cc : Envoyé le : Vendredi 8 juin 2012 18h01 Objet : [R] Rose plot (like a windrose) Dear R Gurus, I spent some time in looking for hel

[R] any certification for R language

2012-06-08 Thread sagarnikam123
oracle has their SCJP certification for java language like that i want R certification for my job interview Also 1) i want interview questions on R(any website/pdb/any source) 2)any video about R learning(tutorials), any CD/DVD learning software -- View this message in context: http://

[R] XML htmlTreeParse fails with no obvious error

2012-06-08 Thread Nicolas Delhomme
Hi all, Sorry for the rather uninformative subject, but the error I get is not very informative either. When using the XML and RCurl package to retrieve the content of an html page, htmlTreeParse fails, printing out the beginning of the HTML: Error in htmlTreeParse(getURL(url)) : File htt

[R] Saving estimates after nested loops

2012-06-08 Thread D.Soudis
 Hi R-listers, Savings regression results after a loop is straightforward. But what about when you have nested loops? I am running a regression of the form  lm(y~1+x+M+ D[,i] + D[,j] + D[,k]) where x is the variable of interest. M and D are vectors with other covariates. Vectors "M" and "x" ar

Re: [R] Piecewise Lasso Regression

2012-06-08 Thread Lucas Santana dos Santos
Dear Vito, Thank you very much for the advice - I will try it and see how the regression looks. Best, Lucas On Jun 6, 2012, at 11:45 AM, Vito Muggeo (UniPa) wrote: > dear Lucas, > If you are interested in selecting the number of breakpoints here a possible > remedy: > > 1. Fit a segmented

Re: [R] day of the year for chron objects

2012-06-08 Thread Gabor Grothendieck
On Fri, Jun 8, 2012 at 7:16 AM, Jannis wrote: > The following appears to be pretty "standard" (though not included in chron) > to me: > >  b = ISOdate(2001,12,12) >  format(b, '%j') > Using POSIXct here is error prone because it needlessly introduces time zones into a problem where they are not r

Re: [R] day of the year for chron objects

2012-06-08 Thread Jannis
The following appears to be pretty "standard" (though not included in chron) to me: b = ISOdate(2001,12,12) format(b, '%j') or is that what you refer to with "I know I can make my own using julian" ? No idea about the other questions though ... Jannis On 08.06.2012 10:01, Agustin Lobo w

Re: [R] do.call(), browser() and large arguments

2012-06-08 Thread Duncan Murdoch
On 12-06-08 7:06 AM, Jannis wrote: Hi R users, i use do.call() to run some functions on large datasets. For debugging purposes I occasionally use browser. In the case of large datasets supplied to do.call, this however results in R printing huge amounts of numbers on the screen. Is there any wa

[R] do.call(), browser() and large arguments

2012-06-08 Thread Jannis
Hi R users, i use do.call() to run some functions on large datasets. For debugging purposes I occasionally use browser. In the case of large datasets supplied to do.call, this however results in R printing huge amounts of numbers on the screen. Is there any way to reduce this output? I foun

Re: [R] day of the year for chron objects

2012-06-08 Thread Gabor Grothendieck
On Fri, Jun 8, 2012 at 4:01 AM, Agustin Lobo wrote: > Hi! > Is not there an standard R function to retrieve the day of the year > (since 1st Jan of the same year)? > I know I can make my own using julian, but find it weird that having > days(), months() etc doy() does not exist as an standard func

Re: [R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread Duncan Murdoch
On 12-06-08 6:46 AM, yhj...@googlemail.com wrote: Dear Duncan Thanks a lot for your hints. As you can see from my code (just one line above the command using dev.copy) I have tried using pdf but got same problem, so I hushed it out. That's not the right place to put the pdf() call, it shou

Re: [R] extracting values from txt file that follow user-supplied quote

2012-06-08 Thread Gabor Grothendieck
On Wed, Jun 6, 2012 at 12:54 PM, emorway wrote: > useRs- > > I'm attempting to scan a more than 1Gb text file and read and store the > values that follow a specific key-phrase that is repeated multiple time > throughout the file.  A snippet of the text file I'm trying to read is > attached.  The t

Re: [R] extracting values from txt with regular expression

2012-06-08 Thread Gabor Grothendieck
On Thu, Jun 7, 2012 at 1:40 PM, emorway wrote: > Thanks for your suggestions.  Bert, in your response you raised my awareness > to "regular expressions".  Are regular expressions the same across various > languages?  Consider the following line of text: > > txt_line<-" PERCENT DISCREPANCY =      

Re: [R] Consulta sobre GLM-log linear

2012-06-08 Thread Rui Barradas
Ola, outra vez. Desculpa, está errado! É a[[2]] a[["Deviance"]] # claro! com a[[1]] ou a[["Df"]] graus de liberdade. Os p-values estão correctos. Rui Barradas Em 08-06-2012 11:14, Rui Barradas escreveu: Ola, Eu sou português, não sei escrever castellano/espanhol mas compreendo. Aqui é m

Re: [R] Consulta sobre GLM-log linear

2012-06-08 Thread Rui Barradas
Ola, Eu sou português, não sei escrever castellano/espanhol mas compreendo. Aqui é melhor em inglês. Para responder à questão, modelo <- glm(...etc...) a <- anova(modelo, test="Chisq") a length(a) # 'a' tem 5 elementos sapply(a, print) # ver o objecto 'a' a[[4]] # valores da estatistica, co

Re: [R] Rose plot (like a windrose)

2012-06-08 Thread Carlos Ortega
Hi, Please check function radial.plot() in package plotrix. Regards, Carlos Ortega www.qualityexcellence.es 2012/6/8 MartinD > Dear R Gurus, > I spent some time in looking for help but didn't find a way to do what I > want. > I do have a vector (in Degrees) containing of 360 elements, one elem

Re: [R] How to Read command line parameters in Sweave?

2012-06-08 Thread Jessica Streicher
I found the mac console and tried the first solution as well. It works fine. R -e "Sweave('test.Rnw')" --args PatientId=2 <>= argString<-commandArgs(TRUE) print(argString) argList<-strsplit(argString,"=")[[1]] print(argList) assign(argList[1],as.numeric(argList[2])) print(PatientId) @ results in

[R] Problem with ARCH

2012-06-08 Thread and_mue
Hi I have a problem on how to proceed with further steps in my analysis. I did a linear OLS regression (ri,t=alpha*beta*rm,t+et) with my daily data of stock and index returns. There is now the problem of arch in my error terms. Thus I used the following r command: /garch(resid_desn, order=c(0,2)

[R] Rose plot (like a windrose)

2012-06-08 Thread MartinD
Dear R Gurus, I spent some time in looking for help but didn't find a way to do what I want. I do have a vector (in Degrees) containing of 360 elements, one element per degree on a circle. The data is dimensionless and in the range of -0.2 to 0.5. An Example: Wind Dir [degrees], Value 1, 0.1

Re: [R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread Duncan Murdoch
On 12-06-07 10:08 PM, HJ YAN wrote: Dear R users I am trying to exporting plots from R to an external folder, or to the working directory, but the resolution of plots (pdf file) largely reduced. Any way I can get same quality as my original plots?? e.g. I tested the plotting part using one examp

Re: [R] divide factor in n equal groups?

2012-06-08 Thread Jim Lemon
On 06/08/2012 12:43 AM, David Studer wrote: Could anyone please tell me what is the most elegant way to divide an ordinal variable in equal groups? (as cut() does with continous variables) for example I'd like to have the factor "educational level" in three groups "low" "medium" and "high" Hi

Re: [R] How to Read command line parameters in Sweave?

2012-06-08 Thread Jessica Streicher
Well, i have my System not set up to run from command line, so i can't help you there, but the scipt solution id<-1 Sweave('test.Rnw') #printing out the id works fine for me. There were several other suggestions in the answers given in the link. Am 07.06.2012 um 09:30 schrieb Manish Gupta: >

Re: [R] day of the year for chron objects

2012-06-08 Thread Carlos Ortega
Hi Agustin, You can check and adapt this solution to your needs: http://stackoverflow.com/questions/9465817/count-days-per-year Regards, Carlos Ortega www.qualityexcellence.es 2012/6/8 Agustin Lobo > Hi! > Is not there an standard R function to retrieve the day of the year > (since 1st Jan of

Re: [R] error in mlogit

2012-06-08 Thread Achim Zeileis
On Fri, 8 Jun 2012, Kazu Nada wrote: Hi, I need help to do "mlogit" including "l( ) function. When I put following command, "Error in parse(text = x) : :2:0:" is shown. (1) Your example is not reproducible for us, see the footer of this mail and follow the posting guide. (2) You manually

Re: [R] extracting values from txt with regular expression

2012-06-08 Thread Rui Barradas
Hello, Just put the entire regexp between parenthesis. extracted <- strsplit(gsub("([+-]?(?:\\d+(?:\\.\\d*)|\\.\\d+)(?:[eE][+-]?\\d+)?)","\\1%&",txt_line),"%&") extracted sapply(strsplit(unlist(extracted), "="), "[", 2) As for speed, I believe that this might take longer. It will have to

[R] Continuous Query Language

2012-06-08 Thread Regina Lazareva
Hi. I need to finde some sections in a vector by a spesific pattern. I need to recognise monotonically increasing sections in a one dimension array. But there are some noises, which should not be taken into account. Is there some way to do pattern matching similar to Continuous Query Language (CQL)

[R] Determinant and inverse using cholsky parameter

2012-06-08 Thread nataraj
Dear R list members, I have a vector of Cholesky parameterization of a matrix let say A. I would like to compute the determinant and inverse of the original matrix A from the vector of cholesky parameters , would you suggest an R function to do the task. I have tried hard but unable to find any

[R] Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document

2012-06-08 Thread HJ YAN
Dear R users I am trying to exporting plots from R to an external folder, or to the working directory, but the resolution of plots (pdf file) largely reduced. Any way I can get same quality as my original plots?? e.g. I tested the plotting part using one example and obtained pretty good (/readable

Re: [R] changing font to italic for one entry in legend()

2012-06-08 Thread arun
HI, Have you tried italic()? legend(expression(italic("Study area")). It is untested as I am not in front of my linux system. A.K. legend(expression(italic("Expression species") - Original Message - From: Vikram Chhatre To: r-help@r-project.org Cc: Sent: Thursday, June 7, 2012 8:27 P

[R] Consulta sobre GLM-log linear

2012-06-08 Thread Luis Fernando García Hernández
Estimados amigos, Estoy familiarizándome con los modelos lineales generalizados en R. Estoy interesado en realizar un análisis lig linear y me gustaría saber cuáles son o como extraer los valores correspondientes al chi cuadrado en el análisis para cada grupo y para las interacciones. Desde ya mu

[R] Problems when install ROCR

2012-06-08 Thread guoshicheng2005
I meet lots of problem when installing the package ROCR, do you have meet such problems? 1, biocLite("ROCR") 2, biocLite("gplots") 3, biocLite("Rgraphviz") 4, sudo apt-get install graphviz oh, no, unlimited question, what's wrong with R in ROCR or gplots or et al Error : object ‘nobs’ is no

[R] error in mlogit

2012-06-08 Thread Kazu Nada
Hi, I need help to do "mlogit" including "l( ) function. When I put following command, "Error in parse(text = x) : :2:0:" is shown. res1<-(mlogit(choice~train+bus+plane+taxi+year+cost +I(gen*train)+I(gen*bus)+I(gen*plane)+I(gen*taxi)+I(gen*year)+I(gen*cost) +I(age*train)+I(age*bus)+I(age

Re: [R] X11 font error on headless server running Xvfb

2012-06-08 Thread Jonathan Levine
Thanks, Don. the Cairo package was just what I needed. It was a challenge to get it all set up on the serve since I don't have root privileges. Had to install Pixman and Cairo, figure out to set TMPDIR so R could build the package. This page was critical is getting Cairo to compile from sou

[R] Need help on "BBoptim"

2012-06-08 Thread Rehena Sultana
Hello R-Experts, I want to use "BBoptim" function to get mle. Is this possible? Practically I want to check whether moment estimate of mle is really mle for a given data set.  Thanks in advance. Regards, rehena [[alternative HTML version deleted]]

[R] day of the year for chron objects

2012-06-08 Thread Agustin Lobo
Hi! Is not there an standard R function to retrieve the day of the year (since 1st Jan of the same year)? I know I can make my own using julian, but find it weird that having days(), months() etc doy() does not exist as an standard function. Also, is the following not a bit inconsistent? > a <- c

Re: [R] how to add a vertical line for each panel in a lattice dotplot with log scale?

2012-06-08 Thread maxbre
thanks david, yes, you are right PART of the confusion is because of what you mentioned (sorry for that) but going back to my own data this is JUST PART of the problem… ...see my reproducible example teq<-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L, 3L, 1L, 3L, 1L, 1L, 3L, 4L, 5

  1   2   >