Re: [R] Need help testing a problem

2024-02-01 Thread Roy Mendelssohn - NOAA Federal via R-help
on possible cause. -Roy > On Feb 1, 2024, at 2:16 AM, Rui Barradas wrote: > > Às 23:47 de 31/01/2024, Roy Mendelssohn - NOAA Federal via R-help escreveu: >> HI All: >> We are trying to figure out a problem that is occurring with a package, and >> we need a non

[R] Need help testing a problem

2024-01-31 Thread Roy Mendelssohn - NOAA Federal via R-help
HI All: We are trying to figure out a problem that is occurring with a package, and we need a non-NOAA person with a Windows computer with the latest R to test for us what is failing (but works on Macs and Linux from different sites). Part of the problem is there is an Akamai service in

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2023-12-29 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Andy: I don’t have an answer but I do have what I hope is some friendly advice. Generally the more information you can provide, the more likely you will get help that is useful. In your case you say that you tried several packages and they didn’t do what you wanted. Providing that code,

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Roy Mendelssohn - NOAA Federal via R-help
what if you try lubridate::as_datetime('2017-02-28T13:35:00+03:00’) -Roy > On Nov 5, 2023, at 3:45 PM, Richard O'Keefe wrote: > > I have some data that includes timestamps like this: > 2017-02-28T13:35:00+03:00 > The documentation for strptime says that %z expects > an offset like 0300. I

Re: [R] aniMoutm/foiegras Assistance

2023-01-29 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Zac: Two suggestions. In the map statement, set silent = FALSE, hopefully that will give you more info, The second is to try what is suggested in the error message, " Try simplifying the model with the following argument: map = list(rho_o = factor(NA))". I don't know what rho_o does,

Re: [R] categorizing data

2022-05-29 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Janet: here is a start to give you the idea, now you need loop either use a "for" or one of the apply functions. 1. Preallocate new data (i am lazy so it is array, for example of size three. 2. order the data and set values. junk <- array(0, dim = c(2,3)) values <- c(10, 30, 50)

Re: [R] Extract data from .nc file

2021-02-24 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Shailendra: You didn't provide the error messages you received, which makes it difficult to answer. I will say here is at least one typo, in: > write.csv(amo_final, "soi.csv", row.names = FALSE) You have only defined "soi_final". But I would also be surprised if either of the "cbind()"

Re: [R] How to understand the mentality behind tidyverse and ggplot2?

2020-11-18 Thread Roy Mendelssohn - NOAA Federal via R-help
Personally I liked two workshops Thomas Lin Pedersen gave: https://www.youtube.com/watch?v=h29g21z0a68 https://www.youtube.com/watch?v=0m4yywqNPVY=5219s -Roy > On Nov 18, 2020, at 3:24 PM, John via R-help wrote: > > On Tue, 17 Nov 2020 12:43:21 -0500 > C W wrote: > >> Dear R list, >> >> I

Re: [R] NOAA .grb2 files

2020-09-04 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Philip: It would help if you gave the complete script you are trying to run, and the name of the file. for those unfamiliar with all this, Philip has already downloaded the grib2 file, either using rNOMADS or directly from the NOAA website, and the function he is calling reads the

Re: [R] Solving derivates, getting the minimum of a function, and helpful documentation of the deriv function

2020-08-29 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi John: Can I ask if this is the specific problem you are after, or a test for more general problem? If the former, the derivative is -0.0263 + 0.002 * B so the solution for B is: B = (0263)/0.002 If you are after a more general way fo doing this: ?solve -Roy > On Aug 29, 2020, at

Re: [R] Best settings for RStudio video recording?

2020-08-16 Thread Roy Mendelssohn - NOAA Federal via R-help
May I suggest that this discussion is best left for another time and place. Some people have very strong opinions about RStudio vis a vis R, it has been discussed here before, shedding mostly heat and not a lot of light (nor do I think anyone had their mind changed), and worse the

Re: [R] rNOMAD package

2020-08-13 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Philip: Both 'ncdf4' and 'Rnetcdf' should be able to download data using OPeNDAP. That the package is using OPeNDAP is transparent to the user, other than the fact that the "file" is an URL. Extracts are just like reading a netCDF file using these packages, so you may have to spend

Re: [R] optim with upper and lower bounds

2020-08-11 Thread Roy Mendelssohn - NOAA Federal via R-help
imx::optimr is often a very good drop-in replacement for optim, >> especially when bounds are involved (e.g., optim has an awkward habit of >> attempting evaluations outside the domain when numerical derivatives are >> needed). >> >> You might want to look at t

[R] optim with upper and lower bounds

2020-08-10 Thread Roy Mendelssohn - NOAA Federal via R-help
I am running a lot of optimization problems, at the moment using 'optim' ('optim' is actually called by another program). All of the problems have variables with simple upper and lower bounds, which I can easily transform into a form that is unconstrained and solve using 'BFGS'. But I was

Re: [R] rNOMADS Package

2020-07-28 Thread Roy Mendelssohn - NOAA Federal via R-help
When you start rNOMADS it says: > Welcome to rNOMADS 2.4.2 "Pandaemonium Fortress"! > Questions? Follow @rNOMADS_r on Twitter or send a message to > rnomads-u...@lists.r-forge.r-project.org > Likely to get much more knowledgeable answers there. -Roy > On Jul 28, 2020, at 1:45 PM, Philip

Re: [R] curl options?

2020-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
is > desirable to ignore an expired Cert in the Cert search path. Not > particularly knowledgeable on this, but my offhand feeling is that could > lead to problems. > > Thanks again for the solution! > > -Roy > > >> On Jul 23, 2020, at 4:20 PM, Rasmus Li

Re: [R] curl options?

2020-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
; > On 2020-07-23 14:56 -0700, Roy Mendelssohn - NOAA Federal via R-help wrote: >> I am trying to get the following command to work: >> >>> sshInfo <- rerddap::info('hawaii_soest_f75b_adc6_12ab', url = >>> 'https://apdrc.soest.hawaii.edu/erddap/')

[R] curl options?

2020-07-23 Thread Roy Mendelssohn - NOAA Federal via R-help
I am trying to get the following command to work: > sshInfo <- rerddap::info('hawaii_soest_f75b_adc6_12ab', url = > 'https://apdrc.soest.hawaii.edu/erddap/') On a Mac at least (but I know for a fact not necessarily on other OSes) I get: > Error in curl::curl_fetch_memory(x$url$url, handle =

Re: [R] National Weather Service Data

2020-07-08 Thread Roy Mendelssohn - NOAA Federal via R-help
I would suggest looking at the NOMADS page for information on what is available through NOMADS: https://nomads.ncep.noaa.gov -Roy > On Jul 8, 2020, at 8:19 AM, Philip wrote: > > Thanks again for confirming that the wgrib2 software loaded correctly. I > have been making good progress

Re: [R] National Weather Service Data

2020-07-06 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Philip: Results look correct to me. This might help you: https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/default_inv.html -Roy > On Jul 6, 2020, at 9:29 AM, Philip wrote: > > I am trying to access National Weather Service forecasting data through the > rNOMADS package. I’m not

Re: [R] Package httr::GET() question

2020-02-22 Thread Roy Mendelssohn - NOAA Federal via R-help
uses build_url(). > > All the "verbs" use handle_url() — > https://github.com/r-lib/httr/search?q=handle_url_q=handle_url > > So {httr} relies on the quintessential standard in URL escaping — > which is libcurl's — for all URL machinations. > > -boB > > O

Re: [R] Package httr::GET() question

2020-02-19 Thread Roy Mendelssohn - NOAA Federal via R-help
scape > > Cheers, > Ben > > On Tue, Feb 18, 2020 at 1:29 PM Roy Mendelssohn - NOAA Federal via > R-help wrote: >> >> Hi All: >> >> I hav been trying to go through the code for httr::GET() but it is somewhat >> beyond what I know. What I am

[R] Package httr::GET() question

2020-02-18 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi All: I hav been trying to go through the code for httr::GET() but it is somewhat beyond what I know. What I am trying to find out is if all urls are automatically percent encoded, or whether the user needs to do that. Thanks, -Roy ** "The contents of this message do

Re: [R] [SPAM] Re: The "--slave" option

2019-09-21 Thread Roy Mendelssohn - NOAA Federal via R-help
Please All: While as I said in my first post I am still not convinced that the OP was in good faith to improve R and not a troll (yours to decide), I also don't think attacking a person's research to counter a point that has nothing to do with their research is what is wanted on this

Re: [R] [SPAM] Re: The "--slave" option

2019-09-19 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Ben: Without commenting one way or another on your point, your initial post seemed a lot like trolling because of: > Let me reiterate that it is 2019, i.e. "The Future", rather than 1970 when > R was presumably developed, based on its atrocious syntax, documentation > and usability (I think

Re: [R] [FORGED] Re: Regarding R licensing usage guidance

2019-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Rolf: As they say, do read the posting guide: > Good manners: Remember that customs differ. Some people are very direct. > Others surround everything they say with hedges and apologies. Be tolerant. > Rudeness is never warranted, but sometimes `read the manual’ is the > appropriate

Re: [R] Help with a third ggplot error

2019-06-15 Thread Roy Mendelssohn - NOAA Federal via R-help
If I were a betting man I would bet that one of the things in your "pipeline" isn't returning what you think it is. You can either break it out step by step to check or this page lists a variety of resources to debug pipes: https://www.rostrum.blog/2019/04/07/fix-leaky-pipes/ HTH, -Roy >

Re: [R] gganimate: A Grammar of Animated Graphics

2019-06-07 Thread Roy Mendelssohn - NOAA Federal via R-help
There may be other ways but you can store the animation in an object and use the animate() function. -Roy > On Jun 7, 2019, at 7:31 PM, > wrote: > > R-Help Forum > > > > I've been exploring the gganimate package and am wondering how one might > adjust the animation speed? > > > >

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

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

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 <-

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,

[R] cmocean color palette

2019-02-20 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi All: If it would be of use to anyone, I have the latest version of the Kristen Thyng's beautiful cmocean color palettes (see https://matplotlib.org/cmocean/ ) converted to be used in R. These colormaps have been carefully designed given the latest ideas of what makes for a good palette,

Re: [R] Problems trying to place a global map with Ncdf data plot

2019-02-17 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi: > On Feb 16, 2019, at 9:33 AM, rain1290--- via R-help > wrote: > >> ggplot()+geom_point(aes(x=nc_lon,y=nc_lat,color="onedaymax"), > size=0.8)+borders("world", > colour="black")+scale_color_viridis(name="onedaymax")+theme_void()+coord_quickmap() > *Error: Aesthetics must be either length 1

[R] Two gganimate questions.

2019-02-07 Thread Roy Mendelssohn - NOAA Federal via R-help
I have two gganimate questions that I have made some headway on but not too much, and they are actually related. The questions are: 1. Suppose I have a list where each element of the list is a pre-defined ggplots2 graphic (in my case each is a map). Is there a way to animate this, and if

Re: [R] how to plot gridded data

2018-09-13 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Lily: I haven't used it to any extent to give you specifics, but I strongly suggest you look at the package sf, it is designed to do these sorts of things. sf can read in the shapefile, and it has features to covert the dataframe you describe to one of its objects, and to combine

[R] How deep into function calls does trycatch() work

2018-08-16 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi All: I am using another package in a project I have. Because of that, I have no control on how that package behaves or what it returns. This package has a function foo() that calls httr::GET(), and if it gets an error from httr::GET() it calls the following routine: err_handle2 <-

Re: [R] ggplot2 version 3

2018-07-03 Thread Roy Mendelssohn - NOAA Federal via R-help
TIBCO Software > wdunlap tibco.com > > On Tue, Jul 3, 2018 at 2:08 PM, Roy Mendelssohn - NOAA Federal via R-help > wrote: > Hi All: > > When I ask about updating packages in my R distribution, it lists ggplot2 > version 3.0.0 as being available. I know that ggplot2 version 3.0

[R] ggplot2 version 3

2018-07-03 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi All: When I ask about updating packages in my R distribution, it lists ggplot2 version 3.0.0 as being available. I know that ggplot2 version 3.0.0 has made some significant changes that will break certain things. I would like to install the new version, to see if it breaks anything that