This question is missing pieces... the example is incomplete.
--
Sent from my phone. Please excuse my brevity.
On September 15, 2016 9:35:45 PM PDT, Manohar Reddy
wrote:
>Hi ,
>
>
>
>I have data something looks like below (or PFA), but when I’m
>extracting
>month using *strftime* function th
Hi ,
I have data something looks like below (or PFA), but when I’m extracting
month using *strftime* function through *sqldf* library ,it’s returning
below results but it’s not returning exact results ,it supposed to return
05,05,05,06,06,06.Can anyone please guide me how to do that with *s
Do not set the upper (or lower) triangle to NA. Simply supply the full
matrix to pheatmap. I am not an expert on pheatmap but looking at the
manual you should supply clustering_distance_rows = "none",
clustering_distance_cols = "none" or something like that to make
pheatmap interpret the matrix as
Hi all,
I have a distance matrix (symmetric) which looks somewhat like this (only a
small portion shown)
ENSG0101413 ENSG0176884 ENSG0185532 ENSG0106829
ENSG0101413 1.000 1.000 1.000 1.000
ENSG0176884 0.328
Does the data contain non-positive values?
> out <- mixtools::gammamixEM(as.numeric(0:100), lambda = c(1, 1, 1)/3,
verb = TRUE)
iteration = 1 log-lik diff = NaN log-lik = NaN
Error in while (diff > epsilon && iter < maxit) { :
missing value where TRUE/FALSE needed
Bill Dunlap
TIBCO Software
I am using a function gammamixEM where it does it by default. I do not have
the option to change it.
Conceptually, what can make the algorithm not able to calculate likelihood
value at all (and hence log-lik=Nan)? Is there sth wrong with the data?
Under what conditions does it happen?
On Wed, Sep
> On Sep 15, 2016, at 1:32 PM, David Winsemius wrote:
>
>
>> On Sep 15, 2016, at 12:59 PM, Cade, Brian wrote:
>>
>> Does anyone know how to change the box type in Hmisc package function
>> xYplot. I want only the left and bottom axes drawn, similar to what I
>> would accomplish with bty="l"
You are ignoring the warning issued when you load plyr after dplyr and then
complaining. Simply reversing the sequence of library statements is sufficient
to fix your example.
I agree that it is not ideal and that using just one at a time is easier, but
you can use both, and for now a lot of pa
No even in xyplot() the scales argument is not eliminating plotting of the
top and right graph axes. It is not the scale of the axes I want
eliminated but the actual lines. But thank you for trying.
Brian
Brian S. Cade, PhD
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave.,
I do not know about xYplot, but the "scales" argument controls axes in
xyplot. For example:
scales = list(alternating = 1)
would draw axes on left/bottom ... see ?xyplot for details and subtleties.
Again, might not work for xYplot.
Cheers,
Bert
Bert Gunter
"The trouble with having an open min
> On Sep 15, 2016, at 12:59 PM, Cade, Brian wrote:
>
> Does anyone know how to change the box type in Hmisc package function
> xYplot. I want only the left and bottom axes drawn, similar to what I
> would accomplish with bty="l" argument in plot() function. bty= argument
> did not do anything
I never realised that nonsense results don’n bother experienced users…..
Probably I am not experienced wiith my 6years of R professional work.
I think your advise is incomplete: a %>% dplyr::group_by(groep) %>%
dplyr::summarise(m=mean(v),n=dplyr::n())
Gives the same problems and makes the line ug
On Thu, Sep 15, 2016 at 10:28 PM, William Dunlap wrote:
> The most reliable way to split such lines is with parse(text=x).
> Regular expressions don't do well with context-free grammars.
>
Oh, that's right of course.
> as.character(parse(text = x))
[1] "foo <- \"3;4\"""bar <-
Does anyone know how to change the box type in Hmisc package function
xYplot. I want only the left and bottom axes drawn, similar to what I
would accomplish with bty="l" argument in plot() function. bty= argument
did not do anything for me in xYplot().
Brian
Brian S. Cade, PhD
U. S. Geological
The incorrect results are unfortunate and can trip up the inexperienced user,
but this problem is straightforward to resolve if you explicitly specify which
versions of the conflicting functions to use. The more interesting question I
saw was whether the intent is to deprecate plyr, but so far t
The most reliable way to split such lines is with parse(text=x).
Regular expressions don't do well with context-free grammars.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Sep 15, 2016 at 12:08 PM, Adrian Dușa wrote:
> Dear R-helpers,
>
> When parsing a text, I would like to separate co
I am a beginner user of R.
I am writing the master thesis using a data frame from a national survey.
The data frame contains several variables, one of which contains the survey
weights.
I need to apply the survey weights to the data frame, in order to use the
data frame with the plm package (I ne
Dear R-helpers,
When parsing a text, I would like to separate commands written on the same
line, by a semicolon.
Something like:
x <- "foo <- '3;4'; bar <- \"don't ; use semicolons\""
Ideally, that would translate to these two commands in a character vector
of length 2:
foo <- '3;4'
bar <- "don'
Thank you Frans. This is exactly the sort of nuance that I want to learn
about.
--Chris
Frans Marcelissen wrote:
Hello Christopher and others
:
What cannot be stressed enough is: do not combine both packages, it
gives errors and incorrect results! I will show that below
---
Hello Christopher and others
:
What cannot be stressed enough is: do not combine both packages, it gives
errors and incorrect results! I will show that below
a<-data.frame(groep=1:4,v=1:40)
library(dplyr)
a %>% group_by(groep) %>% summarise(m
Thanks for the reproducible example.
Using regular expressions:
sub(".*HS_(.).*", "\\1", dimInfo[grep("HS_",dimInfo)])
The grep() gets just the indices that contain "HS_" and the sub()
picks up the character you want from the subvector indexed by them and
replaces everything with it.
Cheers,
Be
Hello,
What about the following?
ff <- dimInfo[grep('HS', dimInfo)]
sub("^.*HS_([[:alnum:]]).*$", "\\1", ff)
Hope this helps,
Rui Barradas
Citando Doran, Harold :
I have produced a terribly inefficient piece of codes. In the end,
it gives exactly what I need, but clumsily steps through m
Base:
Filter(Negate(is.na), sapply(regmatches(dimInfo, regexec("HS_(.{1})",
dimInfo)), "[", 2))
Modernverse:
library(stringi)
library(purrr)
stri_match_first_regex(dimInfo, "HS_(.{1})")[,2] %>%
discard(is.na)
They both use capture groups to find the matches and return ju
I have produced a terribly inefficient piece of codes. In the end, it gives
exactly what I need, but clumsily steps through multiple steps which I'm sure
could be more efficiently reduced.
Below is a reproducible example. What I have to begin with is character vector,
dimInfo. What I want to do
I see no reason to bother Hadley in the age of google.
Search on "dplyr versus plyr" and read what you get! (on the first hit, even)
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
Hello,
Maybe you should ask the maintainer of both packages.
maintainer("plyr")
[1] "Hadley Wickham "
maintainer("dplyr")
[1] "Hadley Wickham "
Hope this helps,
Rui Barradas
Citando Christopher W Ryan :
I've set myself the task of learning about these packages, and about
tidy data con
I've set myself the task of learning about these packages, and about
tidy data concepts.
What is the relationship between plyr and dplyr? Does the latter
replace the former (meaning I can concentrate on learning the latter)?
Or is there ever a need to use functions from both (meaning I should
lea
On 15/09/16 14:04, S Ellison wrote:
If you want
to add variable to data.frame you have to use attach, detach. Right?
I'd have said "not at all", not "not quite". attach and detach have
almost exactly nothing to do with adding to a data frame. You can add
to a data frame using dfrm$newvar <-
>If you want
> to add variable to data.frame you have to use attach, detach. Right?
I'd have said "not at all", not "not quite". attach and detach have almost
exactly nothing to do with adding to a data frame.
You can add to a data frame using
dfrm$newvar <-
dfrm['newvar'] <-
cbind(dfrm,
29 matches
Mail list logo