Re: [R] [FORGED] (no subject)

2019-02-02 Thread Rolf Turner
On 2/2/19 12:41 AM, malika yassa via R-help wrote: Please, can you help me I have a equation to solve by newton method but I can not do it for example f<-function(x) { 2+X2-X3=0} this equation have un solution in [1,2] is there a function in R for solve it or i have to programme it (a)

Re: [R] load.wave

2019-02-02 Thread Ivan Krylov
Hello Nick Wray, Let me offer a simplified explanation of what's going on. Sorry if it's unnecessary. Sound is waves of pressure in the air. Devices like microphones can measure the changing pressure by converting it into voltage. Voltage can then be sampled by an analog-to-digital converter

Re: [R] load.wave

2019-02-02 Thread Jeff Newmiller
You aren't pushing any envelope... you slit it open and fell out somewhere on the sidewalk. I tossed your question into Google and it came back with [1] and [2]. Please do that yourself instead whenever you are tempted to go off topic. [1]

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread Jeff Newmiller
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 and POSIXt types in the same analysis... I recommend sticking with one or the other. The trunc.POSIXt function is more appropriate for getting POSIXt dates than

Re: [R] [FORGED] Newbie Question on R versus Matlab/Octave versus C

2019-02-02 Thread Alan Feuerbacher
On 1/29/2019 11:50 PM, Jeff Newmiller wrote: On Tue, 29 Jan 2019, Alan Feuerbacher wrote: After my failed attempt at using Octave, I realized that most likely the main contributing factor was that I was not able to figure out an efficient data structure to model one person. But C lent itself

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread Jeff Newmiller
strptime = string parse time (convert from string to POSIXlt, name of function as specified in POSIX standard) strftime = string format time (make string, name of function as specified in POSIX standard) as.POSIXlt = convert to POSIX list time format (same as strptime but name fits type

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread Jeff Newmiller
... and in general, you need to specify the time zone to avoid surprises. In many cases this can be as simple as Sys.setenv(TZ="GMT") but it can be specific to your data set also. On February 2, 2019 7:09:46 AM PST, Duncan Murdoch wrote: >On 01/02/2019 10:45 p.m., C W wrote: >> Dear R

Re: [R] (no subject)

2019-02-02 Thread Berend Hasselman
> On 1 Feb 2019, at 12:41, malika yassa via R-help wrote: > > Please, can you help me I have a equation to solve by newton method but I can > not do it > for example > > f<-function(x) { > > > 2+X2-X3=0} > this equation have un solution in [1,2] > is there a function in R for solve it or

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread William Dunlap via R-help
Note that the first unparsable element is the first with a 13 in the second field, which is out of range for the month entry. If you look at the the whole date/time output by the first 19 elements you will see that you need to tell it the order of the year, month, and day > as.POSIXlt(dat[1:19])

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread Duncan Murdoch
On 01/02/2019 10:45 p.m., C W wrote: Dear R community, I am working with dates. And I get the following error: strftime(dat[20], format="%H:%M") Error in as.POSIXlt.character(as.character(x), ...) : character string is not in a standard unambiguous format You are using the wrong

Re: [R] (no subject)

2019-02-02 Thread Hasan Diwan
Look at the rootSolve package[1] for what you need. Hope it helps... -- H On Sat, 2 Feb 2019 at 06:46, malika yassa via R-help wrote: > Please, can you help me I have a equation to solve by newton method but I > can not do it > for example > > f<-function(x) { > > > 2+X2-X3=0} > this equation

[R] (no subject)

2019-02-02 Thread malika yassa via R-help
Please, can you help me I have a equation to solve by newton method but I can not do it for example f<-function(x) { 2+X2-X3=0} this equation have un solution in [1,2] is there a function in R for solve it or i have to programme it [[alternative HTML version deleted]]

[R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-02 Thread C W
Dear R community, I am working with dates. And I get the following error: > strftime(dat[20], format="%H:%M") Error in as.POSIXlt.character(as.character(x), ...) : character string is not in a standard unambiguous format Here's the original data: dat <- structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L,

[R] load.wave

2019-02-02 Thread Nick Wray via R-help
I have been given a wav file of train locomotive noise - literally something you can play back and hear. Using the audio package and the load.wave function I have got a 1.5 million element vector which visually at least has some periodicity in certain parts and does not seem to be completely

[R] How to fix offset warning running a GAM in R's MGCV package?

2019-02-02 Thread lauren fidler
Dear all, I am trying to run a GAM using MGCV. When I include offset: gam1 <- gam(Presence~s(Spd)+offset(effort_m), family=binomial, data=porp) I receive the following warning: Warning messages: 1: In newton(lsp = lsp, X = G$X, y = G$y, Eb = G$Eb, UrS = G$UrS, L = G$L, : Fitting terminated