Re: [R] installing package from source

2013-10-24 Thread Marc Schwartz
On Oct 24, 2013, at 1:11 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On 24/10/2013 18:25, Marc Schwartz wrote: On Oct 24, 2013, at 11:38 AM, David Winsemius dwinsem...@comcast.net wrote: On Oct 23, 2013, at 7:53 PM, Long Vo wrote: Hi R users, Currently I want to fit a FIGARCH

Re: [R] Why 'gbm' is not giving me error when I change the response from numeric to categorical?

2013-10-04 Thread Marc Schwartz
://biostat.mc.vanderbilt.edu/wiki/Main/CatContinuous 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

Re: [R] Why 'gbm' is not giving me error when I change the response from numeric to categorical?

2013-10-04 Thread Marc Schwartz
method: Y - as.integer(Y = mean(Y)) Y [1] 0 1 0 1 1 0 1 1 1 0 That being said, the original viewpoint stands, which is to not do this due to loss of information. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] min(NA,bla) != min(bla, NA)

2013-09-26 Thread Marc Schwartz
(min(bla, as.character(NA))) chr bla It would appear that in Magnus' example, that NA is passed as a logical in the argument list may be relevant here. BTW, I can reproduce Magnus' example on 3.0.2 on OSX (10.8.5). Regards, Marc Schwartz On Sep 26, 2013, at 10:40 AM, arun smartpink

Re: [R] Read shortcuts of MS Excel files through R

2013-09-26 Thread Marc Schwartz
= TRUE) # depends upon 'R.oo' require(R.utils) ?readWindowsShortcut Regards, Marc Schwartz On Sep 26, 2013, at 5:05 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Hi, On Thu, Sep 26, 2013 at 4:54 PM, Santosh santosh2...@gmail.com wrote: Dear Rxperts, Through Windows OS, I created

Re: [R] Is there a way to change x and y axis tick mark inside plot()?

2013-09-20 Thread Marc Schwartz
do, but it's very hard to get it to do something the designers didn't think of. Duncan Murdoch Fortune candidate, with cc: to Z. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] strsplit with a vector split argument

2013-09-18 Thread Marc Schwartz
the docs? Thanks! The latter. From ?strplit in the description of 'split': If split has length greater than 1, it is re-cycled along x. Thus, in the first example above, ',' is used for the first element of your vector and ';' is used for the second and so on. Regards, Marc Schwartz

Re: [R] Chi-square values in GLM model comparison

2013-09-11 Thread Marc Schwartz
316.17 education 2 0.0022894 245 316.17 0.9989 Regards, Marc Schwartz On Sep 11, 2013, at 11:17 AM, Torvon tor...@gmail.com wrote: José, I get the following error message: m1-clm(sym_bin ~ phq_index, data=data2) m2-clm(sym_bin ~ 1, data=data2) anova(m1,m2

Re: [R] Change color of the boxplot outliers

2013-09-07 Thread Marc Schwartz
is a description of the various parameters for the plot. Thus: set.seed(1) boxplot(rexp(50), outcol = red) 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

Re: [R] calculate the probability

2013-09-06 Thread Marc Schwartz
). 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] Installing R for use in SPSS (was: no subject)

2013-08-30 Thread Marc Schwartz
the Posting Guide: http://www.r-project.org/posting-guide.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 and provide

Re: [R] convert delimited strings with ranges to numeric

2013-08-14 Thread Marc Schwartz
the '-' to ':', which can then be parsed as a sequence operator. The paste() creates: paste(c(, gsub(\\-, :, x), )) [1] c( 2,5:7,10,12:15 ) which can then be evaluated as a single vector. Regards, Marc Schwartz __ R-help@r-project.org mailing list

[R] [R-pkgs] WriteXLS version 3.2.1 - Bug Fix Release

2013-08-08 Thread Marc Schwartz
row.names = TRUE. Picked up in the course of fixing the above bug. Source tarballs of the updated package are being mirrored and binaries for Windows and OSX should appear in due course. Regards, Marc Schwartz ___ R-packages mailing list r-packa

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-26 Thread Marc Schwartz
this issue, and it has taken me a long time. Frailty is an alternate label for random effects when all we have is a random intercept. Multiple labels for the same idea adds confusion, but nothing else. Terry Therneau On 07/25/2013 08:14 PM, Marc Schwartz wrote: On Jul 25, 2013, at 4

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
to the Windows side in the VM to see the files as the author intended. Rich On Wed, Jul 24, 2013 at 12:16 PM, Marc Schwartz marc_schwa...@me.comwrote: Hi Rich, Seems to work for me using Powerpoint in MS Office 2011 for Mac. I used the following code: postscript(file

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Marc Schwartz
. Thank you Caveman On Wed, Jul 24, 2013 at 2:27 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jul 23, 2013, at 5:40 PM, cognizio ge...@uyleman.com wrote: Great summary! It works great without the heavy PERL library. I am running the YAML package I thought I needed to support WRITEXLS

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
in windows PP 2010 and as an icon in PP 2013. RPlot2.pptx https://www.dropbox.com/s/snm7cb9chrkcrff/RPlot2.pptx opens as a graph in both windows PP and in Mac PP. On Wed, Jul 24, 2013 at 2:39 PM, Marc Schwartz marc_schwa...@me.comwrote: Rich, I don't have direct access to Windows and I

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Marc Schwartz
went fine. Orvalho On Thu, Jul 25, 2013 at 3:00 PM, Marc Schwartz marc_schwa...@me.com wrote: Hi, Perl is still required for WriteXLS. That dependency has not changed. What did change is that I removed the requirement for Text::CSV_XS, which contains C code in the Perl package

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
...@temple.edu wrote: file2.eps opens as a graph in windows PP 2010 and as an icon in PP 2013. RPlot2.pptx https://www.dropbox.com/s/snm7cb9chrkcrff/RPlot2.pptx opens as a graph in both windows PP and in Mac PP. On Wed, Jul 24, 2013 at 2:39 PM, Marc Schwartz marc_schwa...@me.com wrote: Rich

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread Marc Schwartz
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] Repeated measures Cox regression ??coxph??

2013-07-25 Thread Marc Schwartz
On Jul 25, 2013, at 4:45 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 25, 2013, at 12:27 PM, Marc Schwartz wrote: On Jul 25, 2013, at 2:11 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, Is there any R package that will allow one to perform a repeated

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-24 Thread Marc Schwartz
0.4 0.3 0.2 0.2 0.1 ... ..- attr(*, comment)= chr Width of the petals (cm) $ Species : Factor w/ 3 levels setosa,versicolor,..: 1 1 1 1 1 1 1 1 1 1 ... ..- attr(*, comment)= chr Species of the flowers Regards, Marc Schwartz __ R-help@r

Re: [R] .eps files and powerpoint

2013-07-24 Thread Marc Schwartz
. If you are operating on Windows, as opposed to Linux or OSX, typically EMF/WMF files are the easiest way to go in terms of sticking R plots into an Office file, as they are also vector based images, but are effectively Windows only. Regards, Marc Schwartz On Jul 24, 2013, at 10:20 AM

Re: [R] .eps files and powerpoint

2013-07-24 Thread Marc Schwartz
. PP did not generate its own png file. Since my immediate goal is the projection screen for a PowerPoint presentation, I will go directly to the png file. For the proceedings and for paper I will continue to use the pdf file. Rich On Wed, Jul 24, 2013 at 11:36 AM, Marc Schwartz

Re: [R] .eps files and powerpoint

2013-07-24 Thread Marc Schwartz
as the author intended. Rich On Wed, Jul 24, 2013 at 12:16 PM, Marc Schwartz marc_schwa...@me.comwrote: Hi Rich, Seems to work for me using Powerpoint in MS Office 2011 for Mac. I used the following code: postscript(file = file.eps, height = 4, width = 4

Re: [R] .eps files and powerpoint

2013-07-24 Thread Marc Schwartz
is plot(1:10) which is base. did you try the windows side yet? Rich Sent from my iPhone On Jul 24, 2013, at 13:22, Marc Schwartz marc_schwa...@me.com wrote: Hi Rich, That's curious. I noted that you are using barchart() below which is lattice versus base graphics

[R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-19 Thread Marc Schwartz
, providing descriptive information on the content of the column in the Excel worksheet. The package is openly maintained under GPL-2 at: https://github.com/marcschwartz/WriteXLS If anyone identifies any issues, please let me know. Thanks and regards, Marc Schwartz

Re: [R] cut into groups of equal nr of elements...

2013-07-18 Thread Marc Schwartz
counts within groups. On Wed, Jul 17, 2013 at 5:04 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jul 17, 2013, at 4:43 PM, Witold E Wolski wewol...@gmail.com wrote: I would like to cut a vector into groups of equal nr of elements. looking for a function on the lines of cut but where I

Re: [R] R Package License

2013-07-17 Thread Marc Schwartz
of the CRAN package is restricted. 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

Re: [R] How to open .WTG file Extension in R?

2013-07-17 Thread Marc Schwartz
the readPC() function therein. 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

Re: [R] anti off diagonal min max mean - how to rotate matrix by 90 degree

2013-07-17 Thread Marc Schwartz
0.273 0.000 0.273 system.time(mat.left - t(big.mat)[nrow(big.mat):1], ) user system elapsed 0.094 0.000 0.099 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] cut into groups of equal nr of elements...

2013-07-17 Thread Marc Schwartz
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] Upgrade from R 2.11 to R 3.0.1

2013-07-12 Thread Marc Schwartz
, install a binary using a package manager like yum or did you download the source tarball, compile and install? Need more information. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Upgrade from R 2.11 to R 3.0.1

2013-07-12 Thread Marc Schwartz
./configure make make install Thanks! On Fri, Jul 12, 2013 at 12:12 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jul 12, 2013, at 11:58 AM, Chirag Gupta cxg...@email.uark.edu wrote: Hi I am trying to upgrade R version 2.11 to 3.0.1 on Linux server. I downloaded the latest version

Re: [R] Appropriate forum for announcing R package updates

2013-07-10 Thread Marc Schwartz
volume list. 116 posts in 2010, 77 in 2011, 72 in 2012 and 25 so far in 2013. The trend would seem to be downward. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] alternative of package parallel for R 3.0

2013-07-10 Thread Marc Schwartz
required package: parallel 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

Re: [R] Help in installing R

2013-07-09 Thread Marc Schwartz
on subscribing is here: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora 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] coxph won't converge when including categorical (factor) variables

2013-07-06 Thread Marc Schwartz
, I would envision that the effective number of your factor levels is reduced as a consequence, allowing the model to be fit. You likely need to consider collapsing some of the low count factor levels into an Other category, if it makes contextual sense to do so for your data. Regards, Marc

Re: [R] Write an Excel workbook?

2013-06-27 Thread Marc Schwartz
for the target OS's, which obviates the need for the user to have C related development tools installed locally. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Lexical scoping is not what I expect

2013-06-24 Thread Marc Schwartz
# missing the preceding code where 'a' was # defined globally f - function(x) { a-5; g(x) } g - function(y) y + a # Now it works, showing that 'a - 5' within f() is not part of the # value returned by g(), which is the goal of John's example code :-) f(2) [1] 12 Regards, Marc Schwartz

Re: [R] alternative to ifelse

2013-06-19 Thread Marc Schwartz
, x3, x4) == 1) [1] 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 which gets you the same result as: ifelse(x1 == 1 | x2 == 1 | x3 == 1 | x4 == 1, 1, 0) [1] 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] alternative to ifelse

2013-06-19 Thread Marc Schwartz
) == 1) [1] 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 which gets you the same result as: ifelse(x1 == 1 | x2 == 1 | x3 == 1 | x4 == 1, 1, 0) [1] 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] alternative to ifelse

2013-06-19 Thread Marc Schwartz
On Jun 19, 2013, at 1:23 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jun 19, 2013, at 8:24 AM, Brian Perron beper...@umich.edu wrote: Greetings: I am looking for a way to avoid using the ifelse function for constructing a new variable. More specifically, assume I have a set

Re: [R] alternative to ifelse

2013-06-19 Thread Marc Schwartz
On Jun 19, 2013, at 1:23 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jun 19, 2013, at 8:24 AM, Brian Perron beper...@umich.edu wrote: Greetings: I am looking for a way to avoid using the ifelse function for constructing a new variable. More specifically, assume I have a set

Re: [R] Default colors for barplot() XXXX

2013-06-12 Thread Marc Schwartz
to legend(). 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

Re: [R] glm.nb error

2013-06-07 Thread Marc Schwartz
str(y) and str(group) You should also be sure to note in your posts when you are using a function from a non-base package, in this case MASS, which is not indicated in your sessionInfo() above, so something is amiss there as well. Regards, Marc Schwartz

Re: [R] glm.nb error

2013-06-07 Thread Marc Schwartz
' is: group [1] 1 1 1 1 0 0 0 0 glm.nb(y ~ group) Error in while ((it - it + 1) limit abs(del) eps) { : missing value where TRUE/FALSE needed Think about it... :-) Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] Not sure this is something R could do but it feels like it should be.

2013-06-06 Thread Marc Schwartz
is with the two relevant CRAN Task Views: http://cran.r-project.org/web/views/ClinicalTrials.html and http://cran.r-project.org/web/views/Pharmacokinetics.html There is also another package not listed above that might be relevant: http://cran.r-project.org/web/packages/scaRabee/ Regards, Marc

Re: [R] Strange behaviour of R graphics copied to PowerPoint

2013-06-03 Thread Marc Schwartz
In addition to the manner in which the PDF files are generated, you might want to consider the possibility that the lines are artifacts created by your PDF viewer. See: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders Regards, Marc Schwartz On Jun 3, 2013

Re: [R] empty html pages for R-exts and R-intro

2013-05-31 Thread Marc Schwartz
. 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] xtable() with booktabs option problem

2013-05-24 Thread Marc Schwartz
} \toprule V1 \\ \midrule a9 \\ b8 \\ c 17 \\ d9 \\ e7 \\ f 16 \\ g 13 \\ h 10 \\ i 11 \\ \bottomrule \end{tabular} \end{table} Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] R and libre office base

2013-05-17 Thread Marc Schwartz
success with JDBC and there is the ODB package on CRAN (http://cran.r-project.org/web/packages/ODB/). 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

Re: [R] Why can't R understand if(num!=NA)?

2013-05-03 Thread Marc Schwartz
-project.org/doc/manuals/r-release/R-intro.html#Missing-values 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

Re: [R] Vector with zeros and ones

2013-04-22 Thread Marc Schwartz
sample(Vec) [1] 1 0 1 1 1 1 1 1 0 1 sample(Vec) [1] 1 0 1 0 1 1 1 1 1 1 sample(Vec) [1] 1 1 1 0 1 1 1 0 1 1 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Vector with zeros and ones

2013-04-22 Thread Marc Schwartz
On Apr 22, 2013, at 6:28 PM, Marc Schwartz marc_schwa...@me.com wrote: On Apr 22, 2013, at 6:21 PM, Ayyappa ayyapp...@gmail.com wrote: Dear group, I want to generate a vector of 10 elements that always has 20% zeroes, but with a random ordering of zeroes and ones. Can you please suggest

Re: [R] remove higher order interaction terms

2013-04-17 Thread Marc Schwartz
error: 2.717 on 21 degrees of freedom Multiple R-squared: 0.8623,Adjusted R-squared: 0.7967 F-statistic: 13.15 on 10 and 21 DF, p-value: 6.237e-07 This is covered in ?formula Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] testInstalledBasic / testInstalledPackages

2013-04-16 Thread Marc Schwartz
at: https://github.com/marcschwartz/R-IQ-OQ 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

Re: [R] Strange error with log-normal models

2013-04-16 Thread Marc Schwartz
http://cran.r-project.org/web/packages/betareg/vignettes/betareg-ext.pdf Regards, Marc Schwartz On Apr 16, 2013, at 3:20 PM, Noah Silverman noahsilver...@ucla.edu wrote: @Duncan, You make a very good point. Somehow I overlooked that 0 is not positive. I guess that rules out the log

Re: [R] Convert results from print(survfit(formula, ...)) into a matrix or data frame

2013-04-15 Thread Marc Schwartz
?summary.survfit and note the 'table' part of the Value section. 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

Re: [R] Understanding contents of packages

2013-04-11 Thread Marc Schwartz
On Apr 11, 2013, at 1:34 PM, Fisher Dennis fis...@plessthan.com wrote: Colleagues During the transition to R3.0.0 (OS X), one of the packages that I used -- SASxport -- did not work until I used the type=source option in install.packages. This led to an adventure: 1. I

Re: [R] means in tables

2013-04-10 Thread Marc Schwartz
1.405 2.365 8.6 72 2 7.20 1.790 2.270 6.2 55 3 7.16 2.480 2.685 10.1 56 4 7.87 1.725 2.250 9.3 63 5 7.24 2.745 2.785 11.5 68 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] How to replace '$' sign?

2013-03-28 Thread Marc Schwartz
somebody help me why is it so? Thanks and regards The dollar sign is a metacharacter in regular expressions (see ?regex), thus has to be escaped to be interpreted as a literal character: gsub(\\$|,, , $232,685.35436) [1] 232685.35436 Regards, Marc Schwartz

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
to keep them separated. Most e-mail clients and/or online services have some type of filtering or rule configuration available to do this. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
On Mar 27, 2013, at 7:53 PM, David Winsemius dwinsem...@comcast.net wrote: On Mar 27, 2013, at 12:18 PM, Marc Schwartz wrote: On Mar 27, 2013, at 1:58 PM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R helpers, Everyday I do receive many many mails from R forum and after

Re: [R] Newbie code to count runs of up or down moves

2013-03-25 Thread Marc Schwartz
In full agreement with Sarah's comments. That being said, the Magic 8 Ball has the following in the little window for the OP: ?rle Regards, Marc Schwartz On Mar 25, 2013, at 2:44 PM, Sarah Goslee sarah.gos...@gmail.com wrote: This is unreadable. Please repost in plain text, ideally

Re: [R] How many samples ACTUALLY used in regression?

2013-03-18 Thread Marc Schwartz
passed to the model function, to replicate what takes place internally in many modeling functions. The result of model.frame() will be a data frame, again, subject to similar limitations as above. Regards, Marc Schwartz [1]: http://developer.r-project.org/model-fitting-functions.txt

Re: [R] Loop or some other way to parse by data generated values when it is not linear

2013-03-18 Thread Marc Schwartz
like this? xtabs(Y ~ X1 + X2, data = tmp.n) X2 X1 0 2 4 0 83 12 14 1 107 25 27 2 47 14 28 3 27 4 13 4 38 9 18 99 1 0 0 See ?xtabs Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] Help finding first value in a BY group

2013-03-15 Thread Marc Schwartz
K2 207 X4 X4 63 Regards, Marc Schwartz On Mar 15, 2013, at 12:37 PM, arun smartpink...@yahoo.com wrote: Hi, Try: data.frame(Forecast=with(PeriodSKUForecast,tapply(Forecast,SKU,head,1))) # Forecast #A1 99 #K2 207 #X4 63 #or aggregate(Forecast~SKU

Re: [R] Working with string

2013-03-14 Thread Marc Schwartz
in the character vector: Vec - c(sada, asdsa, sa) format(Vec) [1] sada asdsa sa 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] Equivalent of deal in R?

2013-03-14 Thread Marc Schwartz
the function. I would however, urge you to reconsider what you are doing and take advantage of R's philosophy and therefore, strengths. It may be that coercing your source vector to a list would serve you well. Regards, Marc Schwartz __ R-help@r

Re: [R] Extract letters from a column

2013-03-13 Thread Marc Schwartz
This could be done in a single step using gsub() with back references in the regex. gsub(^(.{3}).* (.{3}).*$, \\1\\2, Tom Cruise) [1] TomCru Regards, Marc Schwartz On Mar 13, 2013, at 9:21 AM, SH empti...@gmail.com wrote: What I want to do is to extrac three letters from first and last

Re: [R] Extracting the knots of a natural cubic spline fit

2013-03-12 Thread Marc Schwartz
= FALSE)) or directly on the data: attr(ns(women$height, df = 5), knots) 20% 40% 60% 80% 60.8 63.6 66.4 69.2 attr(ns(women$height, df = 5), Boundary.knots) [1] 58 72 Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] Running 32 bits code from within R 64 bits

2013-03-12 Thread Marc Schwartz
of page 23 B. Footnote 15 on page 26 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

Re: [R] glm and lm can't find weights

2013-03-11 Thread Marc Schwartz
and the reply from Peter also: http://tolstoy.newcastle.edu.au/R/devel/06/06/5868.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

Re: [R] RODBC Installation fails

2013-03-11 Thread Marc Schwartz
, there are two R SIG lists that you may want to be aware of: https://stat.ethz.ch/mailman/listinfo/r-sig-debian and: https://stat.ethz.ch/mailman/listinfo/r-sig-db Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Help using system() command to execute Perl script through MSDOS

2013-03-07 Thread Marc Schwartz
are delimiters, separating what you have as a single argument into multiples. Use ?shQuote to put single quotes around each argument that contains spaces, so that it is treated as a single argument: shQuote(This is a single argument) [1] 'This is a single argument' Regards, Marc Schwartz

Re: [R] Multivariate Power Test?

2013-03-07 Thread Marc Schwartz
, then you might want to look at simulation. If the latter, you might want to look at the Clinical Trials Task View: http://cran.r-project.org/web/views/ClinicalTrials.html as there are various packages that might fit what you need, but again, simulation is always an option. Regards, Marc

Re: [R] How to conditionally remove dataframe rows?

2013-03-07 Thread Marc Schwartz
2 Regards, Marc Schwartz On Mar 6, 2013, at 8:42 PM, arun smartpink...@yahoo.com wrote: Hi, dfrm- read.table(text= Point_counts Psi_Sp 1A 0 2A 1 3B 1 4B

Re: [R] A==A false?

2013-03-07 Thread Marc Schwartz
-doesn_0027t-R-think-these-numbers-are-equal_003f 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

Re: [R] Upgrading to R version 2.15.3 under Fedora.

2013-03-04 Thread Marc Schwartz
-fedora: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora 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

Re: [R] Netcdf file in R

2013-02-22 Thread Marc Schwartz
minutes reading the manuals is typically enlightening. Regards, Marc Schwartz On Feb 22, 2013, at 9:48 AM, Gyanendra Pokharel gyanendra.pokha...@gmail.com wrote: I can't see your attached file. Can you re-attache it? Thanks Gyanendra Pokharel University of Guelph Guelph, ON On Fri, Feb

Re: [R] R on mac not installing packages

2013-02-22 Thread Marc Schwartz
the requisite compiler related tools installed. Perhaps I need more coffee late on a Friday, but something seems inconsistent here. Regards, Marc Schwartz On Feb 22, 2013, at 12:15 PM, londonphd wrote: Hi, I have not been able to use R in my macbook pro. I am getting the following error

Re: [R] NLS results different from Excel

2013-02-20 Thread Marc Schwartz
/07/6331.html Regards, Marc Schwartz On Feb 20, 2013, at 9:58 AM, Bruce McCullough bdmccullo...@drexel.edu wrote: The idea that the Excel solver has a good reputation for being fast and accurate does not withstand an examination of the Excel solver's ability to solve the StRD nls test

Re: [R] Handling NA values

2013-02-16 Thread Marc Schwartz
the NA's, then the result is undefined: sum(c(NA, NA)) [1] NA See: http://rwiki.sciviews.org/doku.php?id=tips:surprises:emptysetfuncs for more information. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Handling NA values

2013-02-16 Thread Marc Schwartz
0 I want to have some way to distinguish the 1st '0' and the 3rd '0'. I want to see NA directly for the 3rd. Any possibility how to do that through the rowSum() function? Thanks and regards, On Sat, Feb 16, 2013 at 11:52 PM, Marc Schwartz marc_schwa...@me.com wrote: On Feb 16, 2013

Re: [R] Extracting Numeric Columns from Data Fram

2013-02-16 Thread Marc Schwartz
by rows, or how to operate assuming you have the column names. I'd like to pull by type. Thanks! Barry Something like the following should work. If your data frame is DF: NewDF - DF[, sapply(DF, is.numeric)] Regards, Marc Schwartz __ R-help

Re: [R] WriteXLS: 'object not found' error within function

2013-02-13 Thread Marc Schwartz
) : object 'localData' not found test - function() { localData - split(iris, iris$Species) WriteXLS(localData, LocalData.xls) } test() # Works fine Hope that clarifies. Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] OBIEE (Oracle Business Intelligence) and R - Is there a way to connect and pull in tables/answers

2013-02-07 Thread Marc Schwartz
/technetwork/topics/bigdata/r-offerings-1566363.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 and provide

Re: [R] Wide character in print?

2013-02-04 Thread Marc Schwartz
from there, or consider using a different R package that has more flexibility in defining the specific Excel worksheet cell ranges that you want to extract. Others may have different ideas for you. Regards, Marc Schwartz __ R-help@r-project.org

Re: [R] change confidence interval line length in barplot2 (plotrix package)

2013-01-22 Thread Marc Schwartz
, angle = 90, length = 0.25) where the 'length' argument to arrows() defines the width of the upper and lower boundary lines. There are a fair number of other functions around that can add CI's to plots as well and a search of the archives should bear fruit. Regards, Marc Schwartz On Jan

Re: [R] Another X11 problem. (Psigh!)

2013-01-12 Thread Marc Schwartz
On Jan 11, 2013, at 10:35 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: Tried to do a plot just now and got an error: Error in text.default(2, 6, main, cex = cex) : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could not be loaded This is reproducible (in

Re: [R] writing to .xlsx

2013-01-09 Thread Marc Schwartz
. 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] pattern matching

2013-01-07 Thread Marc Schwartz
See ?regex for more information and if appropriate, consider gregexpr(): gregexpr(\\$, x$Expensive$MoreText) [[1]] [1] 2 12 attr(,match.length) [1] 1 1 attr(,useBytes) [1] TRUE Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] Version Controlled CRAN Packages

2013-01-03 Thread Marc Schwartz
are beyond the scope of this discussion, so I won't get into details here. I hope that the above is helpful. 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

Re: [R] Question on Round function

2013-01-03 Thread Marc Schwartz
is not represented exactly, the rounding rule applies to the represented number and not to the printed number, and so round(0.15, 1) could be either 0.1 or 0.2). ... Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Finding (swapped) repetitions of numbers pairs across two columns

2012-12-27 Thread Marc Schwartz
(t(apply(cbind(v1, v2), 1, sort))) [,1] [,2] [1,]05 [2,]13 [3,]22 [4,]04 Basically, sort each row so that you don't have to worry about the permutations of values, then get the unique rows as a result. Regards, Marc Schwartz

Re: [R] Finding (swapped) repetitions of numbers pairs across two columns

2012-12-27 Thread Marc Schwartz
! That is great, thank you very much! Emmanuel On 27 December 2012 22:39, Marc Schwartz marc_schwa...@me.com wrote: unique(t(apply(cbind(v1, v2), 1, sort))) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] R graphs from database

2012-12-26 Thread Marc Schwartz
of where else to search, please? Thanks! David Osborne MSc student Department of Archaeology, University of Nottingham Might be Shiny: http://www.rstudio.com/shiny/ Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] xtable with psych objects

2012-12-18 Thread Marc Schwartz
the results that you want to output. So that could perhaps be either a matrix or a data frame, which ever is more suitable for your case. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Tools for Building Packages (Fedora)

2012-12-11 Thread Marc Schwartz
of a typical Fedora install these days. If you get to the point where you have R package development questions that are not really Fedora specific, those should be posted to the R-Devel list: https://stat.ethz.ch/mailman/listinfo/r-devel Regards, Marc Schwartz

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