?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.
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:
&
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
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
, 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
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
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
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 &
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
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.
>>
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
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
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
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
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
. 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
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
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
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
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
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,
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
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
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:
&
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
?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
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
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.
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
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,
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
:
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
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
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.
>
>
>
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
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
"
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
>
>
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
... 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
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
... 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
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
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
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
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
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
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
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
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
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
,
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
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
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
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
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
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
?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
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
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
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 "
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
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
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."
--
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
**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
~ 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:
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
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
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
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
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 "
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
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)
>
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
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
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
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
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
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
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
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
?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,
>
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
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
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
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 - 100 of 5180 matches
Mail list logo