Here are 2 solutions to you problem:
If you only want to use one color (for possibly many arrows),
this will work:
ggplot()+geom_segment(mapping = aes(x = as.Date(test[,"date"]),
y =y1,
xend = as.Date(test[,"date"]),
Hi,
I have a dataset "test". I try to produce a "green" arrow but it gives a
"red" arrow (as attached). Could someone tell me how I can fix it? Thanks,
> test
dateco y1 y2
5 2011-11-28 green 196.6559 1.600267
> dput(test)
structure(list(date = structure(15306, class = "
You should report the issue to the author/maintainer of the mixtools
package. gammamixEM can get into this situation when the data is not an
obvious mixture so it has a hard time coming up with a good starting point
for the coefficient estimates. E.g.,
> out <- mixtools::gammamixEM(rep(c(0.0001,
Data has no negative values. Values range from 0.001 to 1.01.
Following is the summary, in case that helps:
Min. 1st Qu. MedianMean 3rd Qu.Max.
0.0010 0.8126 0.8536 0.8464 0. 1.0180
SD: 0.07489977
Any clue?
On Thu, Sep 15, 2016 at 10:32 PM, William Dunlap wrote:
> Does t
1. Convert the date from R's origin to the origin used by SQLite's
strftime function and then be sure you are using the correct SQLite
strftime syntax:
library(sqldf)
sqldf("select strftime('%m', Date + 2440588.5) month from log")
2. Alternately use the H2 backend which actually supports
Yes, some of my info was outdated and misleading. :)
However, after I RTFM [1] it becomes clear that the strftime function
being invoked in the SQL statement has completely different parameters
(both ordering and interpretation) and behavior than the strftime function
in R, and that is the pri
First of all I would like to say thanks to everyone for sharing valuable
information, now I can able to do that if date column datatype is “Factor”
but by default the date column datatype is “POSIXct” in R ,so whenever I
want apply stfrtime function with sqldf package ,do I need to convert the
date
On 16 Sep 2016, at 15:23 , PIKAL Petr wrote:
> Hi Peter
>
> The devil is in detail
>
> Data from OP had different format and was transferred to Date object by
> as.Date, which results in incorrect values (and NA if not transferred)
> df <- data.frame(Date =
> c("2013/05/25","2013/05/28","201
Hi
you can follow logic of functions by using debug and see how they operate by
inspecting objects evaluated within functions.
See
?debug
However it seems to me that your functions are quite complicated. If I
understand correctly, they compute minimum value of upper part of matrix. If I
am co
To be precise it's SQLite that does not have date and time data types.
If you use an sqldf backend such as H2 that does have such types then
sqldf will pass them as such. In the case of R's "Date" class such
objects are passed to SQLite as numbers since that is what SQLite can
understand but they
> I am unable to understand the line in red code
Colour does not survive plain text transmission; try adding comments (# ...)
instead, or state which line of code you do not understand.
In the mean time you could take a look, first, as
?cbind
?apply
?'['
with particular attention to the meani
SQLite only understands certain fundamental data types, and neither Date nor
POSIXct types are among them. They get stored as their internal numeric
representations.
The internal numeric representations of Date and POSIXct are incompatible. You
are sending Dates to SQLite and trying to then in
Hi,
Good Morning! I am new to R and finding difficulty in understanding the code.
Since few days I am stuck at single line of code which I am unable to
understand.
Though there may be number of logics to find min value. As a new beginner I am
following a book and as it has the following code
mi
Hi Peter
The devil is in detail
Data from OP had different format and was transferred to Date object by
as.Date, which results in incorrect values (and NA if not transferred)
df <- data.frame(Date =
c("2013/05/25","2013/05/28","2013/05/31","2013/06/01","2013/06/02",
"2013/06/05","2013/06/07"),
Presumably, sqldf does not know about Date object so passes an integer that
gets interpreted as who knows what...
This seems to work:
> df <- data.frame(date=as.character(Sys.Date()+seq(0,180,,10)))
> cbind(df, sqldf("select strftime( '%m', date) from df"))
date strftime( '%m', date)
1
Hi
Most probably there is some syntactic suger how to correctly formulate sql
query.
> sqldf('select Date, strftime("Date", "%m") from log')
Date strftime("Date", "%m")
1 2013-05-25
2 2013-05-28
3 2013-05-31
4 2013-06-01
I do want to cluster it and only plot the lower half of the matrix.
From: Peter Langfelder
Sent: Thursday, September 15, 2016 11:33:13 PM
To: Khan, Saad M. (MU-Student)
Cc: r-help@R-project.org
Subject: Re: [R] Visualizing and clustering one half of a symmetric
Hi Petr,
Thanks, For me also it’s working fine when I directly used that function
but when I call strftime function through sqldf package it’s returning NA
values (PFA) ,but my requirement is I need to do that only sqldf as I’m
writing some “T sql ” queries against on the dataset.
Manu.
On
Hi
Pls, keep conversation on list, you can get answer from others, more capable
than myself in survey analysis. As I said I am not an expert in this task but
you seem to seek some statistical help. For this maybe stackexchange can be
more appropriate.
If you want some help here, you should pre
Hi
Hm
> format(log$Date, "%m")
[1] "05" "05" "05" "06" "06" "06" "06"
> strftime(log$Date, "%m")
[1] "05" "05" "05" "06" "06" "06" "06"
>
works for me.
Just a blind guess, is an object date somwhere in your environment?
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-bo
Jeff,
Thanks,my question is when I’m using strftime function in sqldf package
it’s not returning the results which has supposed to return ,now how can I
get the excat month from my sample data with strftime function through
sqldf package ?
Manu.
On Fri, Sep 16, 2016 at 11:32 AM, Jeff Newmi
Hi
I do not know much about plm but your request seems to me pretty cryptic,
probably even for knowledgeable person.
There is no weight argument in plm call so I wonder how do you want to "weight
data frame".
The only weighting scheme for data frame I can imagine is to repeat rows
somehow acc
22 matches
Mail list logo