Re: [R] sum with dates

2011-12-12 Thread Jorge I Velez
Hi Ana, Check section 4 of http://www.jstatsoft.org/v40/i03/paper for more alternatives. HTH, Jorge.- On Mon, Dec 12, 2011 at 9:39 PM, Ana <> wrote: > How do I sum 15 years to my dataset? > > original dataset > datesval > 12001-01-121.2 > 22001-02-121.2 > 32

Re: [R] sum with dates

2011-12-12 Thread Enrico Schumann
If "adding x years to a date" means "increase the part of a date by x", then it should be easiest to manipulate the character representation of your date. dates <- as.Date(c("2001-01-12","2001-02-12","2001-03-12")) addYear <- function(d,addyears) { Y <- as.numeric(strftime(d, "%Y"))

Re: [R] Creating appropriate time axis for data

2011-12-12 Thread Jeff Newmiller
"Does not support natively" isn't accurate. It is common to import date/time values as character and then use strptime or as.Date or other conversion function as desired. This may at first seem tedious, but it does provide flexibility.

Re: [R] Inverse matrix using eigendecomposition

2011-12-12 Thread Berend Hasselman
wwreith wrote > > General goal: Write R code to find the inverse matrix of an nxn positive > definite symmetric matrix. Use solve() to verify your code works. > > Started with a 3x3 matrix example to build the code, but something dosen't > seem to be working. I just don't know where I am going w

Re: [R] calculating logit parameters (odd ratio is exactly one or zero)

2011-12-12 Thread wim nursal
Dear Uwe and David, Yes, definitely i was wrong. The expression in R should be: glm(cbind(FD, 12 - FD) ~ Fsize, family=binomial, data=subFS) Call: glm(formula = cbind(FD, 12 - FD) ~ Fsize, family = binomial, data = subFS) Coefficients: (Intercept)Fsize 0.6381 -0.1203

[R] Please delete my e-mail judit.barr...@montana.edu

2011-12-12 Thread Barroso, Judit
Please, I am receiving lot of e-mails that I do not want. Please could you delete my e-mail. Thank, Judit -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Adams Sent: Monday, December 12, 2011 3:22 PM To: Bert Gunter Cc: r-he

[R] Forcing gwr to the origin

2011-12-12 Thread Barroso, Judit
I need to force the GWR(geographic weighted regression) to the origin(0,0). Could you tell me what is the code? I tried writing -1 as in the lm but it does not work. Thanks in advance, Judit [[alternative HTML version deleted]] __ R-help@r-proj

[R] tcplot documentation in evd package

2011-12-12 Thread Mike Harwood
Hello, and please advise regarding any errors/omissions on my part. However, the documentation for R's tcplot function in the evd package appears to contain an error. I am using evd version 2.2-4 in R 2.14.0 with Windows XP. > data(portpirie) > mrlplot(portpirie) ## No Error > tlim <- c(3.6, 4.

Re: [R] Creating appropriate time axis for data

2011-12-12 Thread Tony Stocker
2011/12/12 Uwe Ligges : > On 12.12.2011 17:44, Tony Stocker wrote: Sorry for the double post but the first message was held for so long that I figured there was a problem with the email address I was using so I unsubscribed that one and resubscribed the other one. >> >> Hello, >> >> I am dealing

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Trevor Carey-Smith
On 12/13/2011 12:14 PM, Ryan Utz wrote: My vectors names are neatly stored in a character vector of their own. This happens based on how they were imported. So, say I have vectors a, b and c, all with numeric-only contents. Then I have another vector, say z, that looks like this: z<-c("a","b","c

[R] Inverse matrix using eigendecomposition

2011-12-12 Thread wwreith
General goal: Write R code to find the inverse matrix of an nxn positive definite symmetric matrix. Use solve() to verify your code works. Started with a 3x3 matrix example to build the code, but something dosen't seem to be working. I just don't know where I am going wrong. ##Example matrix I fo

Re: [R] sum with dates

2011-12-12 Thread R. Michael Weylandt
It depends how your dates are stored, but generally you can just add 365*15 to them. E.g., print(x <- Sys.Date()) print(x + 365*15) So for you, dataset$dates <- dataset$dates + 365*15 Michael On Mon, Dec 12, 2011 at 9:39 PM, Ana wrote: > How do I sum 15 years to my dataset? > > original datas

[R] sum with dates

2011-12-12 Thread Ana
How do I sum 15 years to my dataset? original dataset datesval 12001-01-121.2 22001-02-121.2 32001-03-121.2 result datesval 12016-01-121.2 22016-02-121.2 32016-03-121.2 _

[R] Importing a complex XML file (SDMX format)

2011-12-12 Thread andrewH
Hi folks! I am trying to read a large XML file from the Fed that contains quarterly Flow of Funds data since the 1950s. It contains lots of individual tables in something called the "Statistical Data and Metadata eXchange format" (SDMX format). I am not sure if I need something specific to the

[R] Plotting a date variable after GAM

2011-12-12 Thread Shige Song
Dear All, I am fitting a simple GAM model using the "gam" function in the "mgcv" package. The only independent variable is a continuous variable representing the time of the event (in year and month) coded so that "0" represents January 1960, "1" represents February 1960, etc. Now when I try to pl

Re: [R] Polygon

2011-12-12 Thread Carl Witthoft
Please read the posting guide and provide a (small) reproducible example of your data. The statement "...output does not seem good." is not very useful. Please explain what you would like the polygon area to look like, and why you don't like the way it came out. Links to posted images of the

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread William Dunlap
If you have already made numeric vectors called "a", "b", and "c" a <- 1:10 b <- sqrt(1:200) c <- log2(1:500) and a character vector "z" containing their names z <- c("a", "b", "c") then make a list containing the data with them with dataList <- lapply(z, get, envir=environment())

[R] axis tick colors: only one value allowed?

2011-12-12 Thread Carl Witthoft
Hi, So far as I can tell, the 'col.ticks' parameter for axis() only uses the first value provided. E.g.: plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue Just wondering if there's a different option in the basic plot commands that can handle multiple colors, and also wh

Re: [R] Overlaying density plot on forest plot

2011-12-12 Thread Viechtbauer Wolfgang (STAT)
Here is an example. It requires a bit of extra work, but that's the beauty of R -- you can essentially customize a graph to your taste with low-level functions. I also added the prediction interval using the addcred argument (as suggested by Michael), since it gives the same information as that

[R] rodbc -- save result to a table

2011-12-12 Thread Hui Du
Hi All, I am pretty new for RODBC. I want to save my table to a DB, so I used something like sqlSave(db, a, 'Forecast_Result', rownames = FALSE); But I got an error Error in sqlSave(db, a, "Forecast_Result", rownames = FALSE) : table 'Forecast_Result' already exists Yes, that tab

Re: [R] Maximum discrepancy palette

2011-12-12 Thread Michael Sumner
Try the RColorBrewer package, with function ?brewer.pal You probably want a Qualitative palette, the details are in that function's help page. Cheers, Mike. On Tue, Dec 13, 2011 at 10:14 AM, Etienne B. Racine wrote: > I'm looking for a palette that would maximize the discrepancy with > neighbou

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Bert Gunter
Thomas: I stand corrected. Thank you. -- Bert On Mon, Dec 12, 2011 at 2:21 PM, Thomas Adams wrote: > Bert, > > I may be mistaken, but I thought Ryan wrote "write code that automatically > imports data from different files (with different lengths-just one > variable)", so, I was referring to doi

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Peter Ehlers
On 2011-12-12 15:14, Ryan Utz wrote: Thanks for the help, everyone. However, no solution yet... My vectors names are neatly stored in a character vector of their own. This happens based on how they were imported. So, say I have vectors a, b and c, all with numeric-only contents. Then I have anot

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Ryan Utz
Thanks for the help, everyone. However, no solution yet... My vectors names are neatly stored in a character vector of their own. This happens based on how they were imported. So, say I have vectors a, b and c, all with numeric-only contents. Then I have another vector, say z, that looks like this

[R] Maximum discrepancy palette

2011-12-12 Thread Etienne B. Racine
I'm looking for a palette that would maximize the discrepancy with neighbouring elements. I have a raster image of objects tagged with integers. I'd like to highlight the different objects by using a palette that would maximize this difference with neighbours as close numbers tend to be neighbours

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Vining, Kelly
Ryan, Do you necessarily have to use "list"? Have you tried the usecols=TRUE option in boxplot? Cheers, --Kelly V. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ryan Utz Sent: Monday, December 12, 2011 1:24 PM To: r-help@r-proje

[R] question about fixed and random factors in aov

2011-12-12 Thread Szymek Drobniak
Dear R users, I know that it was considered many times but having searched through dozens of posts I have only added to my confusion. My question is - is it possible to correctly analyse simple mixed (fully)crossed (factorial) 2-way ANOVA? Assume we have factor A (fixed) and B (random). In the mo

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Thomas Adams
Bert, I may be mistaken, but I thought Ryan wrote "write code that automatically *imports data* from different files (with different lengths-just one variable)", so, I was referring to doing something with the data before it gets into R. I understand that one should not need to write out data and

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Bert Gunter
Sorry -- previous versiuon prematurely sent. Full version is: Yikes!  You should never have to do this sort of thing (writing stuff out to files, etc.) What is wanted, I believe, is ?do.call as in do.call(boxplot, z) where z is list(a,b,c)   as Sarah described. However, I think you might

Re: [R] not complete character in csv file

2011-12-12 Thread Rolf Turner
On 13/12/11 04:39, threshold wrote: Indeed in txt it looks fine. Anyway, I must stay without 0 because csv is THE format. It may well be the case that csv is THE format, but csv is not the problem. Excel is the problem. The solution is: Don't use Excel!!! (This is excellent advice in any c

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Thomas Adams
Ryan, I think you could do what you want by having the vector data written to separate files; then create a file containing the individual file names. In R, read the file containing the list of file names and loop through this reading in the individual vector files. Maybe this is an inelegant, bru

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Sarah Goslee
Hi, On Mon, Dec 12, 2011 at 4:24 PM, Ryan Utz wrote: > Hello, > > I'm attempting to write a code that automatically imports data from > different files (with different lengths-just one variable) and makes tidy > box plots for comparison. I can successfully import the data and create a > list of t

[R] Formatting probability data to produce confusion matrix for binary data for logistric regression

2011-12-12 Thread Sally Ann Sims
Hello R folks, I’m looking to produce a confusion matrix using the command: cmx(PData,threshold=0.49,na.rm=FALSE) for a logistic regression model (1 is habitat, 0 is nonhabitat). To compile my PData data file (csv file) (as in the example above), I’m using the output of the predict(glm) f

[R] Boxplot of multiple vectors with different lengths

2011-12-12 Thread Ryan Utz
Hello, I'm attempting to write a code that automatically imports data from different files (with different lengths-just one variable) and makes tidy box plots for comparison. I can successfully import the data and create a list of the vectors I want to compare. But I cannot, for the life of me, fi

[R] windrose color ramp issue

2011-12-12 Thread Adrienne Wootten
Greetings! I'm having an issue with the windrose produced by the windrose function from the circular package. For our weather stations in North Carolina I'm helping with a script which takes hourly wind speed and direction data to create windroses for our end users. One of the stations in the mo

Re: [R] calculating logit parameters (odd ratio is exactly one or zero)

2011-12-12 Thread David Winsemius
On Dec 12, 2011, at 3:51 PM, Uwe Ligges wrote: 1. The formula you used is not for a logistic but an ordinal regression (since you are using the default gaussian family rather than family="binomial" or whatever. this this then produce one version of the "Armitage linear test of trend"?

Re: [R] categorical variables

2011-12-12 Thread David Winsemius
On Dec 12, 2011, at 3:38 PM, Uwe Ligges wrote: On 12.12.2011 19:36, Brian Jensvold wrote: I am doing a logistic regression, and by accident I included a field which has the 2digit abbreviation for all 50 states labeled "st". I was surprised to see that the glm did not come up with an erro

Re: [R] calculating logit parameters (odd ratio is exactly one or zero)

2011-12-12 Thread Uwe Ligges
1. The formula you used is not for a logistic but an ordinal regression (since you are using the default gaussian family rather than family="binomial" or whatever. 2. R (nor any other software) can deal with perfect separation (nor quasi-separation) of classes, since the problem is not well de

Re: [R] categorical variables

2011-12-12 Thread Uwe Ligges
On 12.12.2011 19:36, Brian Jensvold wrote: I am doing a logistic regression, and by accident I included a field which has the 2digit abbreviation for all 50 states labeled "st". I was surprised to see that the glm did not come up with an error message but instead appears to have automatically

Re: [R] Creating appropriate time axis for data

2011-12-12 Thread Uwe Ligges
On 12.12.2011 17:44, Tony Stocker wrote: Hello, I am dealing with data stored in a database as a 'time' object. I export the data from the database to a text file and utilize the 'time_to_sec()' I get > time_to_sec Error: object 'time_to_sec' not found If it is in a package, please tell u

Re: [R] Help with charting time in seconds as HH:MM:SS on charts

2011-12-12 Thread Uwe Ligges
Please post only once! Uwe Ligges On 12.12.2011 20:32, Tony Stocker wrote: Hello, I am dealing with data stored in a database as a 'time' object. I export the data from the database to a text file and utilize the 'time_to_sec()' function of the database to convert the human readable time (HH

Re: [R] Variables from a Dataframe

2011-12-12 Thread William Dunlap
I would recommend using data.frame(var1, var2, ...) and not cbind.data.frame(var1, var2, ...). I consider it bad form to directly call a method of a generic function. Sometimes it leads to errors, as a method should be free to assume that its inputs are of the class it was declared to accept. In

Re: [R] Variables from a Dataframe

2011-12-12 Thread Sarah Goslee
I'm glad that worked for you. It's a good idea to reply to the list, as well as me, so that there's public acknowledgment of a working solution, and so that the answer appears in the archives. Sarah On Mon, Dec 12, 2011 at 2:56 PM, Jose Bustos Melo wrote: > Thank you Sarah!!... that works well,

Re: [R] Orthoblique rotation on eigenvectors (SAS VARCLUS)

2011-12-12 Thread larrydag
I really like your varclus function Frank. I have a question about the quartimax rotation of the 1st two eigen vectors as the SAS VARCLUS algorithm dictates. According to the SAS user guide example of VARCLUS the only thing needed to perform the cluster analysis is the variable correlation matrix

[R] Help with charting time in seconds as HH:MM:SS on charts

2011-12-12 Thread Tony Stocker
Hello, I am dealing with data stored in a database as a 'time' object. I export the data from the database to a text file and utilize the 'time_to_sec()' function of the database to convert the human readable time (HH:MM:SS) to seconds so that I can use R to do analysis and create charts of the d

Re: [R] Variables from a Dataframe

2011-12-12 Thread Paul Menzel
Dear Jose, Am Montag, den 12.12.2011, 19:44 + schrieb Jose Bustos Melo: > Hello everyone, > > I want make a variable selection from a dataframe, but when I build this new > object (using cbind) the new table (which is a matrix) I lost all the > original factor names in the variables. I get

Re: [R] Variables from a Dataframe

2011-12-12 Thread Sarah Goslee
Without a reproducible example it's impossible to say for certain, but I'd try cbind.data.frame() instead of cbind(). You need to have a data frame, not a matrix, for the result. Sarah On Mon, Dec 12, 2011 at 2:44 PM, Jose Bustos Melo wrote: > Hello everyone, > > I want make a variable selectio

[R] Variables from a Dataframe

2011-12-12 Thread Jose Bustos Melo
Hello everyone, I want make a variable selection  from a dataframe, but when I build this new object (using cbind) the new table (which is a matrix) I lost all the original factor names in the variables. I get 1,2,3 Someone would be so kind and tell me if there's is a ny way to get variable

Re: [R] k-folds cross validation with conditional logistic

2011-12-12 Thread Terry Therneau
--begin inclusion -- I have a matched-case control dataset that I'm using conditional logistic regression (clogit in survival) to analyze. I'm trying to conduct k-folds cross validation on my top models but all of the packages I can find (CVbinary in DAAG, KVX) won't work with clogit models. Is t

Re: [R] multiple comparison of interaction of ANCOVA

2011-12-12 Thread Richard M. Heiberger
... On Mon, Dec 12, 2011 at 7:00 AM, Jinsong Zhao wrote: > Apart from the data set here, is there a way to do multiple comparison on > the interaction of one way analysis of covariance? > Interaction in ancova usually means the slopes are different. ... BTW, when loading HH package, the TukeyH

Re: [R] Lagged values problem requiring short solution time

2011-12-12 Thread Rui Barradas
Kevin, Your problem seems to have three restrictions: (1) abs(x[i] - x[i-1]) >= delta (2) y[i] >= x[i] and (3) minimize sum(y-x). If this is the case I believe I have a better solution, with a smaller sum and in much less time. The problem is restriction (2). If the diffs are negative you can't su

[R] Creating appropriate time axis for data

2011-12-12 Thread Tony Stocker
Hello, I am dealing with data stored in a database as a 'time' object. I export the data from the database to a text file and utilize the 'time_to_sec()' function of the database to convert the human readable time (HH:MM:SS) to seconds so that I can use R to do analysis and create charts of the d

Re: [R] Lagged values problem requiring short solution time

2011-12-12 Thread Rui Barradas
Kevin, I'm sorry, but my code has a bug The correction is: 1) delete the two lines with 'ix' 2) replace them with for(i in 2:n) if(abs(x[i] - x[i-1]) < delta) x[i] <- x[i-1] + delta That's it. The problem is that it's back to slowness. Sorry, once again, Rui Barradas

Re: [R] not complete character in csv file

2011-12-12 Thread threshold
right, Table <- data.frame(matrix(0,8,3)) day = "Monday" Table[1,1]=day Table[1,2]=3 works, thanks a lot. robert -- View this message in context: http://r.789695.n4.nabble.com/not-complete-character-in-csv-file-tp4185785p4186639.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Dear Paul and Sarah Thanks for the suggestion. I have provided my data here in to make the results reproducable. I am actually trying to do interpoliation of climate data where x1 and x2 are my latitude and longitude and sum64-sum 368 are my rainfall observations which I need to regress against

[R] categorical variables

2011-12-12 Thread Brian Jensvold
I am doing a logistic regression, and by accident I included a field which has the 2digit abbreviation for all 50 states labeled "st". I was surprised to see that the glm did not come up with an error message but instead appears to have automatically broken down this field into individual fields (

[R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-12 Thread Robin Cura
Hello, I'm currently trying to convert a slow and ugly script I made, so that it's faster and can be computed on a computer grid with the multicore package. My problem is that I don't see how to turn some loops into an "apply-able" function. Here's an example of my loops : I got a list of datafra

Re: [R] Automated Regressions

2011-12-12 Thread Frederic Andrieu
Hi Ryan, My name is Frederic Andrieu and I work for Mango Solutions in the UK. It looks like you have swapped the a and c in this for loop statement: This "for (c in a(1:2000)) {" should be this "for (a in c(1:2000)) {" Which is why the for loop is not running, I would suggest something like th

Re: [R] Automated Regressions

2011-12-12 Thread B77S
I don't know why you had "c in a(1:2000))" c is a function see ?c ... and you want "a" (the row number in SQL_Code) to change with each iteration in the loop. Perhaps this might work (I'm not saying this is the best option, just a potential fix for what you have): for (a in 1:2000) { Dataset

Re: [R] unlist() list of dates

2011-12-12 Thread Ana
Thanks! Another question also related to the same type of files: How can I transform it into a time series as.ts() I also endup having the same problem, the dates are transformed into a list of numbers My file looks like this datesval 12001-01-121.2 22001-02-12

Re: [R] Overlaying density plot on forest plot

2011-12-12 Thread Michael Dewey
At 15:09 11/12/2011, you wrote: Dear Michael, Thanks for the email. This is the kind of forest plot, I want to replicate http://www.biomedcentral.com/1471-2334/11/122/figure/F2 It would be helpful to cc to r-help in case someone else there knows better. If you follow my suggestion you get a

Re: [R] unlist() list of dates

2011-12-12 Thread William Dunlap
There are methods of the "c" function for things of class "POSIXlt" and "Date" so do.call("c", dataList) works instead of unlist: > dateList <- list(LastWeekend=as.POSIXlt(sprintf("2011-12-%d", 10:11)), + Today=as.POSIXlt("2011-12-12")) > z <- do.call("c", dateList) > z

[R] unlist() list of dates

2011-12-12 Thread Ana
how can I keep the date info after doing unlist to a list of dates? I have a list of dates were observations were made for each station in each month list.obs[[station]][month] [1] "1979-01-01" "1979-01-10" "1979-01-25" [1] 0 1 2 3 when i try to unlist i loose the date info. w

Re: [R] For loop indicies

2011-12-12 Thread Thomas Chesney
Ah. I did a Silly Thing, and thank you for all the responses helping me track it down. The issue lay not in the for (i in 1:C) but in the line VectorName[i] <- ... That's the one that didn't like 0. Thomas From: Enrico Schumann [enricoschum...@yahoo.de]

Re: [R] shorter way of coding

2011-12-12 Thread Sarah Goslee
That's not a reproducible example. Paul suggested a list of formulas, but I recommended creating a list of y variables. In your attempt, you didn't include the y in the name of the dependent variable; that's probably why it doesn't work. Look at this: > y.list <- list(y1=runif(10), y2 <- runif(1

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Dear Paul and Sarah Thanks for the suggestion. I have provided my data here in to make the results reproducable. I am actually trying to do interpoliation of climate data where x1 and x2 are my latitude and longitude and sum64-sum 368 are my rainfall observations which I need to regress against

Re: [R] [solved] littler: Use for batch processing of data sets: How to pass filename?

2011-12-12 Thread Paul Menzel
Am Montag, den 12.12.2011, 09:41 -0500 schrieb R. Michael Weylandt : > Why can't you just replace "temp/data" with filename (no quotes)? I'm not > sure I get the question... … no I am feeling silly and I do not know where I screwed up before. Here is the full working example. #!/usr/bin/

Re: [R] not complete character in csv file

2011-12-12 Thread R. Michael Weylandt
Matrix (which is secretly a vector) can only have one mode (numeric/factor/character/etc.) for all its elements. If you need multiple types, go to a data frame Michael On Mon, Dec 12, 2011 at 10:39 AM, threshold wrote: > Indeed in txt it looks fine. Anyway, I must stay without 0 because csv is

Re: [R] Color2D.matplot uniform color range

2011-12-12 Thread jalfaro
Hi Jim, Thanks so much for your help. I have read several of your responses on this mailing list and they have helped me out quite a bit as I have gotten more and more used to R. I am still a little confused here by your response. I think you understood my requirements correctly. In your words

Re: [R] no non-missing arguments to max; returning -Inf

2011-12-12 Thread R. Michael Weylandt
The dput() command is essential in doing so. Michael On Dec 11, 2011, at 8:50 AM, Tal Galili wrote: > Yes - > E-mail us reproducible code... > > > Contact > Details:--- > Contact me: tal.gal...@gmail.com | 972-52-7275845 >

Re: [R] not complete character in csv file

2011-12-12 Thread threshold
Indeed in txt it looks fine. Anyway, I must stay without 0 because csv is THE format. I got another question. why for Table <- matrix(0,8,3) day = "Monday" Table[1,1]=day all other elements become characters too? Thanks, robert -- View this message in context: http://r.789695.n4.nabble.com/n

Re: [R] [R-SIG-Finance] Question about fitting seasonal ARIMA in R?

2011-12-12 Thread Zachary Mayer
Hi Michael, As far as I know, there is no Arima function in R that allows multiple seasonal patterns. There's 2 approaches you can take: 1. Use a matrix of dummy variables (e.g. jan/feb/mar/...dec and mon/tues/wed/...sun) as an xreg term in the arima function. 2. Use a matrix of Fourrier terms to

[R] Polygon

2011-12-12 Thread Komine
Hi everybody, I have a matrix with 3 columns (Date, MeanArea and SdArea). I want to draw a figure showing the variable MeanArea in terms of the Date. But instead to use the variable SdArea as bar error, I want to use “polygon error”. I use this code but the output does not seem good. Polyhttp://r.

[R] Automated Regressions

2011-12-12 Thread ryanSt
Hello R-Experts, I've got a question, concerning the automation of a number of regressions (lm) with the help of a loop (for i in ). The situation is as follows (the code follows after that): I have my data in an access database. I have historical data for 2000 parts, for each of this parts I

Re: [R] i can't read large NETCDF file like CRU

2011-12-12 Thread David William Pierce
On Mon, Dec 12, 2011 at 2:19 AM, tony333 wrote: > i use library(ncdf) to read this file as follow > library(ncdf) > sst.nc = open.ncdf(title) > lonall = get.var.ncdf(sst.nc,'lon') > latall = get.var.ncdf(sst.nc,'lat') > precip = get.var.ncdf(sst.nc,'pre') > close(sst.nc) > if i use this method my

[R] serial.test

2011-12-12 Thread Alemtsehai Abate
Dear R users, I want to test for serial correlation in each equation of VAR. The multivariate version of this test, for a vector X of class VAR for instance is var.ser<-serial.test(X,lags.pt=16,type="PT.adjusted") ### in the vars package Would any of you suggest me how to modify this to test fo

Re: [R] Please sign me out from the r-help group. Thanks!

2011-12-12 Thread Sarah Goslee
Please sign yourself out, using the linke that appears at the bottom of each and every message from the list. On Mon, Dec 12, 2011 at 9:48 AM, Kaigang Li wrote: > >        [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list >

Re: [R] how to colour labels (each label with a colour) in a dendrogram?

2011-12-12 Thread barbara costa
Thanks a lot. I didn't find that. I prefered the option with class discovery package which we have to install from OOMPA project. barbara On 12 December 2011 11:58, Sarah Goslee wrote: > Did you try this: > > http://r.789695.n4.nabble.com/coloring-leaves-in-a-hclust-or-dendrogram-plot-td795496.h

[R] Please sign me out from the r-help group. Thanks!

2011-12-12 Thread Kaigang Li
[[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 provide commented, minimal, self-contained, r

Re: [R] littler: Use for batch processing of data sets: How to pass filename?

2011-12-12 Thread R. Michael Weylandt
Why can't you just replace "temp/data" with filename (no quotes)? I'm not sure I get the question... Michael On Dec 12, 2011, at 5:26 AM, Paul Menzel wrote: > Dear R folks, > > > I have several data sets I want to process automatically using R. I > found littler [1] and thought this will do

Re: [R] Bioconductor. MA plot for qPCR array

2011-12-12 Thread R. Michael Weylandt
This question is perhaps best asked on the specialized Bioconductor mailing list. The audience there is quite knowledgeable and will certainly be able to help. Michael On Dec 11, 2011, at 8:08 AM, ali_protocol wrote: > Dear all, > > Is there anyway too generate MA plot for 2 qPCR assays (a

Re: [R] not complete character in csv file

2011-12-12 Thread David Winsemius
On Dec 12, 2011, at 7:23 AM, threshold wrote: Dear R users, I got the following problem. Given that data[3,2] [1] "010252" Code: intro <- data.frame() intro[1,1] <- as.character(data[3,2]) write.csv(intro, file='intro.csv') In 'intro.csv' file I am loosing the 0 in frot of 10252, which I

[R] "plinear"

2011-12-12 Thread Liam Brown
I was wondering if there is way to place constraints upon the "plinear" algorithm of nls, or rather is there a manner in which this can be achieved because nls does not allow this to be done. I only want to place constraints on one of the nonlinear parameters, a, such that it is between 0 and

Re: [R] Package/command for creating a table of panel models ?

2011-12-12 Thread ManuelS
Thank you! I'm going to look into that straight away. Manu -- View this message in context: http://r.789695.n4.nabble.com/Package-command-for-creating-a-table-of-panel-models-tp4185744p4186077.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] shorter way of coding

2011-12-12 Thread Petr PIKAL
Hi > > Dear R users, > > I am using the code below to generate a fitted value of b. I have about > 300 different values for for y (y1, y2, ...y300) which means I will have > to write the code below 300 times to generate the 300 different fitted > values for y. Is there a short way of doing t

Re: [R] i can't read large NETCDF file like CRU

2011-12-12 Thread Paul Hiemstra
On 12/12/2011 10:19 AM, tony333 wrote: > i use library(ncdf) to read this file as follow > library(ncdf) > sst.nc = open.ncdf(title) > lonall = get.var.ncdf(sst.nc,'lon') > latall = get.var.ncdf(sst.nc,'lat') > precip = get.var.ncdf(sst.nc,'pre') > close(sst.nc) > if i use this method my pc freeze

Re: [R] Script analysing

2011-12-12 Thread Paul Hiemstra
On 12/12/2011 10:39 AM, Alexander wrote: > Hello, > I am trying to write a script to analyse R scripts, which contain only > functions. Therefor, I want to test the R script if it contains onyl correct > code. Is there a nicer and more efficent function than > > test <- try(source("someRscript")) >

Re: [R] not complete character in csv file

2011-12-12 Thread Jean V Adams
threshold wrote on 12/12/2011 06:23:33 AM: > Dear R users, I got the following problem. Given that > > > data[3,2] > [1] "010252" > > Code: > intro <- data.frame() > intro[1,1] <- as.character(data[3,2]) > write.csv(intro, file='intro.csv') > > In 'intro.csv' file I am loosing the 0 in frot of

Re: [R] Script analysing

2011-12-12 Thread Paul Hiemstra
On 12/12/2011 10:39 AM, Alexander wrote: > Hello, > I am trying to write a script to analyse R scripts, which contain only > functions. Therefor, I want to test the R script if it contains onyl correct > code. Is there a nicer and more efficent function than > > test <- try(source("someRscript")) >

Re: [R] shorter way of coding

2011-12-12 Thread Paul Hiemstra
On 12/12/2011 01:16 PM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fitted value of b. I have about 300 > different values for for y (y1, y2, ...y300) which means I will have to write > the code below 300 times to generate the 300 different fitted values f

Re: [R] shorter way of coding

2011-12-12 Thread Sarah Goslee
This isn't a reproducible example, so I can't provide code, but I would put all the y variables in a list and use lapply(). Sarah On Mon, Dec 12, 2011 at 8:16 AM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fitted value of b. I have about 300 > different

Re: [R] prop.test() and the simultaneous confidence interval for multiple proportions in R

2011-12-12 Thread Jean V Adams
?prop.test The very first line in the help file on the function prop.test(): "prop.test can be used for testing the null that the proportions (probabilities of success) in several groups are the same ..." How to interpret the results of the prop.test() you ran? The proportion preferring

[R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Dear R users, I am using the code below to generate a fitted value of b. I have about 300 different values for for y (y1, y2, ...y300) which means I will have to write the code below 300 times to generate the 300 different fitted values for y. Is there a short way of doing that ? Many thanks

Re: [R] Dividing rows when time is overlapping

2011-12-12 Thread Jean V Adams
PEL wrote on 12/07/2011 02:37:42 PM: > Hi all, > > I have dataframe that was created from the fusion of two dataframes. Both > spanned over the same time intervall but contained different information. > When I put them together, the info overlapped since there is no holes in the > time interva

[R] not complete character in csv file

2011-12-12 Thread threshold
Dear R users, I got the following problem. Given that > data[3,2] [1] "010252" Code: intro <- data.frame() intro[1,1] <- as.character(data[3,2]) write.csv(intro, file='intro.csv') In 'intro.csv' file I am loosing the 0 in frot of 10252, which I need. Is there a way to keep the full character sav

Re: [R] round Date object to 10 minutes intervals?

2011-12-12 Thread kmay
Dear Mr. Ripley, your answer perfectly fits my needs, thank you very much. (And yes, rounding 5 to even is what I wanted). Prof Brian Ripley wrote > > t2 <- strptime(timeStamp, format="%d.%m.%Y %H:%M") > t2$min <- round(t2$min, -1) >> format(t2, "%d.%m.%Y %H:%M") > [1] "31.03.2011 09:30" "31.03

Re: [R] Colours for sunflowerplot

2011-12-12 Thread Nicola Van Wilgen
Hi Jim, I think this will work well for what I need it for - thanks a lot! I would still be interested (for interest sake) if anyone knows how to get this to work using sunflower plot. Thanks again, Nicola -Original Message- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: 12 Decem

[R] calculating logit parameters (odd ratio is exactly one or zero)

2011-12-12 Thread wim nursal
Dear statistician experts, Sorry if this is a trivial question, or the old same question (i don't know what is the efficient key word for this issue). In order to understand the calculation of parameter of logistic regression, I did an exercise through spreadsheet following the procedural example

[R] Rsolnp package: warning messages

2011-12-12 Thread Diogo Alagador
Dear, I am using the solnp command (package Rsolnp) for a problem with equality and inequality constraints. I am not getting convergence for my problem but apart that I get 1 warning per iteration saying: ?In cbind(temp, funv) : number of rows of result is not a multiple of vector length

Re: [R] color2D.maplot fixed color range

2011-12-12 Thread David Winsemius
On Dec 11, 2011, at 10:19 PM, jalfaro wrote: Hello, Were you ever able to find a solution to your problem? I have been trying on and off to solve this problem for several months now. I would love to hear if you found a solution. Neither the person who posted the problem a year ago or you h

  1   2   >