Re: [R] Simulate skewed data if 2.5, 25th 50th and 75 centile are known

2015-08-05 Thread Marc Schwartz
observed >> values at the four centiles. >> Thank you, >> John John, Just to pick up on Bert’s suggestion, there are some threads over on SE that discuss similar subject matter, one of which, due to my own curiosity, led me to: https://cran.r-project.org/web/packages/rrisk

Re: [R] Crosstabulation with a frequency variable

2015-08-13 Thread Marc Schwartz
Hi, As Sarah noted, there are a variety of ways in R to accomplish this, such as: DF <- data.frame(var1 = c(0, 0, 1, 1), var2 = c(0, 1, 0, 1), freq = c(11, 12, 13, 14)) > xtabs(freq ~ var1 + var2, data = DF) var2 var1 0 1 0 11 12 1 13 14 See ?xtabs Regards, Marc Sc

Re: [R] difference between write.csv(...) and write.table(..., sep=", ")

2015-08-16 Thread Marc Schwartz
"B","C" > "a",1,3,5 > "b",2,4,6 > > The difference of outputs from both functions is clear. > > Is it possible to get the same results of write.csv using write.table? > > Any suggestions will be really appreciated. Thanks in advan

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

2015-01-06 Thread Marc Schwartz
not, taking a few 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 20

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

2015-01-08 Thread Marc Schwartz
est (which is listed in the See Also 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

Re: [R] nonmonotonic glm?

2015-01-11 Thread Marc Schwartz
re generally supported in mixed models. If this was not mixed model, another logistic regression implementation is in Frank's rms package on CRAN, using his lrm() instead of glm() and rcs() instead of ns(): # after installing rms from CRAN require(rms) lrm(DV ~ rcs(IV, 5), data = YourDa

Re: [R] Problems installing jpeg package

2015-01-27 Thread Marc Schwartz
all libjpeg-turbo-devel or sudo yum install libjpeg-turbo-devel from the CLI. The R Installation and Administration manual covers this in: http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-programs-and-libraries As an aside, there is a SIG list specifically for R

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

2015-02-02 Thread Marc Schwartz
ller AccessDatabaseEngine.exe available from http://www.microsoft.com/en-us/download/details.aspx?id=23734."; 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 specif

Re: [R] Database connection query

2015-02-09 Thread Marc Schwartz
both. 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/

Re: [R] Change error bar length in barplot2

2015-02-17 Thread Marc Schwartz
On Feb 17, 2015, at 10:46 AM, Joule Madinga 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

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

2015-02-24 Thread Marc Schwartz
evelopment related tools which are referenced in the R FAQ for OSX and the Installation and Admin manual. 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

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

2015-03-02 Thread Marc Schwartz
0729.00 FALSE 9 NA > # 25 147203.03 178079.38 TRUE 1 NA > # 26 109996.02 13.95 TRUE 2 NA > # 27 91424.20 87391.56 FALSE 1 NA > # 28 89065.91 87196.69 FALSE 2 NA > # 29 86628.74 84809.07 FALSE 3 NA > # 30 79357.60 77555.62

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

2015-03-09 Thread Marc Schwartz
), but you might really be asking for something completely > different. > > Duncan Murdoch Based upon the info here: http://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. Regard

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

2015-03-12 Thread Marc Schwartz
after you subscribe, lest you be subject 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

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

2015-03-23 Thread Marc Schwartz
http://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://st

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

Re: [R] basic help with as.Date()

2015-03-26 Thread Marc Schwartz
> as.Date(as.character(df$mydate), format='%b-%y') Hi, R's default date class object requires a full date, with a month, day and year. You might look at the 'zoo' package on CRAN, which has a yearmon() function. Regards, Marc Schwartz _

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

2014-07-25 Thread Marc Schwartz
hing about your xpt file that is causing a problem. You may need to contact Greg, who is the package maintainer for SASxport, to get a sense from him as to what would trigger the error you are experiencing. Otherwise, you may have to trace through the code (see ?debug, for example) with your file

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

2014-07-30 Thread Marc Schwartz
+)([a-z]+)", "\\1 \\2 \\3", "absdfds0213451ab"), > " ") [[1]] [1] "absdfds" "0213451" "ab" The initial gsub() returns the 3 parts separated by a space, which is then used as the spli

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

2014-07-31 Thread Marc Schwartz
"""0213451" > strsplit("absdfds0213451ab4567", split = "[a-z]+") [[1]] [1] "" "0213451" "4567" # Get the letters, using numbers as the split > strsplit("absdfds0213451ab", split = "[0-9]+

Re: [R] Better use with gsub

2014-08-01 Thread Marc Schwartz
tors: > 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 __ R-help@r-p

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

2014-08-01 Thread Marc Schwartz
2 2.2 4.5 1.5 versicolor 65 5.6 2.9 3.6 1.3 versicolor 74 6.1 2.8 4.7 1.2 versicolor 99 5.1 2.5 3.0 1.1 versicolor 135 6.1 2.6 5

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
CDT" [5] "2014-08-12 00:00:04 CDT" "2014-08-12 00:00:05 CDT" > tail(x) [1] "2014-08-12 23:59:54 CDT" "2014-08-12 23:59:55 CDT" [3] "2014-08-12 23:59:56 CDT" "2014-08-12 23:59:57 CDT" [5] &qu

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 als

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
On Aug 12, 2014, at 2:49 PM, John McKown 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 of slowing the rotation of

Re: [R] regex pattern assistance

2014-08-15 Thread Marc Schwartz
"AO" "AO Data" "S01-012" "120824" > unlist(strsplit(x, "/"))[5] [1] "S01-012" Alternatively, again, presuming the same position: > gsub("/mnt/AO/AO Data/([^/]+)/.+", "\\1", x) [1] "S01-012" You don&#x

Re: [R] regex pattern assistance

2014-08-15 Thread Marc Schwartz
On Aug 15, 2014, at 11:56 AM, Tom Wright 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 location i

Re: [R] Installing RODBC

2014-08-20 Thread Marc Schwartz
reference, there is a specific mailing list for DB related queries: https://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 _

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

2014-08-28 Thread Marc Schwartz
t work if other strings > have more or fewer parts separated by '-'. Is there a general way to do it? > Thanks. > > Jun Try this: test <- 'AF14-485-502-89-00235' > sub("^.*-(.*)$", "\\1", test) [1] "00235" test <- '

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

2014-09-02 Thread Marc Schwartz
9, then use barplot(): art.fac <- factor(art, levels = 0:19) > table(art.fac) art.fac 0 1 2 3 4 5 6 7 8 9 10 11 12 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 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] Using R in our commercial business application

2014-09-18 Thread Marc Schwartz
nhancements that they have created and therefore, your 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-proje

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 wrote: > On 18/09/2014 2:35 PM, Marc Schwartz wrote: >> On Sep 18, 2014, at 4:36 AM, Pasu wrote: >> >> > Hi >> > >> > I would like to know how to use R in our commercial business application >&g

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

2014-09-19 Thread Marc Schwartz
6-Femme-Non Cadre", "66-Homme-Non Cadre", > "66-Homme-Non Cadre", "66-Homme-Non Cadre", "66-Homme-Non Cadre", > "66-Homme-Non Cadre", "66-Homme-Non Cadre", "66-Homme-Non Cadre", > "66-Homme-Non Cadre", "66-

Re: [R] plot

2014-09-19 Thread Marc Schwartz
3<-c(1.32,1.47,1.5) > y4<-c(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(

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

2014-09-19 Thread Marc Schwartz
cally: 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 commented

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

2014-09-19 Thread Marc Schwartz
cally: 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 commented

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

2014-09-23 Thread Marc Schwartz
quot;NA-1999", "NA-1999", > "NA-1999", "NA-1999")), .Names = c("month", "Year", "views", > "MonthDay"), row.names = 109:120, class = "data.frame") >> > Since you are trying to use ddf$

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

2014-09-23 Thread Marc Schwartz
shed. May > I ask followup question on the same issue. I failed to convert 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

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

2014-09-23 Thread Marc Schwartz
t;09", "10", "11", "12") >> month.abb > 010203040506070809101112 > "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Se

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

2014-09-25 Thread Marc Schwartz
an run: update.packages(checkBuilt = TRUE) to update all of your installed packages and be sure that they are built for the current 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 chec

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 > Sent by: r-help-boun...@r-projec

Re: [R] sweave package for R version 3.02

2014-11-11 Thread Marc Schwartz
ve is part of the 'utils' package, which is a part of base R and does not need 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 mai

Re: [R] install R without texlive dependencies

2014-11-20 Thread Marc Schwartz
ong the lines of: rpm -ivh --nodeps RPMName.rpm where you can either download the R RPM and install 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 Schw

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

2014-11-20 Thread Marc Schwartz
f be processed by Sweave, as if it was a "child" .Rnw file. If you want that type of functionality, you would need to use \SweaveInput{InsertContentHere.Rnw}. Once you have your final .tex file, you can then run pdflatex on that file via ?system. Regards, Marc Schwartz

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

2014-12-02 Thread Marc Schwartz
day 3 1 2015-03-15 Illness 4 1 2015-03-16 Illness 5 1 2015-03-17 Illness 6 1 2015-03-18 Illness 7 1 2015-03-19 Illness 8 1 2015-03-20 Illness 9 2 2015-05-20 Holiday 10 2 2015-05-21 Holiday 11 2 2015-05-22 Holiday 12 2 2015-05-23 Holiday 13 2 2015-06-01 Holiday 14 2 2015-06-

Re: [R] Output In R

2015-08-22 Thread Marc Schwartz
! :-) Regards, Marc Schwartz > > If you have not seen it, you may find Bob Muenchen's pdf and/or the expanded > book R FOR SAS AND SPSS USERS ( > https://science.nature.nps.gov/im/datamgmt/statistics/R/documents/R_for_SAS_SPSS_users.pdf > ) useful. > > It is very

Re: [R] Choosing columns by number

2015-08-25 Thread Marc Schwartz
etal.Width)) which is the same as: NewDF <- iris[, c(2, 4)] You can also define sequential columns using “:”, thus: NewDF <- subset(iris, select = c(Sepal.Width:Petal.Width) is the same as: NewDF <- iris[, 2:4] and use combinations of the two approaches as well. You can also ne

Re: [R] ggplot2 will not install after system upgrade

2015-09-03 Thread Marc Schwartz
here you are running a version of R built for F20 on F22. 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://www.R-project.o

Re: [R] factor interaction boxplot ordering by median

2015-09-05 Thread Marc Schwartz
ot;, "69", "70", "71", "72")) # Modify the ?boxplot example bymedian <- with(DF, reorder(interaction(spray, op), count, median)) > bymedian [1] A.op1 A.op1 A.op1 A.op1 A.op1 A.op1 A.op2 A.op2 A.op2 A.op2 A.op2 [12] A.op2 B.op1 B.op1 B.op1 B.op1 B.o

Re: [R] names in R list's

2015-09-08 Thread Marc Schwartz
y intercepted (without notice to the sender).” 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://www.R-project.org/pos

Re: [R] generate ordered categorical variable in R

2015-09-16 Thread Marc Schwartz
A A B D C D C B B A A C A B C D B B A D B C A A C C A [133] A C D C C C D C C C A B C B A C A D C C B B C A C A B A B D B D D [166] B A B C B C D D B B D C C C D B A D C D A D C D C C B A D B C A D [199] B D Levels: A B C D Here, the result is a fact

Re: [R] generate ordered categorical variable in R

2015-09-16 Thread Marc Schwartz
> On Sep 16, 2015, at 1:06 PM, Bert Gunter wrote: > > Yikes! The uniform distribution is a **continuous** distribution over > an interval. You seem to want to sample over a discrete distribution. > See ?sample for that, as in: > > sample(1:4,100,rep=TRUE) > > ## or for this special case and fa

Re: [R] generate ordered categorical variable in R

2015-09-16 Thread Marc Schwartz
wledge. And knowledge > is certainly not wisdom." > -- Clifford Stoll > > > On Wed, Sep 16, 2015 at 1:34 PM, Bert Gunter wrote: >> Yes. Thanks Marc. I stand corrected. >> >> -- Bert >> Bert Gunter >> >> "Data is not information. In

Re: [R] 'R' Software Output Plagiarism

2015-09-22 Thread Marc Schwartz
cy folks to see if there is any guidance provided for students regarding the crediting of software used in this manner, especially if that guidance is at no cost to you. Regards, Marc Schwartz > On Sep 22, 2015, at 11:01 AM, Bert Gunter wrote: > > 1. It is highly unlikely that we

Re: [R] 'R' Software Output Plagiarism

2015-09-22 Thread Marc Schwartz
at sources > the text is claimed to be plagiarized from and/or what parts of the text that > are being matched by Urkund. If it turns out that Urkund is generating false > positives, then this needs to be pointed out to them and to the people basing > decisions on it. > > -pd &g

Re: [R] Error: pandoc version 1.12.3 or higher is required and was not found

2015-09-23 Thread Marc Schwartz
gt; rysz...@czerminski.net > LinkedIn.com/in/Ryszard.Czerminski Did you actually install pandoc? As per the page that you link to above: "Please follow the instructions on the Pandoc website to install it." The link in the above sentence is: http://johnmacfarlane.net/pandoc/ Re

Re: [R] Accessing defunct package

2015-09-25 Thread Marc Schwartz
port files. Thus, one commercial (not free) conversion application that is independent of SAS is StatTransfer, which may be worth your investment if you are doing this quite a bit: http://www.stattransfer.com Regards, Marc Schwartz __ R-help@r-proje

[R] Announcement - The Use Of Nabble For Posting To R-Help Will No Longer Be Supported Effective October 15, 2015

2015-10-01 Thread Marc Schwartz
our recommended vehicles for focused community support for R. Thank you, Marc Schwartz On Behalf of the R Foundation for Statistical Computing __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r

Re: [R] regex sub with specified number of characters

2015-10-06 Thread Marc Schwartz
95843" "398374" or > sub("^3([0-9]{6})$", "\\1", a) [1] "593857" "384723" "4395843" "398374" If the source begins with a 3 followed by 6 digits only from 0 to 9, it will return the 6 digits part of the regex

Re: [R] cut - strange NA as output

2015-10-06 Thread Marc Schwartz
)), by = 1), label=FALSE) [1] 1322 1175 1155 1149 1295 1173 1289 1197 1356 1129 Both of the above approaches will increment the sequence 0:max(x) to 1356: > range(seq(0, max(x) + 1, by = 1)) [1]0 1356 > range(seq(0, ceiling(max(x)), by = 1)) [1]0 1356 Regards, Marc Schwartz _

Re: [R] additive proportional odds model in R

2015-10-08 Thread Marc Schwartz
, To your primary question, see the VGAM package on CRAN: https://cran.r-project.org/web/packages/VGAM/ There is also a reference here that you might find helpful: http://www.stat.ufl.edu/~aa/ordinal/R_examples.pdf To your question regarding David's comment on Nabble: https://stat.ethz

Re: [R] string split problem

2015-10-23 Thread Marc Schwartz
uot;aaa|dd" The above takes the two components, before and after the first '.', adds the "|" as a character in between, to then be used in strsplit(): > strsplit(gsub("^([[:alpha:]]+)\\.(.*)$", "\\1|\\2", test), split = "\\|") [[1]] [1] "aaa&

Re: [R] Number of digits to display?

2015-10-26 Thread Marc Schwartz
. If you want to affect the display of values in routine output, see ?options and note 'digits' and 'scipen'. Also see ?print.default. Those approaches do not affect the precision of calculations on the *stored* values. For fractions,

Re: [R] How to get variable name while doing series of regressions in an automated manner?

2015-10-27 Thread Marc Schwartz
27; vector for the source response variables, or consider: > as.character(formula(MODS[[1]])) [1] "~" "log(Sepal.Length)" [3] "Petal.Width + Species" > sapply(MODS, function(x) formula(x)[[2]]) [[1]] log(Sepal.Length) [[2]] log(Sepal.Width)

Re: [R] Pasting a large chunk of R code in terminals

2015-10-29 Thread Marc Schwartz
> Thanks, > > -- > *Xu Tian* Rather than pasting a large amount of code into the terminal, put the code into a text file (e.g. MyCode.R) and use ?source i your terminal session, to read in the file to then be parsed and run. Regards, Marc Schwartz __

Re: [R] Pasting a large chunk of R code in terminals

2015-10-29 Thread Marc Schwartz
> On Oct 29, 2015, at 10:43 AM, Marc Schwartz wrote: > > >> On Oct 29, 2015, at 10:16 AM, Victor Tian wrote: >> >> Hi there, >> >> Often times, I would run R in the terminal when the task is computationally >> intensive and a nice-looking UI is

Re: [R] What happened to Canada?

2015-11-02 Thread Marc Schwartz
rt HTTPS. The last entry on the list should be (HTTP mirrors). Click that and it will bring up a list of additional mirrors, including Canadian locations, that support HTTP. Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIB

Re: [R] What happened to Canada?

2015-11-02 Thread Marc Schwartz
> On Nov 2, 2015, at 4:36 PM, Rolf Turner wrote: > > > On 03/11/15 01:41, Marc Schwartz wrote: > >> >>> On Nov 2, 2015, at 6:00 AM, John Kane wrote: >>> >>> A rather silly question but I went to install a new package this >>> mor

Re: [R] What happened to Canada?

2015-11-02 Thread Marc Schwartz
Hi Rolf, See below. > On Nov 2, 2015, at 5:40 PM, Rolf Turner wrote: > > > Thanks for the reply, Marc. > > On 03/11/15 12:09, Marc Schwartz wrote: > > > >> >> Rolf, >> >> What do: >> >> getOption("CRAN")

Re: [R] Using regex to truncate repeating characters

2015-11-11 Thread Marc Schwartz
ers in the prior alphanumeric character group of at least 3 repeats and return just the unique character. The returned expression: \\1\\1\\1 says repeat the unique character 3 times. See ?gsub and ?regex for some additional information. Regards, Marc Schwartz _

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Marc Schwartz
e a variety of supporting packages on CRAN that have related functionality (e.g. formatted LaTeX output) that are worth knowing about and are included in the Reproducible Research task view: https://cran.r-project.org/web/views/ReproducibleResearch.html Regards, Marc Schwartz __

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

2015-12-07 Thread Marc Schwartz
e encountered in the source data frame. This is a parallel to the same argument in ?write.table. Regards, Marc Schwartz ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

Re: [R] Errors when compile RInside using intel c++ compiler on windows

2015-12-10 Thread Marc Schwartz
Hi, For clarification, the rcpp support list is the recommended location for RInside support: http://lists.r-forge.r-project.org/mailman/listinfo/rcpp-devel Regards, Marc > On Dec 10, 2015, at 11:30 AM, Bert Gunter wrote: > > Wrong list!. This is about programming **IN** the R language.

Re: [R] regexp inside and outside brackets

2015-12-11 Thread Marc Schwartz
quot;, x)) [[1]] [1] "{0}" "{1}" "{a2}" "{12}" The gsub() replaces the returned braces. You could invert the result of regmatches() to get: > regmatches(x, gregexpr("\\{[[:alnum:]]+\\}", x), invert = TRUE)[[1]] [1] "A1" "~B0"

Re: [R] regexp inside and outside brackets

2015-12-11 Thread Marc Schwartz
Hi, Needless to say, Jeff's solution is easier than my second one. I was wrestling in dealing with the greedy nature of regex's and so shifted to thinking about the use of the functions that I proposed in the second scenario. Also, I was a bit hypo-caffeinated ... ;-) Regards, Marc > On Dec

Re: [R] Updating Package Fails: Help on How to Fix Needed

2015-12-11 Thread Marc Schwartz
on, be related to the dependency of pbkrtest on lme4. The ?sigma for lme4 shows the following in Examples: methods(sigma)# from R 3.3.0 on, shows methods from pkgs 'stats' *and* 'lme4' So there may be a package namespace/export issue at play here... Regards, Marc Schwartz

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Marc Schwartz
gt; install locally? > > Best wishes, > Ranjan plotmath is not a package, it is a function: ?plotmath Regards, Marc Schwartz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Marc Schwartz
> On Dec 12, 2015, at 11:32 AM, Ranjan Maitra > wrote: > > On Sat, 12 Dec 2015 10:51:16 -0600 Marc Schwartz wrote: > >> >>> On Dec 12, 2015, at 10:47 AM, Ranjan Maitra >>> wrote: >>> >>> Hi, >>> >>> I recentl

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Marc Schwartz
> On Dec 12, 2015, at 12:33 PM, Ranjan Maitra > wrote: > >> A couple of things: >> >> First, there is a SIG list specifically for R on Fedora and RHEL >> distributions and their derivatives: >> >> https://stat.ethz.ch/mailman/listinfo/r-sig-fedora >> >> Second, how did you install R? If yo

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-15 Thread Marc Schwartz
> On Dec 15, 2015, at 9:55 AM, Martin Maechler > wrote: > > > > [] > >> You are missing the closing bracket on the boxplot() >> command. Just finish with a ')' > > Hmm... I once learned > > '()' =: parenthesis/es > '[]' =: bracket(s) > '{}' =: brace(s) Martin, The

Re: [R] Expanding matrix into dummies

2015-12-22 Thread Marc Schwartz
[3,] 1 0 0 0 0 0 0 1 [4,] 0 0 0 1 0 1 0 0 [5,] 0 1 0 0 1 1 0 0 [6,] 0 0 1 0 0 0 1 0 See ?row Regards, Marc Schwartz __

Re: [R] R package built using newer version of R

2016-01-05 Thread Marc Schwartz
Hi, You appear to have downloaded and attempted to install the '.zip' version of the package, which is the pre-built Windows **binary** version of the package. As Harrie noted below, you want to download the '.tar.gz' version of the package, which is the "source&

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Marc Schwartz
sting of file names by pattern into the CSVFiles vector rather than creating it manually as above. 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 th

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Marc Schwartz
ot this process is really what you want to do and whether or not there is a solution to your problem that does not involve using Excel as the end result. Regards, Marc Schwartz > On Jan 13, 2016, at 12:16 PM, Jeff Newmiller wrote: > > There is no such thing as a "csv sheet".

Re: [R] write.xlsx- writing in a single sheet

2016-01-15 Thread Marc Schwartz
an existing worksheet. The 'append = TRUE' argument enables you to add a new worksheet to an existing Excel file, as opposed to creating a new Excel file or overwriting an existing Excel file. It appears that the addDataFrame() function might support the approach of adding the contents

Re: [R] Simple syntax question (I think)

2016-01-20 Thread Marc Schwartz
> On Jan 20, 2016, at 12:26 PM, Bert Gunter wrote: > > Could someone please explain to me my mal-understanding of the > following, which I expected to give the same results without errors. > > TIA. > > -- Bert > >> z <- list(x=1) >> z[[2]] <- 3 >> z > $x > [1] 1 > > [[2]] > [1] 3 > >> list

Re: [R] R Licensing Question

2016-01-26 Thread Marc Schwartz
to get involved as the nature of such bundling (e.g are you actually interfacing with the package via compiled code that is linked to a binary?) will be relevant to determining if your code would need to be licensed with a compatible open source license. Regards, Marc Schwartz _

Re: [R] R project and the TPP

2016-02-04 Thread Marc Schwartz
Ted and José, The FSF has a blog post here that might provide some insights: http://www.fsf.org/blogs/licensing/time-to-act-on-tpp-is-now-rallies-against-tpp-in-washington-d-c-november-14-18 That is from last November, but the relevant passage, perhaps in a temporal vacuum, seems to be the s

Re: [R] Dates and missing values

2016-02-08 Thread Marc Schwartz
24 1st Qu.:18865001 1st Qu.:1902-12-04 Median :19059230 Median :1920-09-10 Mean :18988523 Mean :1923-04-12 3rd Qu.:19255701 3rd Qu.:1941-01-17 Max. :19691228 Max. :1969-12-28 NA's :1 NA's :3 So summary does support the reporting of NA&

Re: [R] Dates and missing values

2016-02-08 Thread Marc Schwartz
> On Feb 8, 2016, at 12:45 PM, Göran Broström wrote: > > Thanks Marc, but see below! > > On 2016-02-08 19:26, Marc Schwartz wrote: >> >>> On Feb 8, 2016, at 11:26 AM, Göran Broström wrote: >>> >>> I have a data frame with dates as integers:

Re: [R] confirm family==binomial and link==logistic

2016-02-12 Thread Marc Schwartz
e+gpa, data=mydata) > family(someobject) Family: gaussian Link function: identity someobject<- glm(admit~gre+gpa, data=mydata, family="binomial") > family(someobject) Family: binomial Link function: logit So, you could feasibly use: family(someobject)$family family(someobj

Re: [R] R packages for Mac Users

2016-02-23 Thread Marc Schwartz
t a sense for any issues there. There are also two Mac specific resources that you should be aware of, if not already: R for Mac OS X FAQ: https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html R-SIG-Mac: https://stat.ethz.ch/mailman/listinfo/r-sig-mac Regards, Marc Schwartz

Re: [R] Specify order of groups negative binomial (glm.nb)

2016-02-25 Thread Marc Schwartz
aring zero-inflated models with non zero-inflated models. Regards, Marc Schwartz > On Feb 25, 2016, at 2:48 PM, Bert Gunter wrote: > > You can re-set the contrasts for the factor, though whether this is > "easier" is a matter of personal preference. > > See ?C o

Re: [R] Namespace problem with pre-R 3.0.0 package

2016-03-03 Thread Marc Schwartz
ovide better assistance, subscribe to and post to R-package-devel for further discussion. 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 g

Re: [R] possible to use the program for commercial reasons?

2016-03-21 Thread Marc Schwartz
> On Mar 21, 2016, at 6:44 AM, Felix Töpfer wrote: > > Dear R-Team, > > I am a scientist actually working in parallel as data analyst for an > advertisment auditing company. Therefore i would use your software for > commercial reasons right now. Is this allowed, o rare there special licences?

Re: [R] Coxph model treating all the values of 1 variable as separate variables PLEASE HELP!!

2016-03-26 Thread Marc Schwartz
?str. Somewhere along the way, it becomes a factor instead of numeric. If you imported it via something like read.table() from an external data file, check to see what the result of that operation is, as non-numeric values in that column can result in the entire column being coerced to a factor.

Re: [R] Interquartile Range

2016-04-19 Thread Marc Schwartz
the density estimate. Of course, there is still the possibility of a multi-modal distribution and the nuances of which kernel is used, etc., etc. Food for thought. Regards, Marc Schwartz > On Apr 19, 2016, at 7:07 PM, Bert Gunter wrote: > > Well, instead of your functions try:

Re: [R] how to donate software to R community

2016-04-28 Thread Marc Schwartz
ue the CRAN path formally, would be via your own servers, R-Forge, github or similar vehicles. 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

Re: [R] changing factor to numbers without getting NAs

2016-05-13 Thread Marc Schwartz
es that cannot be coerced to numeric due to the commas: > as.numeric("100,2") [1] NA Warning message: NAs introduced by coercion > as.numeric("100.2") [1] 100.2 Regards, Marc Schwartz __ R-help@r-project.org mailing

Re: [R] R for RedHat Linux upgrade?

2016-05-17 Thread Marc Schwartz
.fedoraproject.org/koji/packageinfo?packageID=1230 It would appear that Tom is in the process of preparing a 3.3.0 release, but I would defer to him on the time frame for release, which generally requires that testers provide the requisite feedback to increase th

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