Re: [R] Conversion of Matlab code to an R code

2015-03-23 Thread Marc Schwartz
://www.math.umaine.edu/~hiebeler/comp/matlabR.pdf http://mathesaurus.sourceforge.net/octave-r.html That might make your job a bit easier. Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Marc Schwartz
Hi, If he wants the two sets of data plotted on the same y axis scale, with the range of the y axis adjusted to the data, an alternative to the use of plot() and points() is: matplot(Date, cbind(MORTSFr, MORTSBu), type = l) See ?matplot Regards, Marc Schwartz On Mar 23, 2015, at 12:04

Re: [R] Installing R on Linux Red Hat Server

2015-03-12 Thread Marc Schwartz
to on-going moderation (speaking as a co-moderator of that list). https://stat.ethz.ch/mailman/listinfo/r-sig-fedora Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] SPSS command match files for merging one-to-many (hierarchical) equivalent in R?

2015-03-09 Thread Marc Schwartz
://www.ats.ucla.edu/stat/spss/modules/merge.htm I would go with ?merge, since the desired functionality appears to be a relational join operation. Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch

Re: [R] numbering consecutive rows based on length criteria

2015-03-02 Thread Marc Schwartz
2 3 4 5 6 1 2 3 4 5 6 7 8 9 1 2 1 2 3 4 cbind() the result above to your data frame. Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Convert windows source package for Mac use

2015-02-24 Thread Marc Schwartz
, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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] Change error bar length in barplot2

2015-02-17 Thread Marc Schwartz
On Feb 17, 2015, at 10:46 AM, Joule Madinga jmadi...@yahoo.fr wrote: Hi,I'm new to R.I would like to make a barplot of parasite infection prevalence (with 95% confidence interval) by age group.I have 4 parasite species and 5 age-groups and the example by Marc Schwartz (barplot2) fits very

Re: [R] Database connection query

2015-02-09 Thread Marc Schwartz
. There is more information in the R Data Import/Export manual: http://cran.r-project.org/doc/manuals/r-release/R-data.html#Relational-databases and there is a SIG list for R and DB specific subject matter: https://stat.ethz.ch/mailman/listinfo/r-sig-db Regards, Marc Schwartz

Re: [R] odbcConnectAccess2007 errors with Access databases on new PC

2015-02-02 Thread Marc Schwartz
.; The entire tool chain needs to be of the same architecture. So 32 bit Office, 32 bit ODBC drivers, 32 bit DSN and 32 bit R. BTW, as you may be aware, there is a DB SIG list specifically for these types of questions: https://stat.ethz.ch/mailman/listinfo/r-sig-db Regards, Marc Schwartz

Re: [R] Problems installing jpeg package

2015-01-27 Thread Marc Schwartz
/r-release/R-admin.html#Essential-programs-and-libraries As an aside, there is a SIG list specifically for R on RH/Fedora based Linux distros: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora Regards, Marc Schwartz __ R-help@r-project.org

Re: [R] nonmonotonic glm?

2015-01-11 Thread Marc Schwartz
() instead of ns(): # after installing rms from CRAN require(rms) lrm(DV ~ rcs(IV, 5), data = YourDataFrame) Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] i need help for var.test()

2015-01-08 Thread Marc Schwartz
section of ?var.test) or perhaps ?fligner.test for a non-parametric method. Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] How to group by then count?

2015-01-06 Thread Marc Schwartz
minutes to have read/searched An Introduction to R, which is the basic R manual, would have led you to the same solution: http://cran.r-project.org/doc/manuals/r-release/R-intro.html#Frequency-tables-from-factors Regards, Marc Schwartz On Sun Jan 04 2015 at 5:03:47 PM MacQueen, Don macque

Re: [R] move date-values from one line to several lines

2014-12-02 Thread Marc Schwartz
2 2015-05-22 Holiday 12 2 2015-05-23 Holiday 13 2 2015-06-01 Holiday 14 2 2015-06-02 Holiday 15 2 2015-06-03 Holiday 16 2 2015-07-01 Illness See ?seq.Date for the critical step. Regards, Marc Schwartz __ R-help@r-project.org mailing list

Re: [R] install R without texlive dependencies

2014-11-20 Thread Marc Schwartz
it locally, or include the full URL to the RPM on the EPEL server. Of course, the above incantation can leave you without other needed dependencies, so use with caution. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Adapt sweave function to produce an automatic pdf.

2014-11-20 Thread Marc Schwartz
}. Once you have your final .tex file, you can then run pdflatex on that file via ?system. 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] sweave package for R version 3.02

2014-11-11 Thread Marc Schwartz
to be installed, it already is. BTW, 3.1.2 is the current version of R. 3.0.2 is over a year old already. 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] Inverse Student t-value

2014-09-30 Thread Marc Schwartz
, Marc Schwartz On Sep 30, 2014, at 1:49 PM, jlu...@ria.buffalo.edu wrote: My Excel (2013) returns exactly what R does. I used both T.INV and T.INV.T2There is no TINV. Has Excel been updated? Duncan Murdoch murdoch.dun...@gmail.com Sent by: r-help-boun...@r-project.org 09/30

Re: [R] Error : '.path.package' is defunct.

2014-09-25 Thread Marc Schwartz
version of R that you now have running. There may be other nuances here, such as OS, having Admin access and where the CRAN packages are installed, but at least checking the version of zoo will be a good staring point. Regards, Marc Schwartz __ R

Re: [R] How to combine character month and year columns into one column

2014-09-23 Thread Marc Schwartz
[7] Jul-1999 Aug-1999 Sep-1999 Oct-1999 Nov-1999 Dec-1999 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] How to combine character month and year columns into one column

2014-09-23 Thread Marc Schwartz
the new column into date format with this code. The class of MonthDay is still character df$MonthDay - format(df$MonthDay, format=c(%b %Y)) I would appreciate if you could suggest a working solution Thanks On 23 September 2014 18:03, Marc Schwartz marc_schwa...@me.com wrote: On Sep 23

Re: [R] How to combine character month and year columns into one column

2014-09-23 Thread Marc Schwartz
0203040506070809101112 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month.abb[ substr(Sys.Date(), 6,7) ] 09 Sep -- David. On Sep 23, 2014, at 9:03 AM, Marc Schwartz wrote: On Sep 23, 2014, at 10:41 AM, Kuma Raj pollar

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Marc Schwartz
= FALSE) is an inner join on matching rows only: Df3 - merge(Df1, Df2, by = AgeSexeCadNCad) If you include non-matching values in the resultant data frame (eg. all = TRUE), Pourcent will contains NA's in those rows. Regards, Marc Schwartz __ R-help

Re: [R] plot

2014-09-19 Thread Marc Schwartz
(0.07,0.07,0.07) x-c(500,1000,2000) Thanks Ishaq See ?matplot and ?legend matplot(x, cbind(y1, y2, y3, y4), type = l, main = Plot Title, ylab = Y Vals, xlab = X Vals) legend(right, lty = 1:4, col = 1:4, legend = c(y1, y2, y3, y4)) Regards, Marc Schwartz

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Marc Schwartz
: 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 and provide

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Marc Schwartz
: 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 and provide

Re: [R] Using R in our commercial business application

2014-09-18 Thread Marc Schwartz
concerns do not necessarily go away. They will have also consulted legal counsel on these issues because the viability of their business depends upon it. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Using R in our commercial business application

2014-09-18 Thread Marc Schwartz
On Sep 18, 2014, at 3:42 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 18/09/2014 2:35 PM, Marc Schwartz wrote: On Sep 18, 2014, at 4:36 AM, Pasu pasupat...@gmail.com wrote: Hi I would like to know how to use R in our commercial business application which we plan to host

Re: [R] frequencies of a discrete numeric variable, including zeros

2014-09-02 Thread Marc Schwartz
13 14 15 16 17 275 246 178 84 67 27 17 12 1 2 1 1 2 0 0 0 1 0 18 19 0 1 barplot(table(art.fac), cex.names = 0.5) Thanks for providing the data above. Regards, Marc Schwartz __ R-help@r-project.org mailing list

Re: [R] split a string a keep the last part

2014-08-28 Thread Marc Schwartz
way to do it? Thanks. Jun Try this: test - 'AF14-485-502-89-00235' sub(^.*-(.*)$, \\1, test) [1] 00235 test - 'AF14-485-502-89-00235-1234' sub(^.*-(.*)$, \\1, test) [1] 1234 Another option: tail(unlist(strsplit(test, -)), 1) [1] 1234 Regards, Marc Schwartz

Re: [R] Installing RODBC

2014-08-20 Thread Marc Schwartz
://stat.ethz.ch/mailman/listinfo/r-sig-db and a search of the list archives, for example using rseek.org, would likely result in your finding queries and answers to this same issue over the years. Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] regex pattern assistance

2014-08-15 Thread Marc Schwartz
of the double backslashes in your regex above. The '/' character is not a special regex character, whereas '\' is and needs to be escaped. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] regex pattern assistance

2014-08-15 Thread Marc Schwartz
On Aug 15, 2014, at 11:56 AM, Tom Wright t...@maladmin.com wrote: WOW!!! What can I say 4 answers in less than 4 minutes. Thank you everyone. If I can't make it work now I don't deserve to. btw. the strsplit approach wouldn't work for me as: a) I wanted to play with regex and b) the

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
-12 23:59:56 CDT 2014-08-12 23:59:57 CDT [5] 2014-08-12 23:59:58 CDT 2014-08-12 23:59:59 CDT head(as.numeric(x - x[1])) [1] 0 1 2 3 4 5 tail(as.numeric(x - x[1])) [1] 86394 86395 86396 86397 86398 86399 Regards, Marc Schwartz __ R-help@r

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
Erin, Is a sequential resolution of seconds required, as per your original post? If so, then using my approach and specifying the start and end dates and times will work, with the coercion of the resultant vector to numeric as I included. The method I used (subtracting the first value) will

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
On Aug 12, 2014, at 2:49 PM, John McKown john.archie.mck...@gmail.com wrote: And some people wonder why I absolutely abhor daylight saving time. I'm not really fond of leap years and leap seconds either. Somebody needs to fix the Earth's rotation and orbit! I have been a longtime proponent

Re: [R] Better use with gsub

2014-08-01 Thread Marc Schwartz
- as.numeric(sapply(a2, function(x) x[2])) If a matrix is a satisfactory result, rather than two separate vectors: sapply(strsplit(gsub(S, , xx), xx, split = :), as.numeric) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 24 24 24 24 24 24 [2,] 57 86 119 129 138 163 Regards, Marc Schwartz

Re: [R] How to randomly extract a number of rows in a data frame

2014-08-01 Thread Marc Schwartz
2.8 4.7 1.2 versicolor 99 5.1 2.5 3.0 1.1 versicolor 135 6.1 2.6 5.6 1.4 virginica 41 5.0 3.5 1.3 0.3 setosa Regards, Marc Schwartz

Re: [R] separate numbers from chars in a string

2014-07-31 Thread Marc Schwartz
On Wednesday, July 30, 2014 10:52 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jul 30, 2014, at 3:13 PM, carol white wht_...@yahoo.com wrote: Hi, If I have a string of consecutive chars followed by consecutive numbers and then chars, like absdfds0213451ab, how to separate

Re: [R] separate numbers from chars in a string

2014-07-30 Thread Marc Schwartz
by a space, which is then used as the split argument to strsplit(). If there will be some variation, you can use multiple calls to gsub() or similar, each getting either the letters or the numbers. Regards, Marc Schwartz __ R-help@r-project.org

Re: [R] SASxport function read.xport gives error object 'w' not found

2014-07-25 Thread Marc Schwartz
are experiencing. Otherwise, you may have to trace through the code (see ?debug, for example) with your file and see if you can identify a trigger. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Norton Virus program indicates that R3.1.1 is not reliable

2014-07-13 Thread Marc Schwartz
system for this detection, it will take the Symantec user community to file reports and get it removed from detection. Regards, Marc Schwartz On Jul 13, 2014, at 10:30 AM, jim holtman jholt...@gmail.com wrote: Glad to see that I am not the only one seeing the error. I was getting it on my other

Re: [R] Problems with read.table and data structure

2014-07-11 Thread Marc Schwartz
. Anyone knows help? Its pretty annoying. Thank you! Hi, See: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Problems with read.table and data structure

2014-07-11 Thread Marc Schwartz
On Jul 11, 2014, at 2:36 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jul 11, 2014, at 9:15 AM, Tim Richter-Heitmann trich...@uni-bremen.de wrote: Hi there! I have huge datafile of 600 columns 360 samples: data - read.table(small.txt, header = TRUE, sep = \t, dec

Re: [R] table over a matrix dimension...

2014-07-10 Thread Marc Schwartz
3 4 [7,] 3 5 1 1 [8,] 2 2 2 4 [9,] 3 2 1 4 [10,] 4 1 4 1 [11,] 2 1 2 5 [12,] 3 5 1 1 [13,] 2 2 4 2 [14,] 1 2 3 4 [15,] 2 3 3 2 [16,] 2 7 1 0 [17,] 4 1 4 1 [18,] 2 3 2 3 ... Regards, Marc Schwartz __ R-help@r-project.org mailing list

Re: [R] symbols in a data frame

2014-07-09 Thread Marc Schwartz
15 Thallium100100 16Tin 951951 17 Vanadium 1000 1000 18 Zinc 1000 1000 19 Antimony100100 Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] odd behavior of seq()

2014-07-03 Thread Marc Schwartz
-these-numbers-are-equal_003f Regards, Marc Schwartz [1] Most Frequently Asked Question __ 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] access an element of a list without looping

2014-07-03 Thread Marc Schwartz
the list, you might want to look at ?rapply, which is a recursive version. 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] Output levels of categorical data to Excel using with()

2014-06-19 Thread Marc Schwartz
you may or may not be relative to installing additional software, do you want to create a new Excel file with each export or be able to append to existing worksheets and how you may want to structure or format the worksheet(s) in Excel. Regards, Marc Schwartz P.S. I have a cousin Daniel

Re: [R] glm.fit: fitted probabilities numerically 0 or 1 occurred for a continuous variable?

2014-06-16 Thread Marc Schwartz
confirming the etiology of it and then, within the context of subject matter expertise, making some decisions on how to proceed. If you Google logistic regression separation, you will get some resources that can be helpful. Regards, Marc Schwartz

Re: [R] Help with arrays

2014-05-29 Thread Marc Schwartz
to it: W[1, which.max(W[2, ])] [1] 119 You should consider what happens if there is more than one of the maximum value in the first row and if it might correspond to non-unique values in the second row. Regards, Marc Schwartz __ R-help@r-project.org

Re: [R] Help with arrays

2014-05-29 Thread Marc Schwartz
On May 29, 2014, at 11:22 AM, Marc Schwartz marc_schwa...@me.com wrote: On May 29, 2014, at 11:02 AM, Olivier Charansonney olivier.charanson...@orange.fr wrote: Hello, I would like to extract the value in row 1 corresponding to the maximum in row 2 Array W [,1

Re: [R] looking at C code from the stats package

2014-05-29 Thread Marc Schwartz
and their associated declared C names. For Recommended packages, there is also a separate SVN repo at: https://svn.r-project.org/R-packages/ but it may be easier to download the tarball for each package from CRAN. Regards, Marc Schwartz __ R-help@r

Re: [R] reference category in binomal glm

2014-05-27 Thread Marc Schwartz
and if you use a two level factor, you are predicting the second level of the factor. 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] Login

2014-05-27 Thread Marc Schwartz
of list archives on the web and there is no provision for removing specific posts from all sites that might possibly have a copy of your post. Google, by the way, is not the only search engine that will include and archive your post in searches. Regards, Marc Schwartz

Re: [R] Summary to data frame in R!!

2014-05-07 Thread Marc Schwartz
. of 2 variables: $ mpg : num 10.4 15.4 19.2 20.1 22.8 ... $ disp: num 71.1 120.8 196.3 230.7 326 ... 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] get element of list with default?

2014-04-15 Thread Marc Schwartz
, 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] get element of list with default?

2014-04-15 Thread Marc Schwartz
On Apr 15, 2014, at 11:22 AM, Marc Schwartz marc_schwa...@me.com wrote: On Apr 15, 2014, at 10:53 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote: Hello: Do you know of a simple function to return the value of a named element of a list if that exists, and return

Re: [R] Error logistic analysis

2014-04-08 Thread Marc Schwartz
+ edupat1 + etniciteit1, family = binomial, data = Slovakije) 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] moses extreme reaction test

2014-04-08 Thread Marc Schwartz
it. http://cran.r-project.org/web/packages/DescTools/ 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] Strange sprintf Behavior

2014-04-02 Thread Marc Schwartz
-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, minimal, self-contained, reproducible

Re: [R] CORDIF test

2014-04-02 Thread Marc Schwartz
documentation and reference and if you have further questions, contact the authors of the paper. 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] NA to NA

2014-03-31 Thread Marc Schwartz
of the NA as you observe for factors. 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] numeric to factor via lookup table

2014-03-28 Thread Marc Schwartz
that with mylevels$ID, which is also column 1. Hence: merge(values, mylevels, by.x = 1, by.y = 1) x code 1 1a 2 2b 3 5e 4 5e 5 10j Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] R mail list archive Google search function not work

2014-03-27 Thread Marc Schwartz
On Mar 27, 2014, at 11:58 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: Marc Schwartz marc_schwa...@me.com on Wed, 26 Mar 2014 16:25:08 -0500 writes: On Mar 26, 2014, at 4:14 PM, David Winsemius dwinsem...@comcast.net wrote: On Mar 25, 2014, at 5:31 PM, Rolf Turner wrote

Re: [R] Clinical significance - Equivalence test

2014-03-27 Thread Marc Schwartz
. FDA) and books that cover the design and analysis of bioequivalence studies and those should have served as a reference for such a study design. Again, seeking local expertise would seem apropos here. Regards, Marc Schwartz __ R-help@r-project.org

Re: [R] completely different results for shapiro.test and ks.test

2014-03-27 Thread Marc Schwartz
-is-the-difference-between-the-shapiro-wilk-test-of-normality-and-the-kolmog You may also be served by searching the R-Help list archives for prior discussions on using normality tests and why they are essentially useless in practice. Regards, Marc Schwartz

Re: [R] R mail list archive Google search function not work

2014-03-26 Thread Marc Schwartz
these days, but presumably that link should be removed if the search engine is no longer actively maintained. Regards, Marc Schwartz cheers, Rolf David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Duplicate of columns when merging two data frames

2014-03-13 Thread Marc Schwartz
of the source data frames to remove the column first: df3 - merge(df1, subset(df2, select = -Place_RM), by=c(Sensor_RM, Station_RM)) Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Generalizing a regex for retrieving numbers with and without scientific notation

2014-02-19 Thread Marc Schwartz
the difference between how R *PRINTS* a numeric value and how R *STORES* a numeric value internally. 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] grep for multiple pattern?

2014-02-13 Thread Marc Schwartz
(an|em|eb, month.name, value = TRUE) [1] January February September November December 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] Sensitivity analysis - minimum effect size detectable by a binomial test

2014-02-05 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] creating an equivalent of r-help on r.stackexchange.com ?

2014-02-04 Thread Marc Schwartz
On Feb 3, 2014, at 8:54 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Feb 3, 2014 at 8:41 PM, Marc Schwartz marc_schwa...@me.com wrote: Hi All, As I have noted in a prior reply in this thread, which began last November, I don't post in SO, but I do keep track

Re: [R] creating an equivalent of r-help on r.stackexchange.com ?

2014-02-03 Thread Marc Schwartz
traffic here? I suspect that this year may very well be important temporally to the implications for whatever decisions are made. Regards, Marc Schwartz R-Help-Annual.pdf Description: Adobe PDF document On Feb 3, 2014, at 6:34 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote

Re: [R] Handling large SAS file in R

2014-01-28 Thread Marc Schwartz
versions, to take on the task of providing some of these facilities and providing them back to the community as a service. But, that is up to them to consider in their overall business plan and the value that they perceive it brings to their products. Regards, Marc Schwartz On Jan 28, 2014, at 9:59

Re: [R] How to read this data correctly

2014-01-24 Thread Marc Schwartz
with the other options depending upon how they function. Regards, Marc Schwartz On Jan 24, 2014, at 2:49 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Hi Rui, Thanks for your reply. However why you said, 'shouldn't read properly in R'? Basically I was looking for some

Re: [R] summary() and the mode

2014-01-23 Thread Marc Schwartz
[which.max(dx$y)]) See ?table, ?density and ?which.max 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] Doubt in simple merge

2014-01-17 Thread Marc Schwartz
29 6 ID5 21 See ?na.omit 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] barplot: segment-wise shading

2014-01-17 Thread Marc Schwartz
On Jan 16, 2014, at 9:09 PM, Martin Weiser weis...@natur.cuni.cz wrote: Jim Lemon píše v Pá 17. 01. 2014 v 13:21 +1100: On 01/17/2014 10:59 AM, Marc Schwartz wrote: ... Arggh. No, this is my error for not actually looking at the plot and presuming that it would work. Turns out

Re: [R] Doubt in simple merge

2014-01-16 Thread Marc Schwartz
different ages, if that is possible, both rows would be added to the result using the above code. Regards, Marc Schwartz On Jan 16, 2014, at 9:04 AM, Frede Aakmann Tøgersen fr...@vestas.com wrote: Ups, sorry that should have been mer - rbind(Elder, Younger) /frede Oprindelig

Re: [R] barplot: segment-wise shading

2014-01-16 Thread Marc Schwartz
', thus if you are going to use this approach for a vector based data object, you would want to use ?length 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] barplot: segment-wise shading

2014-01-16 Thread Marc Schwartz
On Jan 16, 2014, at 5:03 PM, Martin Weiser weis...@natur.cuni.cz wrote: Marc Schwartz píše v Čt 16. 01. 2014 v 16:46 -0600: On Jan 16, 2014, at 12:45 PM, Martin Weiser weis...@natur.cuni.cz wrote: Dear listers, I would like to make stacked barplot, and to be able to define shading

Re: [R] Different output for lm Mac vs PC

2014-01-15 Thread Marc Schwartz
with options(contrasts=c('contr.treatment','contr.poly')) and that has solved the issue. Thanks Greg and Marc! Cheers! Devin On 1/14/14 5:35 PM, Marc Schwartz marc_schwa...@me.com wrote: Good catch Greg. The Mac output observed can result from either: options(contrasts

Re: [R] Subsetting on multiple criteria (AND condition) in R

2014-01-14 Thread Marc Schwartz
the Details section of ?subset, where you will find the following: Factors may have empty levels after subsetting; unused levels are not automatically removed. See droplevels for a way to drop all unused levels from a data frame. Your syntax is fine and the behavior is as expected. Regards, Marc

Re: [R] Different output for lm Mac vs PC

2014-01-14 Thread Marc Schwartz
. Then re-try the example code. If that resolves the issue, you may want to delete, or at least rename/move the .RData file contained in your default working directory. Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Different output for lm Mac vs PC

2014-01-14 Thread Marc Schwartz
...@gmail.com wrote: I would suggest running the code: options('contrasts') on both machines to see if there is a difference. Having the default contrasts set differently would be one explanation. On Tue, Jan 14, 2014 at 2:28 PM, Marc Schwartz marc_schwa...@me.com wrote: On Jan 14, 2014

Re: [R] replace to NA.

2014-01-06 Thread Marc Schwartz
# Where test == , replace with NA is.na(test) - test == test test1 test2 test3 1 NAHi Hello 2Hi NA NA 3 Hello Bye NA Regards, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] why there is no quarters?

2013-12-16 Thread Marc Schwartz
or variants, you can do something like: S - c(01-01, 04-01, 07-01, 10-01) xqq - paste(substr(xq, 1, 5), Q, match(substr(xq, 6, 10), S), sep = ) head(xqq, 10) [1] 2001-Q1 2001-Q1 2001-Q1 2001-Q2 2001-Q2 2001-Q2 [7] 2001-Q3 2001-Q3 2001-Q3 2001-Q4 See ?match, ?substr and ?paste Regards, Marc

Re: [R] why there is no quarters?

2013-12-16 Thread Marc Schwartz
2005-10-01 2006-01-01 2006-04-01 2006-07-01 2006-10-01 [25] 2007-01-01 2007-04-01 2007-07-01 2007-10-01 2008-01-01 2008-04-01 [31] 2008-07-01 2008-10-01 2009-01-01 2009-04-01 2009-07-01 2009-10-01 36 Levels: 2001-01-01 2001-04-01 2001-07-01 2001-10-01 ... 2009-10-01 Regards, Marc Schwartz

Re: [R] Exporting R graphics into Word without losing graph quality

2013-12-16 Thread Marc Schwartz
. Regards, Marc Schwartz You can edit a metafile in Word, but different versions seem to have different issues. Earlier versions would lose clipping if you tried to edit the file, but World 2013 works reasonably well. Text labels can jump if you edit the figure in Word (especially rotated text

Re: [R] Should there be an R-beginners list?

2013-11-25 Thread Marc Schwartz
that is simply reflective of the distribution of traffic on various other online resources. To the original query posted by Bert, I would say no, there is not a need for a beginner's list. Regards, Marc Schwartz R-Help.pdf Description: Adobe PDF document

Re: [R] convert one digit numbers to two digits one

2013-11-06 Thread Marc Schwartz
Regards Alex This is an example where using ?sprintf gives you more control: sprintf(%02d:%02d, 12, 3) [1] 12:03 sprintf(%02d:%02d, 9, 3) [1] 09:03 The syntax '%02d' tells sprintf to print the integer and pad with leading zeroes to two characters where needed. Regards, Marc Schwartz

Re: [R] Basic question: why does a scatter plot of a variable against itself works like this?

2013-11-06 Thread Marc Schwartz
model.frame(x ~ I(x)) x I(x) 1 11 2 22 3 99 In both of the above cases, you get two columns of data back, thus the result is essentially: plot(c(1, 2, 9), c(1, 2, 9)) Regards, Marc Schwartz __ R-help@r-project.org mailing list

Re: [R] Questions about R

2013-11-06 Thread Marc Schwartz
that someone else can have access to the information? That is outside of the scope of R and is dependent upon the security of the computer system(s) and possibly networks, upon and over which R is running and where your data is stored and managed. Regards, Marc Schwartz Thanks in advance for your

Re: [R] fail to install packages in R3.0.2 running in Redhat linux

2013-11-05 Thread Marc Schwartz
...' is malformed! The error suggests that there is a problem with the CRAN mirror that you have specified. I would try a different CRAN mirror and see if that resolves the problem. Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] fail to install packages in R3.0.2 running in Redhat linux

2013-11-05 Thread Marc Schwartz
to link to internet, in this server. So, do you have any ideas/tools/scripts on how to track the real problem, in my case? Best Jian-Feng, 2013/11/5 Marc Schwartz marc_schwa...@me.com On Nov 5, 2013, at 4:38 AM, Mao Jianfeng jianfeng@gmail.com wrote: Dear R-helpers

Re: [R] alternative for shell() in Mac

2013-11-04 Thread Marc Schwartz
executable. ADMB is presumably associated with AD Model Builder and you may be better off posting to the r-sig-mixed-models list: https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models Regards, Marc Schwartz __ R-help@r-project.org mailing list https

Re: [R] 'yum install R' failing with tcl/tk issue

2013-10-25 Thread Marc Schwartz
which might be helpful, as it suggests a similar issue of yum picking up incorrect versions. You may need to reinstall the EPEL repo RPM after these steps. Regards, Marc Schwartz Following some instructions online, I've done this: rpm -Uvh http://download.fedoraproject.org/pub/epel/6

Re: [R] Use R to plot a directory tree

2013-10-24 Thread Marc Schwartz
, but that is a good thing. :-) More info here: http://tug.org/PSTricks/main.cgi/ and lots of examples with code here: http://tug.org/PSTricks/main.cgi?file=examples I use PSTricks for creating things like subject disposition flow charts for clinical study reports. Regards, Marc Schwartz

Re: [R] installing package from source

2013-10-24 Thread Marc Schwartz
. Depending upon how far back you need to go in package versions, there may be pre-compiled Windows binaries (.zip files) available in directories here: http://cran.r-project.org/bin/windows/contrib/ Regards, Marc Schwartz Regards, Long __ R-help

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