Re: [R] R base packages

2017-10-23 Thread Bert Gunter
?library Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Oct 23, 2017 at 11:36 AM, Rene J Suarez-Soto < rene.j.

Re: [R] How to save and restore a workspace

2017-10-23 Thread Bert Gunter
needs and priorities of course. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Oct 23, 2017 at 3:45 PM, Jim Lemon wrote: &

Re: [R] A list of data frames and a list of colnames.

2017-10-23 Thread Bert Gunter
This doesn't make sense to me: On Mon, Oct 23, 2017 at 2:09 PM, Ed Siefker wrote: > I have a list of file names, and a list of data frames contained in those > files. > > mynames <- list.files() > ## a character vector of file names mydata <- lapply(mynames, read.delim) > # A list of data fra

Re: [R] draw a circle with a gradient fill

2017-10-24 Thread Bert Gunter
u can see from the quoted message below, your text got mangled. This, of course, will discourage others to give you the response you need. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berke

Re: [R] Problem Subsetting Rows that Have NA's

2017-10-25 Thread Bert Gunter
, and not to vectors, matrices, etc. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Oct 25, 2017 at 11:17 AM, David Winse

Re: [R] Changes in code_plot

2017-10-26 Thread Bert Gunter
t the bottom fo the email) for suggestions on how to post requests for help that elicit prompt and helpful responses if you need to post in the future. Especially the part about "small reproducible examples" (which probably wasn't needed here, though). Cheers, Bert Bert Gunter &q

Re: [R] genetics: backward haplotype transmission association algorithm

2017-10-27 Thread Bert Gunter
You may get lucky here, but I recommend that you post this instead on the Bioconductor list, which is exactly concerned with such things. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkele

Re: [R] Function Relevel DOE NOT FOUND

2017-10-28 Thread Bert Gunter
Check your spelling: "relevel" not "revel" It's in stats (as well as probably others). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his &

Re: [R] SamplingStrata R package

2017-10-31 Thread Bert Gunter
below. Also, if you do post, please post in plaint text, not html, as the latter (especially code) can get mangled by the mail server. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley B

Re: [R] SamplingStrata R package

2017-10-31 Thread Bert Gunter
inters towards how to handle strata using the package in my situation, > i.e. business type X business size with information for count and financial > turnover. > > many thanks > > On 31 October 2017 at 14:37, Bert Gunter wrote: > >> 1. There is no question here. >>

Re: [R] Cox Regression : Spline Coefficient Interpretation?

2017-11-01 Thread Bert Gunter
e misunderstood your question, you might wish to clarify exactly what it is that you are seeking in another post. Finally, as you can see from the below, post in PLAIN TEXT ONLY, as html can get mangled by the server on this plain text mailing list. Cheers, Bert Bert Gunter "The trouble

Re: [R] Cox Regression : Spline Coefficient Interpretation?

2017-11-02 Thread Bert Gunter
Always reply to the list. I do not do private consulting. (I have cc'ed this to the list). I still think this belongs on stackexchange, not r-help. I think you need to read up on the mathematics of spline bases. Cheers, Bert Bert Gunter "The trouble with having an open mind is t

Re: [R] repeat a function

2017-11-02 Thread Bert Gunter
fff(2)(3) ## note syntax: 3^2 + 2 [1] 11 > fff(3)(2) ## 2^2 + 3 [1] 7 ## or you can assign the function to a symbol and call it directly > myf <- fff(2) > myf(3) ## 3^2 + 2 [1] 11 You all can decide whether or not this is useful in the current context. Cheers, Bert Bert Gunter

Re: [R] as.spikeTrain

2017-11-03 Thread Bert Gunter
I believe this query is OT here and would best be addressed by either a careful reading of the package documentation or by contacting the package maintainer, found by maintainer("STAR"). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep c

Re: [R] Question - TukeyHSD

2017-11-04 Thread Bert Gunter
AFAICS, without knowing the structure of your data and what specifically you wish to do, how could one answer your question? -- which is probably yes, you can do it, but without further info, ??? Maybe someone with a better crystal ball can help -- or you could clarify. Cheers, Bert Bert

Re: [R] Change colour of line in logi.hist.plot

2017-11-05 Thread Bert Gunter
. If this doesn't work (and you may have already have tried this), hopefully someone else will have a better answer. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in h

Re: [R] Error in Zero inflated model (ziP) with bam

2017-11-06 Thread Bert Gunter
Do you have the mgcv package installed (I think it's part of the standard distro, though) /loaded? ziP is there, not in BAM. Other than that, sorry, no clue. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it

Re: [R] For each entry type in column?

2017-11-06 Thread Bert Gunter
Time to go through a tutorial or two! -- This forum cannot replace such self study. Your query evidences some basic confusion, but ?tapply or the equivalent lapply(split(...)) construct are most likely relevant. Cheers, Bert Bert Gunter "The trouble with having an open mind is that p

Re: [R] For each entry type in column?

2017-11-06 Thread Bert Gunter
Prrobably also worth mentioning for this sort of thing is the "tidyverse" machinery, for which the RStudio site should probably be your first port of call. This will however require learning alternative, and probably additional, paradigms. -- Bert Bert Gunter "The trouble with

Re: [R] For each entry type in column?

2017-11-06 Thread Bert Gunter
Except that syntax is wrong: > d <- data.frame (a = 1:3, b = letters[1:3]) > names(d$a) NULL -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Count

Re: [R] For each entry type in column?

2017-11-06 Thread Bert Gunter
ty -- to a functional programming paradigm. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Nov 6, 2017 at 3:28 PM,

Re: [R] Calculating frequencies of multiple values in 200 colomns

2017-11-09 Thread Bert Gunter
basic functionality. In this case, something like (no reproducible example given, so can't confirm): apply(Values, 2, function(x)maf(tabulate(x))) should be close to what you want . Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and

Re: [R] Calculating frequencies of multiple values in 200 colomns

2017-11-09 Thread Bert Gunter
e(x) [1] 5 2 3 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Nov 9, 2017 at 3:44 PM, Allaisone 1 wrote: > Thank

Re: [R] update R version in windows

2017-11-10 Thread Bert Gunter
r you or what you want. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Nov 10, 2017 at 8:49 AM, Bond, Stephen wrote: &

Re: [R] Primer for working with survey data in R

2017-11-11 Thread Bert Gunter
Dunno. But ... 1. Web Search (eg on "Survey tutorials using R" and similar) 2. R's survey package, which includes vignettes. 3. CRAN Task View: https://cran.r-project.org/web/views/SocialSciences.html HTH. Cheers, Bert Bert Gunter "The trouble with having an open

Re: [R] Where to get support for Rserve?

2017-11-13 Thread Bert Gunter
?maintainer ## i.e. maintainer("rserve") Also, please search. A web search on simply "rserve" brought up what appeared to be many relevant hits. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking thin

Re: [R] error message for function: lmer (from lme4 package)

2017-11-14 Thread Bert Gunter
Still a complete mess! Post in **plain text**. This should be an option in your email software. Please seek local help if you cannot figure out how to do this. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it.&quo

[R] lapply and runif issue?

2017-11-14 Thread Bert Gunter
Could someone please explain the following? I did check bug reports, but did not recognize the issue there. I am reluctant to call it a bug, as it is much more likely my misunderstanding. Ergo my request for clarification: ## As expected: > lapply(1:3, rnorm, n = 3) [[1]] [1] 2.481575 1.998182 1.

Re: [R] lapply and runif issue?

2017-11-14 Thread Bert Gunter
able argument, which for runif(n=3, min, max) is the min argument, as you said. This is a subtlety (to me, anyway) of which I was unaware. Which is why I hesitated to call it a bug. It ain't! It is documented -- I just failed to read carefully enough. Cheers, Bert Bert Gunter "The tr

Re: [R] error message for function: lmer (from lme4 package)

2017-11-15 Thread Bert Gunter
what David already suggested and post to the r-sig-mixed-models list instead. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed,

Re: [R] Rasterize function with maximum in R

2017-11-15 Thread Bert Gunter
I believe you should post this on the r-sig-geo list, not here. You are much more likely to find the relevant expertise there. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

Re: [R] NEED HELP : Association in single DTM

2017-11-15 Thread Bert Gunter
: https://cran.r-project.org/web/views/NaturalLanguageProcessing.html Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Nov

Re: [R] Yield-to-Maturity problem

2017-11-16 Thread Bert Gunter
This list has a no homework policy. Also, please read the posting guidebelow to learn what sorts of posts are legitimate and how to post. Note: plain text , not html, which often gets mangked by the server. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people

Re: [R] Complicated analysis for huge databases

2017-11-17 Thread Bert Gunter
Or do it at one go using ?tapply and friends Bert On Nov 17, 2017 1:12 PM, "Boris Steipe" wrote: > Combine columns 1 and 2 into a column with a single ID like "33.55", > "44.66" and use split() on these IDs to break up your dataset. Iterate over > the list of data frames split() returns. > > >

Re: [R] Do I need to transform backtest returns before using pbo (probability of backtest overfitting) package functions?

2017-11-21 Thread Bert Gunter
Wrong list. Post on r-sig-finance instead. Cheers, Bert On Nov 20, 2017 11:25 PM, "Joe O" wrote: Hello, I'm trying to understand how to use the pbo package by looking at a vignette. I'm curious about a part of the vignette that creates simulated returns data. The package author transforms h

Re: [R] assign NA to rows by test on multiple columns of a data frame

2017-11-22 Thread Bert Gunter
Do you mean like this: mydf <- within(mydf, { is.na(A)<- !A_flag is.na(B)<- !B_flag } ) > mydf A A_flag B B_flag 1 8 10 5 12 2 NA 0 6 9 3 10 1 NA 0 4 NA 0 1 5 5 5 2 NA 0 Cheers, Bert Bert Gunter "

Re: [R] assign NA to rows by test on multiple columns of a data frame

2017-11-23 Thread Bert Gunter
es) mydf[, ] <- is.na(mydf[, chng[i]) <- !mydf[, choices[i]] > > moreover, and most of all, I was hoping for a compact solution because I > need to deal with MANY columns (more than 40) in data frame with the same > basic structure as the simplified example I posted > >

Re: [R] dplyr - add/expand rows

2017-11-26 Thread Bert Gunter
two 69 B 36 two 70 B 37 two 71 B 38 two 72 B 39 two 73 B 40 two 74 B 41 two 75 B 42 two 76 B 43 two 77 B 44 two 78 B 45 two 79 B 46 two 80 B 47 two 81 B 48

Re: [R] Repeated measures Tukey

2017-11-28 Thread Bert Gunter
This list is about R programming help, not statistics, although they do sometimes overlap. However, as this appears to be entirely a statistics issue, it really belongs on a statistics list like stats.stackexchange.com , not here. Cheers, Bert Bert Gunter "The trouble with having an open

Re: [R] dplyr - add/expand rows

2017-11-28 Thread Bert Gunter
Bill et al.: Yes, I see it now. Thank you for the correction. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Nov 28, 2017

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Bert Gunter
. Building software for large scale automated analysis of data required a much different analytical paradigm than the statistical consulting model, which is largely my background. No reply necessary. Just my opinion, which you are of course free to trash. Cheers, Bert Bert Gunter "The trouble with

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Bert Gunter
Oh Crap! I mistakenly replied onlist. PLEASE IGNORE -- these are only my ignorant opinions. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic str

Re: [R] Boundary_maps

2017-12-04 Thread Bert Gunter
See the CRAN Spatial task view: https://cran.r-project.org/web/views/Spatial.html for relevant packages (I think). Further queries should probably be directed to the r-sig-geo list, where the relevant expertise is more likely to be found. Cheers, Bert Bert Gunter "The trouble with havi

Re: [R] Dynamic reference, right-hand side of function

2017-12-04 Thread Bert Gunter
7 [3,]38 [4,]49 [5,]5 10 > is.vector(a) [1] FALSE > dim(a) <- NULL ## removes the 'dim' attribute > is.vector(a) [1] TRUE > a [1] 1 2 3 4 5 6 7 8 9 10 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people ke

Re: [R] warnings about factor levels dropped from predict.glm

2017-12-05 Thread Bert Gunter
machines. If so, ignore the above. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Dec 5, 2017 at 12:17 PM, Cade, Brian wrot

Re: [R] Coeficients estimation in a repeated measures linear model

2017-12-06 Thread Bert Gunter
lthough they do sometimes intersect). For the latter, try a statistics site like stats.stackexchange.com . 4. Finally, as always, consulting with a local statistical resource, if available, is always worth considering. HTH. Cheers, Bert Bert Gunter "The trouble with having an open mind

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Bert Gunter
obvious way to set an upper bound on a minimal x,y, and z, in which case a simple grid search could then be used. Naturally, if any real numbers are sought, Jeff is correct. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things in

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Bert Gunter
ome suggestions, but a web search would uncover many more, some of which might be more suitable for you: https://www.rstudio.com/online-learning/#R This list can help (not sure if I did here), but it cannot replace such homework on your own. Cheers, Bert Bert Gunter "The trouble with h

Re: [R] trying to find the multiple combinations...

2017-12-09 Thread Bert Gunter
Off topic, but for the record... As Jeff already noted,the equation reduces to a single linear equation with rational coefficients, so of course there are infinitely many integer solutions. Apologies for my dummheit. -- Bert On Fri, Dec 8, 2017 at 9:47 AM, Bert Gunter wrote: > Please k

Re: [R] Gaussian Process Classification R packages

2017-12-11 Thread Bert Gunter
Google it! "R Gaussian process model binary classification." Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) O

Re: [R] Gaussian Process Classification R packages

2017-12-11 Thread Bert Gunter
reason to respond in kind. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Dec 11, 2017 at 3:48 PM, Jeff Newmiller wro

Re: [R] inefficient for loop, is there a better way?

2017-12-12 Thread Bert Gunter
this should be fairly fast, but let us know if not. There may be other alternatives that might be faster. Assuming it does what you wanted, of course. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opu

Re: [R] Generating help files for a function

2017-12-16 Thread Bert Gunter
... and please note for the future and in case Ben's reply does not suffice that such queries should generally go to the r-package-devel mailing list. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it.&quo

Re: [R] Auto Data in the ISLR Package

2017-12-16 Thread Bert Gunter
I did not care to load the packages -- small reproducible examples are preferable, as the posting guide suggests. But, if I have understood correctly: See, e.g. ?subset Alternatively, you can read up on indexing data frames in any good basic R tutorial. Cheers, Bert Bert Gunter "The tr

Re: [R] Finding center of mass in a hydrologic time series

2017-12-18 Thread Bert Gunter
... and for the record: The apply() family of functions -- here sapply() -- are *not* vectorized. This means that one should not expect them to be necessarily more efficient than expicit for() loops. Their advantage for many is clarity of code. Cheers, Bert Bert Gunter "The trouble

Re: [R] develop.raw error ( adimpro )

2017-12-21 Thread Bert Gunter
If you do not receive a satisfactory reply here, contacting the package maintainer for such specific issues may be your next option. (S)he can be found by maintainer("adimpro") . Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming alo

Re: [R] plot representation of calculated value known to be 7.4

2017-12-25 Thread Bert Gunter
Note that ?all.equal clearly says that it tests for **approximate equality only** with tolerance "close to 1.5 e-8. So.. > all.equal(z,pH, tol = 1e-15) [1] "Mean relative difference: 6.732527e-11" and > print(pH, digits =15) ## output omitted Shows you what's going

Re: [R] plot representation of calculated value known to be 7.4

2017-12-26 Thread Bert Gunter
ets much more chancy with user-contributed packages, of course) it almost aways **is** all there. Cheers, Bert > > Troels > > > Den 26-12-2017 kl. 01:03 skrev Bert Gunter: > > Note that ?all.equal clearly says that it tests for **approximate equality > only** with tole

Re: [R] identifying convergence or non-convergence of mixed-effects regression model in lme4 from model output

2017-12-27 Thread Bert Gunter
This is more likely to get a helpful response if you post on the r-sig-mixed-models list rather than r-help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloo

Re: [R] Why aov() with Error() gives three strata?

2017-12-28 Thread Bert Gunter
to a statistics site like stats.stackexchange.com. 2.5. Or, if you can, the best idea might be to sit down with a local statistics expert. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] Defining interaction in random effects in lme4

2018-01-07 Thread Bert Gunter
Probably better to post this on the r-sig-mixed-models list. Cheers, Bert On Jan 7, 2018 12:20 PM, "Dominik Ćepulić" wrote: > Dear everybody! > > My fixed-effects-only model looks like this: glmer(Accuracy ~ C.RT*Group, > data = da) > > C.RT is the reaction time variable, and Group is a categ

Re: [R] UseDevel: version requires a more recent R

2018-01-09 Thread Bert Gunter
Obvious response: Post this on the Bioconductor support site, not here: https://support.bioconductor.org/ Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloo

Re: [R] Error installing ggplot2 package

2018-01-10 Thread Bert Gunter
nderstand your error message better than I and give you a more appropriate response. *Or through a suitable GUI interface that call install.packages(). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus

Re: [R] Help with packages (methods, stats, stats4)

2018-01-12 Thread Bert Gunter
ges are already installed. ?library tells you how to load them for use in your session. See also ?install.packages and links for how to download and install package from R package depositories, which mosty means CRAN. Cheers, Bert Bert Gunter "The trouble with having an open mind is tha

Re: [R] Help with packages (methods, stats, stats4)

2018-01-12 Thread Bert Gunter
, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jan 12, 2018 at 9:42 AM, imane hajar wrote: > Hello Mr Gunter , > i am sorr

Re: [R] glm$effects

2018-01-12 Thread Bert Gunter
See ?effects Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jan 12, 2018 at 10:44 AM, Cade, Brian wrote: > I

Re: [R] consolidate three function into one

2018-01-15 Thread Bert Gunter
ers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jan 15, 2018 at 9:57 AM, Ding, Yuan Chun wrote: > Hi Richard, > > T

Re: [R] consolidate three function into one

2018-01-15 Thread Bert Gunter
nction tutorials" and the like. You should certainly have a look at the "Introduction to R" tutorial that ships with R, since it's immediately available. It's a bit old, however. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people

Re: [R] About levene.test

2018-01-15 Thread Bert Gunter
For your and perhaps other's reference, the RStudio version has nothing to do with this. Rstudio is merely a a GUI IDE for R itself, and it's the R (or R package) version that matters. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming alo

Re: [R] Steps to create spatial plots

2018-01-15 Thread Bert Gunter
our intent/specifications. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jan 15, 2018 at 4:54 PM, lily li wrote: > Hi

Re: [R] Merging RData files

2018-01-16 Thread Bert Gunter
?load Read this carefully. Pay attention to its instructions re: overwriting existing objects. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County&quo

Re: [R] Help making first dataset R package

2018-01-17 Thread Bert Gunter
I think this would fit better on the r-package-devel list. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jan 17, 201

Re: [R] Assessing calibration of Cox model with time-dependent coefficients

2018-01-17 Thread Bert Gunter
often nonempty, so you may wish to wait to see whether someone here satisfactorily answers your query before posting on Cross Validated. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley B

Re: [R] how to search r-help?

2018-01-19 Thread Bert Gunter
Googling "r-help archive" (!!) brought up this: http://r.789695.n4.nabble.com/R-help-f789696.html -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "

Re: [R] Split charts with ggplot2, tidyquant

2018-01-20 Thread Bert Gunter
e ways. Lattice and ggplot incarnations take advantage of this, giving them more power and flexibility than the base graphics capabilities can muster. I repeat -- IMHO only! Feel free to disagree. I don't want to start any flame wars here. Cheers, Bert Bert Gunter "The trouble wi

Re: [R] what does the within component of varcomp (ape library) output indicate?

2018-01-22 Thread Bert Gunter
Probably not without knowing the structure of your data. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jan 22, 2018

Re: [R] Geometry delaunayn and deldir results, differing results from Octave due to decimal precision?

2018-01-24 Thread Bert Gunter
them. Caveat emptor. Only within the base R distribution, maintained and mostly written by the R Core team, might such consistency be reasonably expected. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." --

Re: [R] How to run mixed model with related independent variables

2018-01-26 Thread Bert Gunter
eers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jan 26, 2018 at 9:09 AM, Sariya, Sanjeev wrote: > I've data that lo

Re: [R] plm empty model error

2018-01-26 Thread Bert Gunter
**Please read **and follow** the posting guide linked below.** Your data attachment did not make it, as most non-text files are stripped by the mail server to avoid probems. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] variable names in lm formula ~.

2018-01-30 Thread Bert Gunter
~ x As always, correction appreciated if I'm wrong. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jan 30, 2018 at 6:

Re: [R] What is the default covariance structure in the glmmPQL function (MASS package)?

2018-01-31 Thread Bert Gunter
Suggestion: Post your query on the r-sig-mixed-models list, which is (obviously) focused on mixed models issues, and where you are likely to find both greater interest and expertise on such matters. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep c

Re: [R] Data Table Merge Help

2018-02-01 Thread Bert Gunter
ernatively, there is a merge.data.frame function that may do the job if you first convert your data.table to a data.frame. As I do not use the data.table package, you or others may have to fill in details to make these work -- if they *can* work. Cheers, Bert Bert Gunter "The trouble with

Re: [R] copy/paste of large amount of code to terminal leads to scrambled/missing characters

2018-02-03 Thread Bert Gunter
Obvious suggestion: use a more capable IDE instead of Textmate2 with copy/paste. RStudio is very popular now, but there are many others . Search on e.g. "R IDE For MAC" to see some alternatives. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people ke

Re: [R] Package sgd

2018-02-05 Thread Bert Gunter
1. It might help if you could state more specifically what you want to do. 2. Maybe check here if you haven't already done so: https://cran.r-project.org/web/views/ Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking thin

Re: [R] Package sgd

2018-02-05 Thread Bert Gunter
A web search on "gradient descent R" also brought up a bunch of stuff. Is any of this what you want? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "

Re: [R] plotting the regression coefficients

2018-02-08 Thread Bert Gunter
Fwiw, encoding magnitude in color is generally a bad idea. Using area(*not* radius) is also not great, but maybe it will work for you. See here for some explanation: https://www.amazon.com/Visual-Display-Quantitative-Information/dp/0961392142/ref=sr_1_1?s=books&ie=UTF8&qid=1518092778&sr=1-1&keywor

Re: [R] Hausman test

2018-02-11 Thread Bert Gunter
Note the typo in your 3rd line: data < Don't know if this means anything... Bert On Feb 11, 2018 7:33 AM, "PAOLO PILI" wrote: > Hello, > > I have a problem with Hausman test. I am performing my analysis with these > commands: > > > library(plm) > > data<-read.csv2("paolo.csv",header=TRUE) >

Re: [R] Suppress horizontal mean line in beanplot()

2018-02-13 Thread Bert Gunter
The package docs seem to provide your answer -- you just need to read them more carefully: See the "what" argument of ?beanplot. Setting the first entry of the vector to 0 would seem to suppress the overall mean. Apologies if I've misread/misinterpreted. Cheers, Bert Bert Gunte

Re: [R] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
In what packages? -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa wrote: > Is the

Re: [R] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
Always cc the list unless there is good reason to keep your reply private. There is no LSmeans() function in the lsmeans package. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley B

Re: [R] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
A cursory reading indicates that they are identical; but others more knowledgeable than I need to confirm or deny this. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his &qu

Re: [R] using cat to log to file with sapply

2018-02-14 Thread Bert Gunter
und by getwd() ), maybe you have write permissions issues. Note also that you may need none of this: see ?sink Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloo

Re: [R] Codes to conduct network meta-analysis, gemtc package

2018-02-15 Thread Bert Gunter
This is not a free consulting service. You are expected to put in the work yourself and **may** receive help here if you have specific questions that you need help with when you do so. See the posting guide linked below for details. Cheers, Bert Bert Gunter "The trouble with having an

Re: [R] package MonteCarlo error: object 'packages' not found

2018-02-15 Thread Bert Gunter
This looks like the sort of thing that you should ask the package maintainer (?maintainer). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" c

Re: [R] SE for all levels (including reference) of a factor atfer a GLM

2018-02-15 Thread Bert Gunter
This is really a statistical issue. What do you think the Intercept term represents? See ?contrasts. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Coun

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Bert Gunter
?pmax Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 20, 2018 at 6:55 AM, Miluji Sb wrote: > Dear all, >

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Bert Gunter
Don't do this (sorry Thierry)! max() already does this -- see ?max > x <- data.frame(a =rnorm(10), b = rnorm(10)) > max(x) [1] 1.799644 > max(sapply(x,max)) [1] 1.799644 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along an

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Bert Gunter
these is what you want, all your code is nonsense. Of course you can change the indexing to march through the data frame in whatever way you like. If this is not what you want, maybe someone wiser than I can interpret your query. Cheers, Bert Bert Gunter "The trouble with having an open mi

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Bert Gunter
1,r2) [1] FALSE > system.time(r2 <- apply(x,1,max)) user system elapsed 2.162 0.045 2.207 ## 150 times slower! > identical(r1,r2) [1] TRUE pmax() is there for a reason. Or is there something I am missing? Cheers, Bert Bert Gunter "The trouble with having an open mind is that

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Bert Gunter
Sorry, previous code should be: > x <- data.frame(matrix(runif(12e6), ncol=12)) > system.time(r1 <- do.call(pmax,x)) user system elapsed 0.049 0.000 0.049 > system.time(r2 <- apply(x,1,max)) user system elapsed 2.162 0.045 2.207 > identical(r1,r2) [1] TR

  1   2   3   4   5   6   7   8   9   10   >