Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread Marc Schwartz
in ?stepAIC in V&R's MASS package, which is a default part of R and is linked in the See Also section of ?step. To your second question, you can't. It uses AIC and this has also been discussed frequently on this list. You might look at Frank's fastbw() function in his 'rm

Re: [R] Boxplot in R

2012-11-16 Thread Marc Schwartz
lts to 1.5. The See Also on that help page points you to ?boxplot.stats "which does the computation" and has additional detail. Both pages list references. If all else fails, since R is open source, you can always look at the source code for both functions to follow exactly

Re: [R] Deleting rows with special character

2012-11-16 Thread Marc Schwartz
ply(testdata, 1, function(x)all(x == "A")), > ,drop = FALSE]) user system elapsed 0.454 0.047 0.503 > system.time(Sub2 <- testdata[rowSums(testdata == "A") == ncol(testdata), , > drop = FALSE]) user system elapsed 0.089 0.001 0.090 >

Re: [R] install own package ?

2012-11-14 Thread Marc Schwartz
"pkgType") [1] "mac.binary.leopard" which is referenced in ?install.packages. It is looking for a binary version of your package, rather than a source package. You need to use: install.packages("/Users/hoffmann/R/cwhmisc_4.0.tar.gz", repos = NULL,

Re: [R] no y-axis

2012-11-12 Thread Marc Schwartz
ecifically, 'bty', for options there. Or, you can always use ?segments, knowing that par("usr") gives you the coordinates of the plot region corners... Regards, Marc Schwartz On Nov 12, 2012, at 1:04 PM, Rui Barradas wrote: > Hello, > > If you want to completely r

Re: [R] Logistic curve fitting with y values >1 (R version 2.15.2, OS is OS X 10.6.8)

2012-11-09 Thread Marc Schwartz
-fit logistic curve for this data in R? > > - J You might want to look at John Fox' appendix on non-linear models for some additional insights: http://socserv.mcmaster.ca/jfox/Books/Companion/appendix/Appendix-Nonlinear-Regression.pdf Regards, Marc Schwartz _

Re: [R] Remove missings (quick question)

2012-11-09 Thread Marc Schwartz
On Nov 9, 2012, at 11:23 AM, Bert Gunter wrote: > Marc et. al: > > On Fri, Nov 9, 2012 at 9:05 AM, Marc Schwartz wrote: >> On Nov 9, 2012, at 10:50 AM, Eiko Fried wrote: >> >>> A colleague wrote the following syntax for me: >>> >>> D =

Re: [R] Remove missings (quick question)

2012-11-09 Thread Marc Schwartz
t so that you don't have to post-process it. See ?read.csv for more info. Once that is done, R's default behavior is to remove observations with any missing data (eg. NA values) when using modeling functions. Or you can pre-process using:

Re: [R] Obtaining R-squared value in Logistic Regression

2012-11-08 Thread Marc Schwartz
rovide Nagelkerke's pseudo R^2 as part of the model output. However, be sure you understand what it means in the context of logistic regression. It is not the same as the R^2 in OLS regression. Regards, Marc Schwartz __ R-help@r-project.org mailin

Re: [R] Formatting digits in a table with mix of numbers and characters

2012-11-08 Thread Marc Schwartz
smart enough to differentiate between an object named 'table' and the built-in function table(), I would avoid it, because there may be times when you will run into a problem and be scratching your head as to the source of the error. Vec <- c(12.34567, "--", 10, 12.

Re: [R] How to include CI in a grouped barplot?

2012-11-08 Thread Marc Schwartz
t barplot() returns the bar midpoints, which then allow you to position vertical lines for each bar center. A conceptual note, which is that this format can be ok for proportions/percentages, but you will recommendations against using this format to display continuous d

Re: [R] Controlling R fonts through LaTeX

2012-11-08 Thread Marc Schwartz
and the same font will then be > used throughout. There is too much text to use PSFrag. > > Thanks for your help! > Karen Take a look at ?ps.options, which is referenced in ?postscript in the Details and See Also sections there. Regards, Marc Schwartz

Re: [R] Absolute path in gdata library

2012-11-08 Thread Marc Schwartz
On Nov 8, 2012, at 9:33 AM, Prof Brian Ripley wrote: > On 08/11/2012 15:28, Marc Schwartz wrote: >> >> On Nov 8, 2012, at 12:57 AM, Prof Brian Ripley wrote: >> >>> On 07/11/2012 23:12, Marc Schwartz wrote: >>>> On Nov 7, 2012, at 4:58 PM, r wrot

Re: [R] Executing SAS Codes in R

2012-11-08 Thread Marc Schwartz
ge: http://cran.r-project.org/web/packages/sas7bdat/index.html Regards, Marc Schwartz __ 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 a

Re: [R] Absolute path in gdata library

2012-11-08 Thread Marc Schwartz
On Nov 8, 2012, at 12:57 AM, Prof Brian Ripley wrote: > On 07/11/2012 23:12, Marc Schwartz wrote: >> On Nov 7, 2012, at 4:58 PM, r wrote: >> >>> Dear list, I have some .xls files that I need to read into R. I am >>> able to do so using read.xls in the gdat

Re: [R] Absolute path in gdata library

2012-11-07 Thread Marc Schwartz
en do tilde expansion, etc. when relative file paths are passed rather than absolute paths are used. A workaround for now, would be to wrap your filename in that function in your code, so that when you use relative paths, the appropriate expansion is used and passed to the gdata functio

Re: [R] extract indep vars from formula

2012-11-07 Thread Marc Schwartz
'poly(x, 3)'). A general approach would be: all.vars(formula(MODEL)) where the response variable would typically be the first element in the returned vector. So, if you just want the IV's you could use: all.vars(formula(MODEL))[-1] An example

Re: [R] r-help or r-devel ?

2012-11-05 Thread Marc Schwartz
ne those things, then post to R-Devel, but please do subscribe first: https://stat.ethz.ch/mailman/listinfo/r-devel as it will save the R-Devel list moderators from having to manually approve each of your posts, therefore making your posting more expedient. Thanks and regards, Marc Schwartz ___

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Marc Schwartz
nment in which Sweave is operating are changed. Perhaps not all, since some things still seem to work. I have never used setwd() within a .Rnw file, not because of prior experience, but because I have never needed to. Just use the full path to whatever external files you need, rather than c

Re: [R] R 2.15.2 is released

2012-11-04 Thread Marc Schwartz
; R version 2.15.1. > If 1.2.3 is the current latest version of X, then update.packages() will > _not_ try to update it, but, apparently, at least for some packages, I > do need to rebuild them against the new R version 2.15.2. > > Thanks. Take note of the 'checkBuilt

Re: [R] Aggregate Table Data into Cell Frequencies

2012-10-31 Thread Marc Schwartz
"temp16", "temp17", "temp17", "temp17", "temp18", "temp18", >"temp18", "temp18", "temp18", "temp19", "temp2", "temp2", >"temp2", "temp20", &q

Re: [R] Opening SAS file using read.sas7bdat() function in sas7bdat library.

2012-10-29 Thread Marc Schwartz
On Oct 29, 2012, at 2:04 PM, Duncan Murdoch wrote: > On 29/10/2012 2:54 PM, Marc Schwartz wrote: >> On Oct 29, 2012, at 1:28 PM, Praveen Surendran >> wrote: >> >> > Hi, >> > >> > >> > >> > I have a file in .sas7bdat for

Re: [R] Opening SAS file using read.sas7bdat() function in sas7bdat library.

2012-10-29 Thread Marc Schwartz
; unknown host X64_7PRO". > > Could someone tell me what this error means? > > Thank you, > > Praveen. More than likely, a similar problem as in this recent thread, but for 64 bit, rather than 32 bit: https://stat.ethz.c

Re: [R] Package RODBC sqlQueries

2012-10-26 Thread Marc Schwartz
e query using ?paste Query <- paste("SELECT tblDataFieldRawSiteVisit.*", "FROM tblDataFieldRawSiteVisit", "WHERE (((tblDataFieldRawSiteVisit.dataForm)=\"Oyster Transition Plan", "Site Mapping Detail\"));&q

Re: [R] Kaplan Meier Post Hoc?

2012-10-24 Thread Marc Schwartz
.adjust, which provides a generic framework for multiple pairwise comparison adjustment methods. The most conservative, but not always the best approach, would of course be Bonferroni. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat

Re: [R] Error in contrasts message when using logistic regression code.

2012-10-23 Thread Marc Schwartz
a set (to make sure that you have factors and not character vectors) and to get a sense for the distribution of your IVs. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] cannot coerce class '"rle"' into a data.frame

2012-10-16 Thread Marc Schwartz
ribute, you can unclass() it and then coerce to a data.frame: > as.data.frame(unclass(RES)) lengths values 1 5 10 2 4 9 3 3 8 4 2 7 5 1 6 > str(as.data.frame(unclass(RES))) 'data.frame': 5 obs. of 2 variables: $ len

Re: [R] Loss of dimensions in subsetting arrays

2012-10-12 Thread Marc Schwartz
turn this behaviour off? > > best, > Markku Karhunen > Uni. Helsinki You can save yourself a lot of time if you visit the R FAQ as your first action item when such questions come up. In this case: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-my-matrices-lose-dimensions_003f

Re: [R] Options to extend memory limit

2012-10-11 Thread Marc Schwartz
nt to evaluate some of the Large Memory options on the HPC task view: http://cran.r-project.org/web/views/HighPerformanceComputing.html or of course install more RAM. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] PKPD modelling in R

2012-10-08 Thread Marc Schwartz
result. It already has NOTE entries in the CRAN checks for problems already found. If you have not, you might want to look at the CRAN task view here: http://cran.r-project.org/web/views/Pharmacokinetics.html which might provide some possible alternatives. Regards, Marc Schwartz __

Re: [R] LaTeX consistent publication graphics from R and Comparison of GLE and R

2012-10-06 Thread Marc Schwartz
at 8:14 AM, Frank Harrell wrote: > Hi Marc, > > It would be interesting to compare with tikz for ease of use. > > As an aside I've been wishing that someone would write an R function for > creating clinical trial disposition charts using tikz or pstricks ... > >

Re: [R] LaTeX consistent publication graphics from R and Comparison of GLE and R

2012-10-05 Thread Marc Schwartz
rious other online resources for using PSTricks. Keep in mind that since this is PostScript based, you need to use a latex + dvips + ps2pdf sequence, rather than just pdflatex. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://s

Re: [R] can stepAIC be customized to exclude coefficients with p-value less than certain values?

2012-10-04 Thread Marc Schwartz
do >> that? SAS seems to be able to customized stepwise function with p-value >> or cooks'd. > > You might take some time to ponder the possibility that the fact that it's > not easy in R might be useful information in its own right. I nominat

Re: [R] Rainflow, range pair counting

2012-10-04 Thread Marc Schwartz
in. Regards, Marc Schwartz On Oct 4, 2012, at 10:27 AM, R. Michael Weylandt wrote: > R is used by many many folks, and most of us don't have the domain > knowledge to make heads or tails of what you're mentioning here. > You'll need to greatly clarify and perhaps ask on

Re: [R] Regarding licensing Terms

2012-10-03 Thread Marc Schwartz
On Oct 3, 2012, at 9:56 AM, Spencer Graves wrote: > On 10/3/2012 7:26 AM, Marc Schwartz wrote: >> On Oct 3, 2012, at 4:49 AM, Narendra wrote: >> >>> Hi, >>> >>> I have developed one application using ggmap package.It is based on google >>> m

Re: [R] Regarding licensing Terms

2012-10-03 Thread Marc Schwartz
and distributing. In the latter case, whether you plan to charge for the resultant product or make it available for free, is irrelevant. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] Importing a CSV file

2012-09-19 Thread Marc Schwartz
;> someone who uses Windows! > > I use Windows and the answer is no, the four backslashes don't make sense, > because like Frans said, c:\\ becomes c:\ > (There is no such thing as c: ---> c:\\). > > Rui Barradas Ahoy Mateys, Not to mention, creating file paths on W

Re: [R] Search for locations of subsequences?

2012-08-28 Thread Marc Schwartz
p/12/02/4201.html that has various solutions and towards the end has a post with some timings. Regards, Marc Schwartz __ 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/

Re: [R] variable scope

2012-08-28 Thread Marc Schwartz
, which will return an array by default: NewObject <- replicate(10, DoSomethingHere...) Or...just create a function that takes requisite arguments and runs the for() loop within the function body and returns the object you actually need. That way, any variables cre

Re: [R] Error in Installing RODBC in Linux R

2012-08-28 Thread Marc Schwartz
g the use of the package which can be accessed by using: vignette("RODBC") Regards, Marc Schwartz __ 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-

Re: [R] Reading pdf file into R

2012-08-27 Thread Marc Schwartz
rse, the use of pdftotext itself is predicated upon the source PDF not being a scanned image of a text page, in which case you would need an OCR based application. Regards, Marc Schwartz On Aug 27, 2012, at 1:48 PM, Christofer Bogaso wrote: > Thanks Berend for your reply. However I was expectin

Re: [R] if then in R versus SAS

2012-08-24 Thread Marc Schwartz
ting a copy of: R for SAS and SPSS Users Robert Muenchen http://www.amazon.com/SAS-SPSS-Users-Statistics-Computing/dp/0387094172 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] R minimal calculation error

2012-08-24 Thread Marc Schwartz
ow be 0! > However, I'm getting results like -2.315223e-18 > This is really near to 0 but not very aesthetic. > > Can I prevent this? Or is this behaviour desired? > Thank you very much! > Burtan Read this: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_

Re: [R] make check fails two tests on RHEL 6 build

2012-08-21 Thread Marc Schwartz
/wiki/EPEL Installing R from there is as easy as adding the EPEL to your repo list and using 'yum install R' as root (eg. via sudo) from the CLI. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Sweave: R chunk inside caption?

2012-08-21 Thread Marc Schwartz
hunk} \begin{Sinput} > plot(1:10) \end{Sinput} \end{Schunk} \includegraphics{caption-001} \caption{This is the caption 1.41 with an R scalar included} \end{figure} \end{document} In general, if the R code is not very simple (eg. it is multiple lines/func

Re: [R] A LaTeX question -- Hope people won't mind

2012-08-20 Thread Marc Schwartz
example above: \caption[Results for Random Forest Model Using Scoring Data] {Results for Random Forest Model Using Scoring Data (N = 700)} Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

Re: [R] jpeglib.h not found

2012-08-20 Thread Marc Schwartz
specific R e-mail list at: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora You should subscribe to and post there with any follow ups or future Fedora specific R queries. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.e

Re: [R] problem installing mgcv

2012-08-14 Thread Marc Schwartz
#How-can-R-for-Mac-OS-X-be-uninstalled_003f Lastly, for any follow ups, I would recommend that you post to r-sig-mac rather than r-help, since the former is focused on using R on Macs. More info here: https://stat.ethz.ch/mailman/listinfo/r-sig-mac Regards, Marc Schwartz __

Re: [R] subsetting levels of a vector

2012-08-10 Thread Marc Schwartz
)) If the levels you do not want are few in number, it may be easier to use: NewDF <- subset(DF, !Electrode %in% c("Levels", "You", "Don't", "Want")) Note the use of '!' before Electrode to negate the boolean logic. Regards, Marc Schwartz

Re: [R] test if elements of a character vector contain letters

2012-08-07 Thread Marc Schwartz
On Aug 7, 2012, at 3:18 PM, Marc Schwartz wrote: > > On Aug 7, 2012, at 3:02 PM, Liviu Andronic wrote: > >> On Mon, Aug 6, 2012 at 7:35 PM, Marc Schwartz wrote: >>> is.letter <- function(x) grepl("[[:alpha:]]", x) >>> is.number <- functi

Re: [R] test if elements of a character vector contain letters

2012-08-07 Thread Marc Schwartz
On Aug 7, 2012, at 3:02 PM, Liviu Andronic wrote: > On Mon, Aug 6, 2012 at 7:35 PM, Marc Schwartz wrote: >> is.letter <- function(x) grepl("[[:alpha:]]", x) >> is.number <- function(x) grepl("[[:digit:]]", x) >> > > Another follow-up. To t

Re: [R] r-forge down?

2012-08-07 Thread Marc Schwartz
That's not the same site, as is noted at the bottom of that site's main page. It does appear that R-Forge is down, albeit the domain is resolving and the server IP is responding quickly to pings with no packet loss. Regards, Marc Schwartz On Aug 7, 2012, at 5:29 PM, Roy Mendelss

Re: [R] test if elements of a character vector contain letters

2012-08-06 Thread Marc Schwartz
On Aug 6, 2012, at 12:06 PM, Marc Schwartz wrote: > Perhaps I am missing something, but why use sapply() when grepl() is already > vectorized? > > is.letter <- function(x) grepl("[:alpha:]", x) > is.number <- function(x) grepl("[:digit:]", x) Sorry,

Re: [R] test if elements of a character vector contain letters

2012-08-06 Thread Marc Schwartz
#x27;) x <- rep(x, 1e3) > str(x) chr [1:52000] "a2" "b10" "c8" "d3" "e6" "f1" "g5" ... > system.time(is.letter(x)) user system elapsed 0.011 0.000 0.010 > system.time(is.number(x)) user system elaps

Re: [R] Help with NaN when 0 divided by 0

2012-07-31 Thread Marc Schwartz
an easy way to avoid the NaN's, something a non-programmer (ie, > the person I am handing this code off to) would understand? > > Thanks, > > > Jen You could use ?ifelse: > ifelse(var2 == 0, 0, var1 / var2) [1] 0.0 13.9 53.79000 0.0 150.0 350.0 It is v

Re: [R] Logistic regression X^2 test with large sample size (fwd)

2012-07-31 Thread Marc Schwartz
y your model on the full dataset and stick with it. Interact with subject matter experts on the interpretation of the model. BTW, this question is really about statistical modeling generally, not really R specific. Such queries are best posed to general statistical lists/forums such as Stack Exchange.

Re: [R] svyglm AIC: NA??????'

2012-07-25 Thread Marc Schwartz
Presumably based upon the same logic that Thomas (who you cc'd here) included in a post earlier today: https://stat.ethz.ch/pipermail/r-help/2012-July/319508.html Also, please start a new thread when you post, rather than replying to an existing thread. Regards, Marc Schwartz

Re: [R] Crosstab with Average and Count

2012-07-20 Thread Marc Schwartz
Would appreciate any help on these? Thank you. > > Ravi You can use ?tapply, albeit you will get NA's rather than 0's: > tapply(z, list(x, y), mean, na.rm = TRUE) 10 20 30 1 100 NA NA 2 NA 200 NA 3 NA NA 300 > tapply(z, list(x, y), function(x) sum(!is.na(x))) 10

Re: [R] Power analysis for Cox regression with a time-varying covariate

2012-07-17 Thread Marc Schwartz
with Nonbinary Covariates F.Y. Hsieh and Philip W. Lavori Controlled Clinical Trials 21:552–560 (2000 A skillful Google search will find both available online if you don't have access otherwise. Regards, Marc Schwartz On Jul 17, 2012, at 12:33 PM, Greg Snow wrote: > One quick (tho

Re: [R] Cost Effectiveness Example

2012-07-17 Thread Marc Schwartz
tly, if the above two are not suitable, you might want to review the Machine Learning Task View, since these analyses seem overlap to an extent with that domain: http://cran.us.r-project.org/web/views/MachineLearning.html Regards, Marc Schwartz __ R-

Re: [R] Vuong test

2012-07-13 Thread Marc Schwartz
on model. The latter is not fit using maximum likelihood, hence the Vuong test, which is a likelihood ratio based test, fails. If you want a negative binomial model, you should be using glm.nb() in V&R's MASS package: require(MASS) NB1 <- glm.nb(...) Then you can

Re: [R] Is R BOOT package available for 2.15.1 version for Mac OS?

2012-07-06 Thread Marc Schwartz
. > Thanks! > Sergey I suspect some confusion on your part Sergey. 'boot' is part of the standard R installation as a "recommended" package. All you need to do is either: library(boot) or require(boot) Regards, Marc Schwartz

Re: [R] How to import SAS data in R?

2012-07-06 Thread Marc Schwartz
d any. > Thanks, > Mike Strangely enough, there is an entire manual on importing and exporting data to/from R: http://cran.r-project.org/manuals.html Several suggestions there for SAS in the relevant manual: http://cran.r-project.org/doc/manuals/R-data.html#Importing-from-other-statis

Re: [R] Compare date Oracle with Sys.time

2012-07-06 Thread Marc Schwartz
ason, you are importing your data via another means into R, then you can still use ?as.Date to coerce the column to a Date class and use the above incantation. See ?subset for additional information on that function. Regards, Marc Schwartz __ R-help@

Re: [R] RODBC tables

2012-07-05 Thread Marc Schwartz
info/r-sig-db Be sure to include information about your OS, R version including 32 or 64 bit. See the R Posting Guide for additional information on what default info to include in a post. 2. Any chance that you do not have appropriate permission to access the "ANYTHING"

Re: [R] Decrete value check in a matrix

2012-07-02 Thread Marc Schwartz
TRUE TRUE 4 5.6 6.7 FALSE FALSE Regards, Marc Schwartz On Jul 2, 2012, at 7:46 AM, John Kane wrote: > You are not asking for a Decrete [sic] (descrete) value check but rather if > the numbers are intergers. > > Try this: > > # from the ?is.integer he

Re: [R] trend in incidence rate

2012-06-28 Thread Marc Schwartz
or incidence rates? I checked epiR and epitools. It seems they > do not have this function. > > Thank you for the help. You can use ?prop.trend.test or you can also look at the ?independence_test function with 'teststat = "quad"', which is in the coin

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Marc Schwartz
onsider a mixed effects logistic regression model with a binary response, since you appear to have a relatively small "event" incidence in your data. The above list will also be helpful in that setting and you would likely be pointed to the glmer() function in the lme4 package for that application, which provides for GLMs in a mixed effects framework. Regards, Marc Schwartz __ 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, reproducible code.

Re: [R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")

2012-06-06 Thread Marc Schwartz
l pre-specified model and also that the original full model itself was not derived from prior variable selection or univariate pre-screening: mod1 <- glm(site ~ sex + birth + cohort + sex:birth, data=datasex, family = binomial) I would recommend reviewing the likelihood ratio test for th

Re: [R] regression methods for rare events?

2012-06-04 Thread Marc Schwartz
and has relevant examples using R. The rumor is that Frank is working on a new edition of his book with a greater focus on the use of R and is due RSN. Perhaps there will be copies at useR in Nashville next week? One could hope... :-) Regards, Marc Schwartz _

Re: [R] regular expression and R

2012-06-04 Thread Marc Schwartz
Hi Erin, The two places that I typically use for reference are: http://www.regular-expressions.info/ and Mastering Regular Expressions Jeffrey Friedl http://www.amazon.com/Mastering-Regular-Expressions-Second-Edition/dp/0596002890 Regards, Marc Schwartz

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Marc Schwartz
download, perhaps we can better trace the source of the problem, or Ed might use ?debug to follow the code execution in read.table() and see where the relevant flags get triggered. The latter option would help Ed learn how to use the debugging tools that R provides to dig more deeply into such issue

Re: [R] how to add a 'label' column

2012-06-01 Thread Marc Schwartz
sc2 0.16374 yk.2 yk2 0.17320 Regards, Marc Schwartz On Jun 1, 2012, at 3:06 PM, Rui Barradas wrote: > Hello, > > Try > > score2$subject <- rep(score$subject, 7) > > Hope this helps, > > Rui Barradas > > Em 01-06-2012 20:47, Jason Love escre

Re: [R] linux

2012-05-27 Thread Marc Schwartz
On May 27, 2012, at 9:45 AM, Soheila Khodakarim wrote: > Dear All > > Pleade give me an URL that I can download R for cenos linux 64 bit. R is available from the EPEL for RHEL, CentOS and Scientific Linux: http://fedoraproject.org/wiki/EPEL Regards, Marc

Re: [R] Breaking up a vector

2012-05-25 Thread Marc Schwartz
containing the r and rv values in each row, for each 7 element segment of the original x. Regards, Marc Schwartz On May 25, 2012, at 10:56 AM, Rui Barradas wrote: > Hello, > > Tip: see the difference between the following two. > > > for(i in 1:7) > cat(

Re: [R] problem with installing rms package

2012-05-25 Thread Marc Schwartz
ero exit status > 16: In install.packages("rms", dependencies = TRUE) : > installation of package 'sampleSelection' had non-zero exit status > 17: In install.packages("rms", dependencies = TRUE) : > installation of package 'AER' had non-zero exit

Re: [R] problem with installing rms package

2012-05-25 Thread Marc Schwartz
; i am using linux OS > > I have tried by updated r-base-core but it didnt work > > regards > GRR The latest version of survival on CRAN is 2.36-14. When you install rms, be sure to use: install.packages("rms", dependencies = TRUE) to be sure that pa

Re: [R] R Error: System is computationally singular

2012-05-24 Thread Marc Schwartz
to be in the general realm of very rare events given the distribution of LOCS in your data. Regards, Marc Schwartz On May 24, 2012, at 2:41 PM, Nathan Svoboda wrote: > Hi David, > > My apologies, I am not sure if this makes a big difference in your assessment > of the proble

Re: [R] Question on if i am allowed to do something

2012-05-24 Thread Marc Schwartz
AINS Research Group > (STAtistics & INformation Systems Group) of the > Aristotle University of Thessaloniki > Site: http://stains.csd.auth.gr > B.Sc Student in Electrical and Mechanical Engineering > --- >

Re: [R] Question on if i am allowed to do something

2012-05-23 Thread Marc Schwartz
you do not intend to make your own source code available, you should be very clear on what the GPL requires of you before proceeding. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Get variable names from results of lm()

2012-05-23 Thread Marc Schwartz
On May 23, 2012, at 2:52 PM, arun wrote: > Hi Marc, > > Just to point out some difference, > > > x <- 1:20 > y <- x + (x/4 - 2)^3 + rnorm(20, sd=3) > names(y) <- paste("O",x,sep=".") >ww <- rep(1,20); ww[13] <- 0 > summary(lmxy <- lm(y ~ x + I(x^2)+I(x^3) + I((x-10)^2),

Re: [R] Get variable names from results of lm()

2012-05-23 Thread Marc Schwartz
tilde operator operate on > the LHS (component 2) and the RHS (component 3). > > Peter Ehlers Just to throw out another solution here, the function ?all.vars is helpful: LM <- lm(Petal.Length ~ ., data = iris) > formula(LM) Petal.Length ~ Sepal.Length + Sepal.Width + Petal.Width + S

Re: [R] write.xls

2012-05-20 Thread Marc Schwartz
ile)) > > or this: > > do.call("WriteXLS", list(c("df1", "df2"), outFile) Thanks Gabor. Note that since WriteXLS version 2.0 (2010), WriteXLS can accept a named list and write out each list element data frame to an XLS file. An example is given in ?W

Re: [R] write.xls

2012-05-20 Thread Marc Schwartz
ames2xls. Each will have installation issues, depending upon the OS and the useR's skill sets in ensuring the presence of the required foundation. Some users may have issues in certain environments in installing Perl, Python or Java due to IT/Security issues, so something to c

Re: [R] Recoding numeric value

2012-05-18 Thread Marc Schwartz
picky, an NA value is not the same as blank. That is NA != "". R has specific behavior in dealing with NA values. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] registry vulnerabilities in R

2012-05-09 Thread Marc Schwartz
On May 9, 2012, at 11:00 AM, Barry Rowlingson wrote: >>> Someone said: > >>> Once R is accepted, you could ask for an RStudio test if you want. > > I had another thought shortly after my initial email. Suppose yes, R > is accepted. Great. You run R. > > Then you think, "Oh, I need ggplot2" (ye

Re: [R] registry vulnerabilities in R

2012-05-09 Thread Marc Schwartz
uters, primarily for internal use, while providing external access as well. Some may know it by it's former name MILNet and it has a classified private network counterpart, known as SIPRNet. As a consequence, the level of security oversight is higher and more restrictive than what o

Re: [R] Why does RODBC driver returns garbage from Sybase server on new windows 7 machine?

2012-05-04 Thread Marc Schwartz
eveNRows = FALSE' in the calls as below. That may help with corrupted data coming back. I have to use the former with Oracle. That is also referenced in ?odbcConnect with a comment specific to Sybase. chan <- odbcDriverConnect(conn, rows_at_time = 1, believeNRows = FALSE) x <- sqlQue

Re: [R] Use of optim to fit two curves at the same time ?

2012-04-26 Thread Marc Schwartz
, but also gave warnings. > * R completed your command, but gave an incorrect answer. > * R completed your command but the answer is different from what you > expect (but is correct according to the documentation) > > There are probably others. Since Greg has kindly raised t

Re: [R] On the Design of the R Language

2012-04-25 Thread Marc Schwartz
I have not read it yet, but the acknowledgements at the end of the paper note that: 1. It was supported by an NSF grant. 2. At least two members of R Core are recognized amongst the list of names. Regards, Marc Schwartz On Apr 25, 2012, at 1:07 PM, Thomas Adams wrote: > Hmmm∑ an 'o

Re: [R] RODBC Error Code 202 on Mac OS X 10.6

2012-04-25 Thread Marc Schwartz
tualtech.com/product_opensourcedatabases.php They are easy to install and configure and also provide the ODBC Manager app, which replaces the no longer included Apple ODBC Administrator app. Also, you should post this query (now follow ups) to R-SIG-DB, as tha

Re: [R] Number of lines in analysis after removed missings

2012-04-24 Thread Marc Schwartz
with missing data. Regards, Marc Schwartz On Apr 24, 2012, at 9:14 AM, R. Michael Weylandt wrote: > Take a look at nobs() > > Michael > > On Tue, Apr 24, 2012 at 10:05 AM, Eiko Fried wrote: >> I have a dataset with plenty of variables and lots of missing data. As far

Re: [R] How does survreg ordered factors vs not ordered factors?

2012-04-23 Thread Marc Schwartz
level. Depending upon the nature of the analysis you are conducting and your underlying hypotheses, treatment contrasts are very commonly used for ordinal variables as well. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://s

Re: [R] unexpected plot behavior

2012-04-22 Thread Marc Schwartz
asses. Similarly, the child classes may implement specific functionality not apropos to the generic parent class because more specific information is known about the structure of the child. Regards, Marc > On 21 Apr 2012, at 08:18 , Marc Schwartz wrote: > >> On Apr 21, 2012,

Re: [R] unexpected plot behavior

2012-04-21 Thread Marc Schwartz
th method dispatch. See ?plot.formula, which is the plot method called you pass a formula, as opposed to passing a vector as in your third example. In this case, ?plot.factor is called when the 'x' part of the formula (RHS) is a factor. When plot.factor is called, it internally calls ?boxp

Re: [R] How to "flatten" a multidimensional array into a dataframe?

2012-04-19 Thread Marc Schwartz
A2 B1 C2 0 9 A1 B2 C2 0 10 A2 B2 C2 0 11 A1 B3 C2 0 12 A2 B3 C2 0 13 A1 B1 C3 0 14 A2 B1 C3 0 15 A1 B2 C3 0 16 A2 B2 C3 0 17 A1 B3 C3 0 18 A2 B3 C3 0 19 A1 B1 C4 0 20 A2 B1 C4 0 21 A1 B2 C4 0 22 A2 B2 C4 0 23 A1 B3 C4 0 24 A2 B3 C4

Re: [R] quarter end dates between two date strings

2012-04-18 Thread Marc Schwartz
On Apr 18, 2012, at 1:49 PM, David Winsemius wrote: > > On Apr 18, 2012, at 2:05 PM, Marc Schwartz wrote: > >> On Apr 18, 2012, at 11:58 AM, Ben quant wrote: >> >>> Hello, >>> >>> I have two date strings, say "1972-06-30" and &quo

Re: [R] quarter end dates between two date strings

2012-04-18 Thread Marc Schwartz
. Thus, encapsulating it in a function: Qtrs <- function(Start, End) { Vec <- as.Date(levels(cut(seq.Date(Start, End, by = "month"), breaks = "quarter"))) Vec[-1] - 1 } > Qtrs(as.Date("2007-01-31"), as.Date("20

Re: [R] Installing texlive dependencies

2012-04-18 Thread Marc Schwartz
on that I found was rather than removing TeXLive 2007, leave it in place, install 2011 from upstream as you have done and modify your $PATH to point to 2011 so that version is picked up when you need to use TeX, rather than the 2007 version. Regards, Marc Schwartz ___

Re: [R] loss of information in pdf plots

2012-04-17 Thread Marc Schwartz
iasing, which is noted here: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

<    1   2   3   4   5   6   7   8   9   10   >