Your code seems to be attempting to modify global variables from within
functions... R purposely makes this hard to do. Don't fight it. Instead,
use function arguments and produce function outputs with your functions.
Also, the ifelse function does not control flow of execution of code... it
s
Hello,
It is just a guess but I bet that what the OP means is
f <- function(x) {
2 + x^2 - x^3
}
uniroot(f, lower = 1, upper = 2)
To the OP: please learn how to write math in R *before* trying to solve
problems.
Hope this helps,
Rui Barradas
Às 16:07 de 02/02/2019, Berend Hasselman e
Thanks lots Jeff, very clear explanation.
Yes, I think I will stick with the POSIXt family of functions.
On Sat, Feb 2, 2019 at 1:33 PM Jeff Newmiller
wrote:
> If there are no time-of-day values in your data set the the Date type is
> great. However, it can be messy if you work with both Date a
Also, I was able to extract date using
> as.Date(dat, "%m/%d/%y")
[1] "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12"
[6] "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12"
[11] "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12" "2015-07-12"
[16] "2015-07-12" "2015
Thank you all very much, very helpful! :)
I'm just curious, what does strptime(), strftime(), as.POSIXlt.(), and
as.POSIXct() stand for?
On Sat, Feb 2, 2019 at 10:41 AM Jeff Newmiller
wrote:
> ... and in general, you need to specify the time zone to avoid surprises.
> In many cases this can be
5 matches
Mail list logo