Re: [R] Fw: inconsistency in nls output....

2019-03-06 Thread akshay kulkarni
dear JN, Thanks for the reply. I will consider using the nlsr package. But for now I make did with reducing the exponent. It is working for me. very many thanks for your time and effort yours sincerely, AKSHAY M KULKARNI From: J C Nash Sent:

Re: [R] strucchange Graph By Week and xts error

2019-03-06 Thread Achim Zeileis
On Thu, 7 Mar 2019, Sparks, John wrote: Thanks to Achim's direction I now have a re-producible example. The code below creates a ts object. The x scale of the last graph runs from 0 to 700. Yes, and hence breakpoints() re-uses that scaling. As I wrote in my previous mail you either have to

Re: [R] strucchange Graph By Week and xts error

2019-03-06 Thread Sparks, John
Thanks to Achim's direction I now have a re-producible example. The code below creates a ts object. The x scale of the last graph runs from 0 to 700. So just need a way to get that scale to show the weeks (or some summary of them). Thanks a bunch. --JJS library(strucchange) library(xts) lib

Re: [R] strucchange Graph By Week and xts error

2019-03-06 Thread Achim Zeileis
On Thu, 7 Mar 2019, Sparks, John wrote: Hi R Helpers, I am doing some work at identifying change points in time series data. A very nice example is given in the R Bloggers post https://www.r-bloggers.com/a-look-at-strucchange-and-segmented/ The data for the aswan dam in that example is year

Re: [R] strucchange Graph By Week and xts error

2019-03-06 Thread Jim Lemon
Hi John, You seem to have 1569 days of data, so perhaps you can get around your axis problem like this: plot(Nile,xaxt="n",xlab="Week") ... axis(1,at=seq(0,200,50),labels=seq(0,200,50)*7) (untested) Jim On Thu, Mar 7, 2019 at 10:46 AM Sparks, John wrote: > > Hi R Helpers, > > I am doing some wo

Re: [R] Unable to install ggplot2

2019-03-06 Thread Hadley Wickham
rlang works with R 3.1 and up, but it does require compilation from source, which I suspect is the root cause of this problem. Hadley On Wed, Mar 6, 2019 at 5:36 PM peter dalgaard wrote: > > Also, R seems to be version 3.2.x i.e. 3-4 years old. Earliest rlang is anno > 2017 as far as I can tell

[R] strucchange Graph By Week and xts error

2019-03-06 Thread Sparks, John
Hi R Helpers, I am doing some work at identifying change points in time series data. A very nice example is given in the R Bloggers post https://www.r-bloggers.com/a-look-at-strucchange-and-segmented/ The data for the aswan dam in that example is yearly. My data is weekly. I ran the code sw

Re: [R] Unable to install ggplot2

2019-03-06 Thread peter dalgaard
Also, R seems to be version 3.2.x i.e. 3-4 years old. Earliest rlang is anno 2017 as far as I can tell. -pd > On 6 Mar 2019, at 19:22 , Norberto Hernandez > wrote: > > I have the same issue with ggplot2 and the rlang package, you need to > have the most updated version of the rlang library in

Re: [R] Zoom In/Out maps library

2019-03-06 Thread Roy Mendelssohn - NOAA Federal via R-help
Also, I forgot that tmap can do interactive maps, see: https://geocompr.robinlovelace.net/adv-map.html#interactive-maps -Roy > On Mar 6, 2019, at 2:48 PM, Roy Mendelssohn - NOAA Federal > wrote: > > see https://r-spatial.github.io/mapview/index.html > > The main thing is the data types that

Re: [R] Zoom In/Out maps library

2019-03-06 Thread Roy Mendelssohn - NOAA Federal via R-help
see https://r-spatial.github.io/mapview/index.html The main thing is the data types that map view supports, so you must have a raster or an spatial object like an "sf" object. So points would have to also be an sf object and the two combined (sf has commands to do this) or perhaps you can d

Re: [R] Zoom In/Out maps library

2019-03-06 Thread reichmanj
Roy Thank you - that's helpful. Going to have to read up on sf and mapview library. Those are new ones. Then to add a point feature layer (lat/long) where would I insert that? Library(maps) Library(sf) # simple features Library(mapview) world.map <- maps::map("world", plot = FALSE, fill = TRUE

Re: [R] Zoom In/Out maps library

2019-03-06 Thread Roy Mendelssohn - NOAA Federal via R-help
Or if you prefer plotly: world.map <- maps::map("world", plot = FALSE, fill = TRUE) p <- sf:: st_as_sf(world.map, coords = c('x', 'y')) plotly::ggplotly( ggplot2::ggplot(data = p) + ggplot2::geom_sf() ) > On Mar 6, 2019, at 2:12 PM, Roy Mendelssohn - NOAA Federal > wrote: > > world.map <- maps

Re: [R] Zoom In/Out maps library

2019-03-06 Thread Roy Mendelssohn - NOAA Federal via R-help
world.map <- maps::map("world", plot = FALSE, fill = TRUE) p <- sf:: st_as_sf(world.map, coords = c('x', 'y')) map view::map view(p) HTH, -Roy > On Mar 6, 2019, at 2:10 PM, rmendelss gmail wrote: > > world.map <- maps::map("world", plot = FALSE, fill = TRUE) > p <- sf:: st_as_sf(world.map, coo

[R] Zoom In/Out maps library

2019-03-06 Thread reichmanj
R Help Anyone know if I can add a zoom In/Out function to the maps available via the "maps" library? Or do I need to use a different mapping library? world.map <- map_data("world") ggplot(data = world.map) + geom_polygon(mapping = aes(x=long, y=lat, group=group)) Jeff __

Re: [R] Unable to install ggplot2

2019-03-06 Thread Norberto Hernandez
I have the same issue with ggplot2 and the rlang package, you need to have the most updated version of the rlang library in order to get installed ggplot2 Regards Norberto El mar., 5 mar. 2019 a las 14:24, Jeff Newmiller () escribió: > > Please post the text version of the error in the future...

Re: [R] Fw: inconsistency in nls output....

2019-03-06 Thread J C Nash
nls() is a Model T Ford trying to drive on the Interstate. The code is quite old and uses approximations that work well when the user provides a reasonable problem, but in cases where there are mixed large and small numbers like yours could get into trouble. Duncan Murdoch and I prepared the nlsr

Re: [R] Benjamini-Hochberg (BH) Q value (false discovery rate)

2019-03-06 Thread David L Carlson
R is open source so you can look at the code. In this case just typing the function name gets it: > p.adjust function (p, method = p.adjust.methods, n = length(p)) { method <- match.arg(method) if (method == "fdr") method <- "BH" . . . . . Stuff deleted . . . . # The code

[R] Benjamini-Hochberg (BH) Q value (false discovery rate)

2019-03-06 Thread David Bars
Dear everybody, I'm using stats package (version 3.5.2) and in detail their p.adjust() function in order to control the false discovery rate in multiple comparisons. In particular I used the Benjamini-Hochberg method. Nevertheless, the help of the stats package indicates that the adjusting metho