Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread David Winsemius
On May 13, 2014, at 9:19 PM, Hurr wrote: I got rid of the quotes error by using single apostrophe quotes in notepad. horAxisLims=c(0,7200) verData = c (1,365,809,1252,1753,2191,2922,3409,3896,4383,4819,5255,5691,6128,6564,7000 ) #not fussy horData = c (1,300,800,1200,1700,2100,2900,3

Re: [R] Merging data.table and data.frame

2014-05-13 Thread Jeff Newmiller
Works for me. Can you make a reproducible example [1] the way the footers of all emails on this list ask you to? The str and dput functions are very useful tools mentioned in the referenced article. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On W

Re: [R] gumbel distribution

2014-05-13 Thread Frede Aakmann Tøgersen
Don't know if I understand your last comment but I surely don't think that the Weibull and Gumbel distributions are the same. See their density function on e.g. Wikipedia. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technolo

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Prof Brian Ripley
On 13/05/2014 23:18, David Winsemius wrote: On May 13, 2014, at 2:59 PM, Rolf Turner wrote: On 14/05/14 09:21, Rich Shepard wrote: I just tried to install 'compositions'. It's apparently not yet available for R-3.1.0. How can I learn when it might be available? The compositions package h

Re: [R] Merging data.table and data.frame

2014-05-13 Thread Abhinaba Roy
Hi Peter, Thanks for your reply, I tried to convert my data.table into a data.frame and then merging but I am getting the same error. But when I check the class of my previously data.table object it returns "data.frame". Any clue as to why this is happening? Regards On Tue, May 13, 2014 at 7:

Re: [R] How to create multi variables

2014-05-13 Thread Jeff Newmiller
Please do the reading I recommended before posting again. My example was numeric because your example was numeric. For more complicated data, a list is a type of vector that can hold such objects, and you would know this if you had read the intro document. ---

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Hurr
I got rid of the quotes error by using single apostrophe quotes in notepad. horAxisLims=c(0,7200) verData=c(1,365,809,1252,1753,2191,2922,3409,3896,4383,4819,5255,5691,6128,6564,7000) #not fussy horData=c(1,300,800,1200,1700,2100,2900,3400,3800,4300,4800,5200,5600,6100,6500,7000) #not at tics ho

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Jeff Newmiller
No, he captured them in some other place, perhaps his email software. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Put short string labels vertically near tick marks on bottom axisis

2014-05-13 Thread Hurr
I get: > install.packages(plotrix) Error in install.packages(plotrix) : object 'plotrix' not found Hurr -- View this message in context: http://r.789695.n4.nabble.com/Put-short-string-labels-vertically-near-tick-marks-on-bottom-axis-tp4690452p4690474.html Sent from the R help mailing list arch

Re: [R] How to create multi variables

2014-05-13 Thread yuanzhi
Thank you for your reply. Yes, there is a problem according to you suggestion. What if the value are not numerical, e.g. I want to use the variable to store the results of linear regression. can I use myvec <- vector( "numeric", 10 ) for ( i in 1:10 ) { myvec[ i ] <- summary(lm(y~x)) # y and x a

Re: [R] Raising a vector to the power of elements of another vector

2014-05-13 Thread arun
Hi, May be this helps: a <- 1:3  b <- 2:4 Mnew <- matrix(a^(rep(b, each=length(a))),ncol=3,byrow=TRUE) identical(M,Mnew) #[1] TRUE #or  M1 <-t(outer(a,b, FUN="^")) identical(M,M1) #[1] TRUE #or dat <- expand.grid(a,b) M2 <- matrix(dat[,1]^dat[,2],ncol=3,byrow=TRUE) identical(M,M2) #[1] TRUE A.K.

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Jim Lemon
That's a bummer. Apparently Notepad is no longer a straight text editor. I used to rely on it when I had to use Windows. Jim On Tue, 13 May 2014 06:37:46 PM David Winsemius wrote: > On May 13, 2014, at 5:59 PM, Hurr wrote: > > David, > > The error I get is: > > Error: unexpected input in "horLab

Re: [R] How to create multi variables

2014-05-13 Thread Jeff Newmiller
What is wrong with myvec <- vector( "numeric", 10 ) for ( i in 1:10 ) { myvec[ i ] <- i } ? If you are using assign, IMHO you are probably doing whatever you are doing wrong. If you want named elements, give the vector names: names( myvec ) <- paste0( "t", 1:10 ) and you can refer to them

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread David Winsemius
On May 13, 2014, at 5:59 PM, Hurr wrote: > David, > The error I get is: > Error: unexpected input in "horLabels=c(”" > I don't get an error: "Smart quotes" > I use Notepad for editor. Right. You got an error,... which you did not post. In my mail client the "double quotes" appeared with assymm

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Jim Lemon
On Tue, 13 May 2014 06:11:58 PM Hurr wrote: > I get the error message: > "Error in library(plotrix) : there is no package called ‘plotrix’ " > Hurr > install.packages(plotrix) Jim __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] How to create multi variables

2014-05-13 Thread Yuanzhi Li
Hi, everyone I want to create a series of variables (e.g. t1, t2..., t10) which could be used in loops. My idea is to use function "assign" for (i in 1:10) { assign(paste("t",i,sep=""), FUN) # allocate the value from FUN to variable ti } But when I create a vector containing the names of

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Hurr
I get the error message: "Error in library(plotrix) : there is no package called ‘plotrix’ " Hurr -- View this message in context: http://r.789695.n4.nabble.com/Put-short-string-labels-vertically-near-tick-marks-on-bottom-axis-tp4690452p4690464.html Sent from the R help mailing list archive a

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Hurr
David, The error I get is: Error: unexpected input in "horLabels=c(”" I don't get an error: "Smart quotes" I use Notepad for editor. Hurr -- View this message in context: http://r.789695.n4.nabble.com/Put-short-string-labels-vertically-near-tick-marks-on-bottom-axis-tp4690452p4690463.html Sent

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Rich Shepard
On Tue, 13 May 2014, David Winsemius wrote: The source is in the usual place and there was a solitary posting that reported success with the usual mechanism for building an R packge: R CMD build compositions David, Thank you. I found the package home page and downloaded the source from tha

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread David Winsemius
On May 13, 2014, at 3:40 PM, Rich Shepard wrote: > On Tue, 13 May 2014, David Winsemius wrote: > >> There was just a posting on R-devel today that suggested compiling from >> source has a good chance to succeed without even fixes. > > David, > > I'll try to find that thread and the source. T

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Rich Shepard
On Tue, 13 May 2014, David Winsemius wrote: There was just a posting on R-devel today that suggested compiling from source has a good chance to succeed without even fixes. David, I'll try to find that thread and the source. Thanks, Rich -- Richard B. Shepard, Ph.D.| Technically s

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Rich Shepard
On Wed, 14 May 2014, Rolf Turner wrote: The compositions package has apparently been archived: Package ‘compositions’ was removed from the CRAN repository. Formerly available versions can be obtained from the archive. Archived on 2014-05-01 as undefined-behaviour errors were not corrected (a

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread David Winsemius
On May 13, 2014, at 2:52 PM, Hurr wrote: > A month ago I was considering the forum topic > “Label axis tick marks with a simple function of axis value” > and haven’t had time to work much on it. > Since then I have written a little program that makes > period labels for the frequency axis, but I

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread David Winsemius
On May 13, 2014, at 2:59 PM, Rolf Turner wrote: > On 14/05/14 09:21, Rich Shepard wrote: >> I just tried to install 'compositions'. It's apparently not yet >> available >> for R-3.1.0. How can I learn when it might be available? > > The compositions package has apparently been archived: > >>

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Jim Lemon
On Tue, 13 May 2014 02:52:09 PM Hurr wrote: > A month ago I was considering the forum topic > “Label axis tick marks with a simple function of axis value” > and haven’t had time to work much on it. > Since then I have written a little program that makes > period labels for the frequency axis, but I

Re: [R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Rolf Turner
On 14/05/14 09:21, Rich Shepard wrote: I just tried to install 'compositions'. It's apparently not yet available for R-3.1.0. How can I learn when it might be available? The compositions package has apparently been archived: Package ‘compositions’ was removed from the CRAN repository. For

[R] Correlelogram with partial correlation coefficients

2014-05-13 Thread Bill Anderegg
Hi, I am trying to construct a correlelogram plot but plot partial correlation coefficients, rather than normal coefficients. I've been using the corrgram() and ggm() libraries to do correlelograms and partial correlation analysis respectively, but I can't figure out how to combine them. Here is m

[R] Put short string labels vertically near tick marks on bottom axis

2014-05-13 Thread Hurr
A month ago I was considering the forum topic “Label axis tick marks with a simple function of axis value” and haven’t had time to work much on it. Since then I have written a little program that makes period labels for the frequency axis, but I don’t know how to attach them. I expected the follow

[R] Package 'compositions' and R-3.1.0

2014-05-13 Thread Rich Shepard
I just tried to install 'compositions'. It's apparently not yet available for R-3.1.0. How can I learn when it might be available? TIA, Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Calculating transition probabilties

2014-05-13 Thread David Winsemius
On May 13, 2014, at 7:49 AM, Baba Bukar wrote: > Dear all, > > I am new to R and have some problem computing transition probabilities. My > problem goes like this; > > data_set <- > c(2,0,45,6,78,3,0,2,6,0,5,8,0,2,8,9,12,212,22,4,1,0,3,5,88,5,69,12,4,0,0,0,0,4,87,6,99,104,22,7) > > observation

[R] nls() help please

2014-05-13 Thread Andras Farkas
Dear All,   please help with writing the function for the following:   we have data frame "raw"   D1 <-c(2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50) D2 <-c(0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5)

Re: [R] Calculating transition probabilties

2014-05-13 Thread Suzen, Mehmet
This looks like this is your homework about Markov chains. not an R question actually. But have a look at the markovchain package from CRAN: http://cran.r-project.org/web/packages/markovchain/vignettes/an_introduction_to_markovchain_package.pdf On 13 May 2014 16:49, Baba Bukar wrote: > Dear all,

Re: [R] stop a function

2014-05-13 Thread n omranian
Hi, Another problem arised now. I got this error: Error in match(x, table, nomatch = 0L) : reached CPU time limit I googled it  but nothing could help me to get rid of this error. Any comments, help or hints? Thanks a lot, NO On Tuesday, May 13, 2014 2:36 PM, "ONKELINX, Thierry" wrote: Hav

Re: [R] gumbel distribution

2014-05-13 Thread eliza botto
Thankyou very much Frede. It wasn't any home I am just trying to put my grip on distribution. Believe it or not, I came to know for the first time that weibull and gumbel distributions are same. :( Eliza > From: fr...@vestas.com > To: eliza_bo...@hotmail.com; r-help@r-project.org > Date: Tue,

Re: [R] gumbel distribution

2014-05-13 Thread Frede Aakmann Tøgersen
Is this a home work problem? See Weibull package:stats R Documentation The Weibull Distribution Description: Density, distribution function, quantile function and random generation for the Weibull distribution with parameters 'shape' and 'scale'.

[R] gumbel distribution

2014-05-13 Thread eliza botto
Dear useRs, I need some examples of gumbel probability plots in R. i'll be extremely grateful if you could share the codes of a working example. Eliza [[alternative HTML version deleted]] __ R-help@r-p

[R] decision curve analysis

2014-05-13 Thread Liisa Marianna
Dear all, I'm a beginner with R, and I am facing a problem in which I haven't found help in any FAQs or manuals. Decision curve analysis published by A. Vickers in 2006 seems appropriate to my data. There is no R package for decision curve analysis in CRAN, but I found a project concerning it in

[R] Calculating transition probabilties

2014-05-13 Thread Baba Bukar
Dear all, I am new to R and have some problem computing transition probabilities. My problem goes like this; data_set <- c(2,0,45,6,78,3,0,2,6,0,5,8,0,2,8,9,12,212,22,4,1,0,3,5,88,5,69,12,4,0,0,0,0,4,87,6,99,104,22,7) observations greater than, say 3, is considered as useful (denoted as 1) while

Re: [R] Help conduction Egger's test

2014-05-13 Thread Michael Dewey
At 19:02 12/05/2014, Sultan Malik wrote: Hi, I am currently conducting a meta analyses and wish to carry out Egger's test. I was just wondering, does the weighted linear regression model proposed by Egger et al correspond to the "weighted regression with multiplicative dispersion" option in M

Re: [R] stabilitytest dse package

2014-05-13 Thread Bert Gunter
Did you work your way through the package vignette? If not, you should certainly do so. Otherwise, I cannot be of any help. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom."

[R] stabilitytest dse package

2014-05-13 Thread Jesper Hybel Pedersen
I'm trying to learn how to use the dse-package. Doing a stabilitytest on a model. I run the test on two models that are identical except for Model 1: TREND=0 Model 2: TREND=NULL and find the following difference in output unexpected: library(dse) AR=array(c(1,-0.8,-0.15),c(3,1,1)) model=ARMA(A

Re: [R] interrogating webdatapage

2014-05-13 Thread Jeff Newmiller
There are a variety of options, but they do generally require that you understand how that particular web form interacts with your browser because there are multiple ways to design them. Firefox has some powerful plugins such as FireBug for studying how web pages work that can inform how you set

Re: [R] Nonparametric MANOVA [RESOLVED]

2014-05-13 Thread Rich Shepard
On Tue, 13 May 2014, Cade, Brian wrote: Your use of the term MANOVA suggests a multivariate response (Y). If what you really have is multiple factors (predictors), then this is a different modeling construct (multiple regression) and it would seem nonpartest() is not appropriate. Brian, You

Re: [R] Nonparametric MANOVA

2014-05-13 Thread Cade, Brian
Rich: Your use of the term MANOVA suggests a multivariate response (Y). If what you really have is multiple factors (predictors), then this is a different modeling construct (multiple regression) and it would seem nonpartest() is not appropriate. I've been analyzing water quality constituents (o

Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Bob O'Hara
Ah, thanks. Now I understand a bit more what's happening (and also a bit more about connections: I have managed to avoid having to understand them). Right, now I can read my meta-data, I'll start on trying to read the data... Bob On 13 May 2014 16:10, peter dalgaard wrote: > Hi Bob, Long time

Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread peter dalgaard
Hi Bob, Long time no see. The following works for me. In general, I think it is tricky to rely on encodings to be passed on to the appropriate agent, so try to be as specific as possible about it. con <- url("ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, encoding

Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Prof Brian Ripley
On 13/05/2014 14:35, Bob O'Hara wrote: I'm trying to read a text file (actually the ftp file in command below), and I'm getting an error: SpCodes=read.fwf(" ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, + widths=c(7,6,51,51), skip=6, n=5, header=F, st

Re: [R] Merging data.table and data.frame

2014-05-13 Thread peter dalgaard
On 13 May 2014, at 14:34 , Abhinaba Roy wrote: > Hi R-helpers, > > I am trying the following code in R > > merge(x=Master1,y=demo_dtls,by.x=c("ID_CASE","ts"),by.y=c("ID_CASE","TS_EVENT")) > > where, > > class(demo_dtls$TS_EVENT) > [1] "POSIXct" "POSIXt" > class(Master1$ts) > [1] "POSIXct" "P

[R] interrogating webdatapage

2014-05-13 Thread Vincenzo Landi
Hello, please there is some script that can interrogating a web database (like this http://pra-incecca.tragsatec.es/pra-incecca/caballos/fichaProducto.xhtml) following a list of items and download the response into my local pc? Thank you in advance for any help --

[R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Bob O'Hara
I'm trying to read a text file (actually the ftp file in command below), and I'm getting an error: > SpCodes=read.fwf(" ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, + widths=c(7,6,51,51), skip=6, n=5, header=F, stringsAsFactors=F) Error in substring(x, f

Re: [R] Merging data.table and data.frame

2014-05-13 Thread Jeff Newmiller
Because merge.data.table expects both objects to be data.table objects? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] stop a function

2014-05-13 Thread n omranian
It' great function :) Thank you so much. Best, NO On Tuesday, May 13, 2014 2:36 PM, "ONKELINX, Thierry" wrote: Have a look at evalWithTimeout() from the R.utils package Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest

Re: [R] package to plot mean and standard deviation directly on data

2014-05-13 Thread Luigi Marongiu
Dear Jim, I have use the brkdn.plot as you suggested and I quite like it since it is easy to use. Would be possible to overlap the confidence bars (SD) with the mean value points? The implemetation leaves a small space as you can see in this figure. I tired with a pch=list(type="o", pch=c(16, 1, 1

[R] Getting data s from "Think or Swim " platform through R.

2014-05-13 Thread Ashis Deb
Hi all , Is it possible to get datas from "Think or Swim " database like we do in Yahoo.finance through Quantmod package like getSymbol . We know they aretaking money for datas. Than You ASHIS dEB [[alternative HTML version deleted]] __

Re: [R] stop a function

2014-05-13 Thread ONKELINX, Thierry
Have a look at evalWithTimeout() from the R.utils package 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 + 32 2 525

[R] Merging data.table and data.frame

2014-05-13 Thread Abhinaba Roy
Hi R-helpers, I am trying the following code in R merge(x=Master1,y=demo_dtls,by.x=c("ID_CASE","ts"),by.y=c("ID_CASE","TS_EVENT")) where, class(demo_dtls$TS_EVENT) [1] "POSIXct" "POSIXt" class(Master1$ts) [1] "POSIXct" "POSIXt" and > class(Master1)[1] "data.table" "data.frame"> class(demo_dtl

[R] stop a function

2014-05-13 Thread n omranian
Hi all, If I use a function in R which takes some parameters as an input, how can I stop this function in the while loop and try another parameter in case the function takes long time or could not converge. Actually, I'm using "penalized" function in a loop for some fixed lambdas (pre-calculat

Re: [R] package to plot mean and standard deviation directly on data

2014-05-13 Thread Luigi Marongiu
Dear Duncan and Jim, thank you fo ryour reply. Please do not worry about the code: it was just an example of the lenghty procedure I have to apply to plot the standard deviation lines; the actual code is then shaped according to the data at hand. I will have a look at the packages you have suggest

Re: [R] implementation for genetic algorithm

2014-05-13 Thread Carlos Ortega
Hello, The first two references of this query: http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4&q=genetic+algorithm&sa=Search+functions%2C+lists%2C+and+more&cof=FORID%3A11&siteurl=rseek.org%2F&ref=&ss=3792j1503136j17 provides a package (genalg) and an example of what you are looking

[R] WG: vars or plm package? bivariate VAR

2014-05-13 Thread Katharina Mersmann
Hello R-Community, I actually don´t know how to implement the following: I have quartaly Panel- Data and want to run a Granger- Test. I´ve already done a univariate autoregression with grangertest() from package lmtest. Because the Granger test is designed to handle pairs of variables

Re: [R] Freeing up memory in R

2014-05-13 Thread Jeff Newmiller
Perhaps ?read.fwf might help --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Pl

Re: [R] Freeing up memory in R

2014-05-13 Thread Martin Maechler
> Zilefac Elvis > on Mon, 12 May 2014 15:01:49 -0700 writes: > Hi, > I will like to free up memory in R and make my program execute faster. At the moment, MY PROGRAM IS VERY SLOW probably due to memory issues. Here is sample data (Rcode is found at the end) from one simulati

Re: [R] efficient sine interpolation

2014-05-13 Thread Jeff Newmiller
Not sure this approach yields meaningful data, but as a demonstration of vectorization I got a factor of 10 speedup. sine.approx3 <- function( tmin, tmax ) { B <- (2*pi)/24 # period = 24 hours C <- pi/2 # horizontal shift tmin <- t( tmin ) tmax <- t( tmax ) idx <- seq.int( 24 * 4 * n