Re: [R] SEM specify RAM model

2014-06-06 Thread John Fox
Dear George, It's not entirely clear to me what you're trying to do, and where the loop comes in. As has already been suggested, you can store the model specification in a file or files. Also, the RAM form of the model can be specified as a character matrix, a numeric matrix, or a semmod

Re: [R] R 3.1.0 interpreting large negative seconds since epoch as LMT?

2014-06-06 Thread peter dalgaard
On 05 Jun 2014, at 15:43 , Pfuntner, John john.pfunt...@teradata.com wrote: I'm seeing a weird difference in behavior between R versions 3.0.2 and 3.1.0. Consider this session from version 3.0.2: secs = c(-6327530133, -632753013, -63275301, -6327530, -632753, -63275, -6327, -632, -63)

[R] halfwidth in twoord.plot

2014-06-06 Thread Shane Carey
Hi, Could someone please explain (in lay mans terms) what the halfwidth variable in the twoord.plot does. I dont understand it. Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Mapping

2014-06-06 Thread Roger Bivand
Tom Detzel Tom.Detzel at propublica.org writes: Hey Folks, Apologies in advance if this has been covered. I'm taking on a simple mapping project. What packages, tutorials and examples would you recommend for a beginning mapper in R? The general advice is to look for CRAN Task Views,

Re: [R] halfwidth in twoord.plot

2014-06-06 Thread Jim Lemon
On Fri, 6 Jun 2014 10:38:24 AM Shane Carey wrote: Hi, Could someone please explain (in lay mans terms) what the halfwidth variable in the twoord.plot does. I dont understand it. Hi Shane, The halfwidth argument is used to set the width of bars if any are displayed. As the x units of a plot

Re: [R] SAS VS R - What type of analysis is better?

2014-06-06 Thread Frank Harrell
I can't think of an example where R does not work better than SAS except for a few cases of mixed effects regression models and for processing enormous datasets when the R user does not want to learn about the latest R tools for large datasets. I quit using SAS in 1991 (in favor of S-Plus and

Re: [R] SAS VS R - What type of analysis is better?

2014-06-06 Thread Frede Aakmann Tøgersen
Hi SAS is famous for handling large data sets. For more than 10 years ago S+ introduced a module for large data sets. Never used it, more money for license for a poor research institute. Today I have a laptop with 8 Gb. If that's not enough then the head nodes on our cluster has 64 Gb and

[R] What is SE and how do you calculate it in svymean()?

2014-06-06 Thread Ryan de Vera
Hello all, I have been experimenting with svymean() and I am confused on what the output is. The data I have looks like: *PSU* * STRATUM* *WEIGHTS* * COUNTS* *1* 1 1 2.0 1 *2* 2 1 1.0 1 *3* 3 1 1.0 1 *4* 3 1 2.5 1 *5* 2 1 1.0 1

Re: [R] SAS VS R - What type of analysis is better?

2014-06-06 Thread Bert Gunter
Please do your homework. The place to start for questions like this is the CRAN Task Views page, where you will find a High Performance Computing topic that links here: http://cran.r-project.org/web/views/HighPerformanceComputing.html If nothing there suits, then re-post with details as to why

Re: [R] How do I do a conditional sum which only looks between certain date criteria

2014-06-06 Thread arun
If the data is like: dat1 - read.table(text=date, user, items_bought 2013-01-01, x, 2 2013-01-02, x, 1 2013-01-05, x, 1 2013-01-06, x, 5 2013-01-11, x, 3 2013-01-14, x, 1 2013-01-01, y, 1 2013-01-02, y, 1 2013-01-03, y, 0 2013-01-04, y, 5 2013-01-05, y, 6 2013-01-06, y,

Re: [R] R 3.1.0 interpreting large negative seconds since epoch as LMT?

2014-06-06 Thread Prof Brian Ripley
On 06/06/2014 10:03, peter dalgaard wrote: On 05 Jun 2014, at 15:43 , Pfuntner, John john.pfunt...@teradata.com wrote: I'm seeing a weird difference in behavior between R versions 3.0.2 and 3.1.0. Consider this session from version 3.0.2: secs = c(-6327530133, -632753013, -63275301,

Re: [R] Why have my glmms stopped converging (lme4)

2014-06-06 Thread Ben Bolker
Heather Baldwin heather.baldwin at uni-ulm.de writes: I have four sets of glmms (binomial, logit-linked) which I have run in various incarnations with no problems over the last weeks. All converged, data assumptions checked, reasonable goodness-of-fit (0.75-85). They are based on three

[R] command

2014-06-06 Thread kafi dano
Hi for all user in R please send me the command of least absolute value (LAV ) in R programming TQ.   Kafi Dano Pati Ph.D candidate ( mathematics/statistics) Department of mathematical Science/ faculty of Science University Technology Malaysia 81310 UTM, Johor Bahru, Johor, Malaysia IC.

[R] Course: Introduction to Bayesian Data Analysis using WinBUGS and R

2014-06-06 Thread Dr. Pablo E. Verde
Dear list members, Apologies for cross-posting. Please, find below the information of an introductory Bayesian Data Analysis course with R and WinBUGS. If you have any question don't hesitate to contact me. Best regards, Pablo ++ Course:

[R] RODBC - address 0x407, cause 'memory not mapped'

2014-06-06 Thread marcos.takahashi
Hi guys, I am running a simple R script using RODBC that follows: library(RODBC) ch - odbcConnect(con) cust- sqlQuery(ch, select id_customer, first_name from customers limit 100) sales- sqlQuery(ch, select id_order, revenue from sales limit 100) - And it

[R] Use of library(X) in the code of library X.

2014-06-06 Thread Bart Kastermans
To improve my R skills I try to understand some R code written by others. Mostly I am looking at the code of packages I use. Today I looked at the code for the caret package http://cran.r-project.org/src/contrib/caret_6.0-30.tar.gz in particular at the file R/adaptive.R This file starts

Re: [R] R 3.1.0 interpreting large negative seconds since epoch as LMT?

2014-06-06 Thread peter dalgaard
On 06 Jun 2014, at 16:46 , Prof Brian Ripley rip...@stats.ox.ac.uk wrote: so that says New York switched to EST in 1883 by 3:58 (not 4:02). As I also would have gotten, had I been able to subtract 44:27 from 48:25 properly Tnx -- Peter Dalgaard, Professor Center for Statistics,

Re: [R] RODBC - address 0x407, cause 'memory not mapped'

2014-06-06 Thread Jeff Newmiller
con is probably not a valid ODBC DSN. You need to study how ODBC works independently of R... we cannot tell you what you should be putting there instead. --- Jeff NewmillerThe . .

[R] Revolutions blog: May 2014 roundup

2014-06-06 Thread David Smith
Revolution Analytics staff write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from

Re: [R] RODBC - address 0x407, cause 'memory not mapped'

2014-06-06 Thread David Winsemius
On Jun 6, 2014, at 8:45 AM, Jeff Newmiller wrote: con is probably not a valid ODBC DSN. You need to study how ODBC works independently of R... we cannot tell you what you should be putting there instead. But what ever would be the correct answer, it should not segfault. I'm reasonable

Re: [R] Mapping

2014-06-06 Thread David Winsemius
On Jun 6, 2014, at 3:15 AM, Roger Bivand wrote: Tom Detzel Tom.Detzel at propublica.org writes: Hey Folks, Apologies in advance if this has been covered. I'm taking on a simple mapping project. What packages, tutorials and examples would you recommend for a beginning mapper in R?

Re: [R] Use of library(X) in the code of library X.

2014-06-06 Thread Duncan Murdoch
On 06/06/2014 10:26 AM, Bart Kastermans wrote: To improve my R skills I try to understand some R code written by others. Mostly I am looking at the code of packages I use. Today I looked at the code for the caret package http://cran.r-project.org/src/contrib/caret_6.0-30.tar.gz in

Re: [R] Use of library(X) in the code of library X.

2014-06-06 Thread Max Kuhn
That is legacy code but there was a good reason back then. caret is written to use parallel processing via the foreach package. There were some cases where the worker processes did not load the required packages (even when I used foreach's .packages argument) so I would do it explicitly. I don't

Re: [R] command

2014-06-06 Thread Timothy W. Cook
GIYF http://goo.gl/yUAIJl On Fri, Jun 6, 2014 at 5:42 AM, kafi dano kafi_d...@yahoo.com wrote: Hi for all user in R please send me the command of least absolute value (LAV ) in R programming TQ. Kafi Dano Pati Ph.D candidate ( mathematics/statistics) Department of mathematical

[R] Identifying one or more TRUE in the middle of an array

2014-06-06 Thread Fisher Dennis
R 3.1.0 OS X Colleagues I have an array (I am using T/F rather than TRUE/FALSE for convenience) that could have patterns like: c(T, T, T, F, F, F, T, F, T, T, T) ## T at either end, a single T in the middle c(F, F, F, F, F, T, F, F, T, T, T) ## T at

Re: [R] Identifying one or more TRUE in the middle of an array

2014-06-06 Thread Peter Langfelder
Not sure if this is better than your brute force and you may be able to simplify it... notStart = function(x) { n = length(x) i0 = which(x); n0 = length(i0); i0!=c(1:n)[1:n0]; } notStartNorEnd = function(x) { which(x)[notStart(x) rev(notStart(rev(x)))] } notStartNorEnd(c(F, F, F))

Re: [R] Identifying one or more TRUE in the middle of an array

2014-06-06 Thread ONKELINX, Thierry
Here is my solution. falses - which(!x) first.false - head(falses, 1) last.false - tail(falses, 1) which(x[first.false:last.false]) + first.false - 1 Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie

Re: [R] What is SE and how do you calculate it in svymean()?

2014-06-06 Thread Anthony Damico
it is the survey design-adjusted standard error. you can view what's going on by typing `survey:::svymean.survey.design` and `survey:::svyCprod` :) On Fri, Jun 6, 2014 at 10:03 AM, Ryan de Vera ryan.devera...@gmail.com wrote: Hello all, I have been experimenting with svymean() and I am

Re: [R] RODBC - address 0x407, cause 'memory not mapped'

2014-06-06 Thread marcos.takahashi
Oh, forgot telling the specifications: R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit) Database: Mysql ODBC Connector: libmyodbc I've configured ODBC Connection using this hot-to: https://help.ubuntu.com/community/ODBC -- View this message in context:

[R] Package 'effects' plotting allEffects question

2014-06-06 Thread Nwinters
Is there a way to plot just the response function for one variable, instead of every variable on the same plot? my model has 13 variables and the plot produces a graph for each of these on the same plot, which is useless. -- View this message in context:

[R] Help with factor levels and reference level

2014-06-06 Thread Nwinters
I have a variable coded in Stata as follows: ** *gen sat_pm25cat_=. replace sat_pm25cat_= 1 if (sat_pm25=4 sat_pm25=7.1 sat_pm25!=.) replace sat_pm25cat_= 2 if (sat_pm25=7.1 sat_pm25=10) replace sat_pm25cat_= 3 if (sat_pm25=10.1 sat_pm25=11.3) replace sat_pm25cat_= 4 if (sat_pm25=11.4

[R] Package 'effects' plotting allEffects question

2014-06-06 Thread Nwinters
Is there a way to plot just the response function for one variable, instead of every variable on the same plot? my model has 13 variables and the plot produces a graph for each of these on the same plot, which is useless. -- View this message in context:

Re: [R] Data framing question

2014-06-06 Thread arun
Hi, May be this helps: dat1 - read.table(text=identif roa eta 1 7 5 2 8 9 2 9 8 2 10 7 3 11 6 3 1 4 3 2 2 4 3 3 4 6 5,sep=,header=TRUE) dat2 -within(dat1, {     eta1 - ave(eta, identif, FUN = function(x) c(NA, diff(x)))     roa1 - ave(roa, identif, FUN = function(x) c(NA, x[-length(x)])) })

Re: [R] Help with factor levels and reference level

2014-06-06 Thread David Winsemius
On Jun 6, 2014, at 11:16 AM, Nwinters wrote: I have a variable coded in Stata as follows: ** *gen sat_pm25cat_=. replace sat_pm25cat_= 1 if (sat_pm25=4 sat_pm25=7.1 sat_pm25!=.) replace sat_pm25cat_= 2 if (sat_pm25=7.1 sat_pm25=10) replace sat_pm25cat_= 3 if (sat_pm25=10.1

Re: [R] Help with factor levels and reference level

2014-06-06 Thread Bert Gunter
... But I think the OP should consult his/her local statistician and not do this. 1. Categorizing a continuous variable generally loses information. While there may be times when this may be appropriate, generally continuous variables should be modeled as such. 2. You also lose the ordering with