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
Found it. On June 9, in the R-developers mail-list, a chain under the topic "SSL certificate issues". -Roy > On Jul 24, 2020, at 1:21 PM, Roy Mendelssohn - NOAA Federal > wrote: > > Thank you very much. That indeed did work, more specifically as (to include >

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
s_0p50 > for the Global Forecast System? > > Thanks. > > -Original Message----- From: Roy Mendelssohn - NOAA Federal > Sent: Monday, July 6, 2020 6:35 PM > To: Philip > Subject: Re: [R] National Weather Service Data > > Skimming the docs seems to assume a lot of knowl

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

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 >

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

Re: [R] httr::content without message

2018-01-02 Thread Roy Mendelssohn - NOAA Federal
gt; junk <- httr::content(r1, col_types = cols()) > > See more here... > > https://blog.rstudio.com/2016/08/05/readr-1-0-0/ > > > Cheers, > Ben > > > >> On Jan 2, 2018, at 12:30 PM, Roy Mendelssohn - NOAA Federal >> <roy.mendelss...@noaa.gov>

[R] httr::content without message

2018-01-02 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am using httr to download files form a service, in this case a .csv file. When I use httr::content on the result, I get a message. Since this will be in a package. I want to suppress the message, but haven't figured out how to do so. The following should reproduce the result:

[R] Development versions of xtractomatic and rerddapXtracto

2017-12-22 Thread Roy Mendelssohn - NOAA Federal
If you are a user of the R package "xtractomatic", I have a new development version available, as well as a test version of the package "rerddapXtracto". The biggest changes are functions that can take the output of any of the data download functions and quickly map the data. These

Re: [R] dygraphs, multiple graphs and shiny

2017-10-18 Thread Roy Mendelssohn - NOAA Federal
raphs::renderDygraph({ > res = list() > res[[1]] <- dygraph(lungDeaths[, 1], group = 'lungs') %>% > dyRangeSelector() > res[[2]] <- dygraph(lungDeaths[, 1], group = 'lungs') %>% > dyRangeSelector() >res <- htmltools::tagList(res) >

[R] dygraphs, multiple graphs and shiny

2017-10-18 Thread Roy Mendelssohn - NOAA Federal
Hi All: This is really getting into the weeds, but I am hoping someone will have a solution. I am trying to use dygrahs for R, within Shiny. The situation arises when I am combining a number of dygraphs into one plot. If I am just in an RNotebook, if you look at:

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
lap <wdun...@tibco.com> wrote: > > > > Does the following work for you? > > > >ggplot2::ggplot(plotFrame, aes(x = time, y = depth, height = cycle, > > group = depth)) + ggridges::geom_ridgeline(fill="red", min_height=-0.25) > > > > &g

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
line(fill="red", min_height=-0.25) > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Tue, Oct 17, 2017 at 12:43 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: > I have tried: > > ggplot(plotFrame, aes(x = time, y = cycl

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
d your question is...? > ... and the code you tried that didn't work was? > > Bert > > > On Oct 17, 2017 12:22 PM, "Roy Mendelssohn - NOAA Federal" > <roy.mendelss...@noaa.gov> wrote: > Hi All: > > I am just not understanding ggridges. The data I have are tim

[R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am just not understanding ggridges. The data I have are time series at different depths in the ocean. I want to make a joy plot of the time series by depth. If I was just doing a ggplot2 line plot I would be doing: ggplot(plotFrame, aes(x = time, y = cycle, group = depth)) +

Re: [R] withr::set_makevars

2017-09-09 Thread Roy Mendelssohn - NOAA Federal
gt; TIBCO Software > wdunlap tibco.com > > On Wed, Sep 6, 2017 at 3:41 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: > Hi All; > > This problem has come about from trying to learn some of the review practices > recommend by rOpensci. One of them is

Re: [R] withr::set_makevars

2017-09-06 Thread Roy Mendelssohn - NOAA Federal
nction(e)conditionMessage(e})) > > Then run your test and see what file set_makevars is complaining about and > what in the file might cause trouble for set_makevars. > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com <http://tibco.com/> >

[R] withr::set_makevars

2017-09-06 Thread Roy Mendelssohn - NOAA Federal
Hi All; This problem has come about from trying to learn some of the review practices recommend by rOpensci. One of them is to use the package goodpractice. After installing goodpractice, it kept failing on my own packages which are under development, and I was concerned something was funny

Re: [R] RMarkdown question

2017-08-29 Thread Roy Mendelssohn - NOAA Federal
hen you can jump to this > via a link like "see [this code chunk](#foo)". > > Regards, > Yihui > -- > https://yihui.name > > > On Tue, Aug 29, 2017 at 1:30 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: >> Hi All: >>

[R] RMarkdown question

2017-08-29 Thread Roy Mendelssohn - NOAA Federal
Hi All: In creating a R Notebook I know that in the text I can link to a (sub) section by using the command: [Header 1](#anchor) and putting the appropriate anchor name at the appropriate header. But can the same be done for code chunks, if the code chunk is named? What I want to do

Re: [R] Extracting subset from netCDF file using lat/lon and converting into .csv in R

2017-08-28 Thread Roy Mendelssohn - NOAA Federal
Two questions: 1. Is the order of the dimensions shown what is shown if you look at str(ncin) - I mean shown at the end where it describes the variable and its dimensions? 2. Is you problem how to subset the netcdf file, how to write to the .csv file, or both? -Roy > On Aug 28, 2017, at

Re: [R] Kalman filter for a time series

2017-07-30 Thread Roy Mendelssohn - NOAA Federal
> structSSM Is no longer part of KFAS. All you needed to do was: library(KFAS) ?KFAS and you would have seen that if you went to the index. A structural state space model is now built up from its components, much like in LM. Look at; ?SSModel -Roy > On Jul 29, 2017, at 9:26 PM, Staff

Re: [R] Accessing Pointers

2017-06-22 Thread Roy Mendelssohn - NOAA Federal
Hi Lawrence: > On Jun 22, 2017, at 4:26 PM, David Winsemius wrote: > > > >> is pointing to in the following line of code. Need some help. >> >> #install.packages('xml2') >> library('xml2') >> pg1 <- read_html("www.msn.com") > > Error: 'www.msn.com' does not exist in

Re: [R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
From: Ismail SEZEN [mailto:sezenism...@gmail.com] > Sent: Thursday, June 1, 2017 3:35 PM > To: Roy Mendelssohn - NOAA Federal <roy.mendelss...@noaa.gov> > Cc: David L Carlson <dcarl...@tamu.edu>; R-help <r-help@r-project.org> > Subject: Re: [R] Reversing one dimensio

Re: [R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
latitudes in the array is irrelevant, as long as the mapping is correct. -Roy > On Jun 1, 2017, at 1:35 PM, Ismail SEZEN <sezenism...@gmail.com> wrote: > >> >> On 1 Jun 2017, at 22:42, Roy Mendelssohn - NOAA Federal >> <roy.mendelss...@noaa.gov

Re: [R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
ean relative difference: 0.5855162" > > David C > > -Original Message- > From: Bert Gunter [mailto:bgunter.4...@gmail.com] > Sent: Thursday, June 1, 2017 2:00 PM > To: David L Carlson <dcarl...@tamu.edu> > Cc: Roy Mendelssohn - NOAA Federal <roy.mendel

Re: [R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
ep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Thu, Jun 1, 2017 at 9:51 AM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: >> Hi All: >> >> I h

[R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
Hi All: I have been looking for an elegant way to do the following, but haven't found it, I have never had a good understanding of any of the "apply" functions. A simplified idea is I have an array, say: junk(5, 10, 3) where (5, 10, 3) give the dimension sizes, and I want to reverse the

[R] Xtractomatic version 3.3.2 now available on CRAN

2017-05-23 Thread Roy Mendelssohn - NOAA Federal
The xtractomatic package version 3.3.2 is now available on CRAN. Besides the improvements listed below, this release fixes a problem caused by an update to the Apache Tomcat used by the ERDDAP server, that broke an important function in the package. Many thanks to the CRAN maintainers for

[R] plotly example that highlights a line

2017-02-28 Thread Roy Mendelssohn - NOAA Federal
Hi All: In searching online, I have found examples of using plotly with ggplot2 graphics, say using geom_line, where there are multiple lines and by selecting the "factor" in the legend makes the particular line disappear or reappear (see https://plot.ly/ggplot2/). I am wondering if

[R] testers sought for xtractomatic-like package

2017-02-03 Thread Roy Mendelssohn - NOAA Federal
rerddapXtracto is an R package developed to subset and extract satellite and other oceanographic related data from a remote ERDDAP server. The program can extract data for a moving point in time along a user-supplied set of longitude, latitude and time points; in a 3D bounding box; or within a

Re: [R] Error in R_nc4_open

2017-01-11 Thread Roy Mendelssohn - NOAA Federal
> On Jan 11, 2017, at 8:39 PM, Debasish Pai Mazumder wrote: > > Thanks so much Roy. It works. > Thanks Jeff for all your help. > As a part of NCAR Command Language help group, I was only concern about the > first response I received from this help group which will

Re: [R] Error in R_nc4_open

2017-01-11 Thread Roy Mendelssohn - NOAA Federal
Try replacing http with https. > gribfile <- > "https://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cfsv2_forecast_ts_9mon/2011/201104/20110401/2011040100/tmax.01.2011040100.daily.grb2; > nc <- nc_open(gribfile) > str(nc) List of 14 $ filename : chr

[R] xtractomatic v3.2.0

2017-01-04 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am pleased to announce that xtractomatic v3.2.0 is now available on CRAN. The changes in this version will be invisible to the user - the major changes are the use of https instead of http, and some changes in the vignette so that multiple attempts are made to download the data

Re: [R] Lubdridate: subset based on hour and minute

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
somehow couldn't find an example like that via google. > > Joe > > On Mon, Jan 2, 2017 at 1:35 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: >>> test > hm("10:00") >> [1] FALSE FALSE TRUE TRUE >>> test[test > hm(

Re: [R] Lubdridate: subset based on hour and minute

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
> Perhaps you're showing me the way and I'm missing it - how would I > subset to only 1030 and 1100, excluding 1000? It seems I would need to > say, give me all time greater than 10:00, but the hours and minutes > are in separate slots, which is throwing me off. > > Thanks ag

Re: [R] Lubdridate: subset based on hour and minute

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
Hi Joe: See below. > On Jan 2, 2017, at 12:01 PM, Joe Ceradini wrote: > > Hi folks, > > I must be missing something obvious/painfully simple here > > How do I subset a time vector based on hours AND minutes? So, in this > example, I want all time greater than 10:00,

[R] xtractomatic package is now available in CRAN

2016-10-12 Thread Roy Mendelssohn - NOAA Federal
I am pleased to announce that the xtractomatic package is now available from CRAN. xtractomatic is an R package developed to subset and extract satellite and other oceanographic related data from a remote server. The program can extract data for a moving point in time along a user-supplied set

Re: [R] OPeNDAP access / OPeNDAP subsetting with R

2016-09-30 Thread Roy Mendelssohn - NOAA Federal
t;) > x<-nc_open(gribfile) > > > nc_open doesn't work. > > which command should I use? > > with regards > -Deb > > > On Tue, Sep 27, 2016 at 9:30 PM, Michael Sumner <mdsum...@gmail.com> wrote: > Opendap won't work on Windows CRAN build of ncdf4,

Re: [R] OPeNDAP access / OPeNDAP subsetting with R

2016-09-27 Thread Roy Mendelssohn - NOAA Federal
it > doesn't work. > the OPeNDAP link of the data > http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cfsv2_forecast_ts_9mon/2014/201404/20140403/2014040312/ > > datafile: > tmax.01.2014040312.daily.grb2 > > Thanks > -Deb > > On Tue, Sep 27, 2016 at 11:51

Re: [R] OPeNDAP access / OPeNDAP subsetting with R

2016-09-27 Thread Roy Mendelssohn - NOAA Federal
Look at the package ncdf4. You can use an OPeNDAP URL in place of the file name to perform subsets., -Roy > On Sep 27, 2016, at 9:06 AM, Debasish Pai Mazumder wrote: > > Hi all, > > I would like to access and subset following OpeNDAP files. > server: >

[R] Variable String formation

2016-09-22 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am trying to write code to create a string to be executed as a command. The string will be of the form: "param <- param[,rev(seq_len(dataYLen)),,drop = FALSE]" Now just creating that string is simple enough. Where the problem arises is the array param could be 2, 3, or 4

[R] Update to the xtractomatic package

2016-08-08 Thread Roy Mendelssohn - NOAA Federal
xtractomatic is an R package developed to subset and extract satellite and other oceanographic related data from a remote server. The program can extract data for a moving point in time along a user-supplied set of longitude, latitude and time points; in a 3D bounding box; or within a polygon

Re: [R] open a zip file

2016-08-07 Thread Roy Mendelssohn - NOAA Federal
If I break it into parts, I find that the "GET" fails. > Year <- format(Sys.Date(), "%Y") >Month <- format(Sys.Date(), "%m") > junk <- paste("https://mbsdisclosure.fanniemae.com/disclosure-docs/monthly/;, +"mbs", +as.character(Month), +

Re: [R] about netcdf files

2016-08-01 Thread Roy Mendelssohn - NOAA Federal
Hi Lily: If you download the vignette to my xtractomatic package (http://coastwatch.pfeg.noaa.gov/xtracto/index.html) there are any number of examples using ggplot2 to make maps from netcdf data, HTH, -Roy > On Aug 1, 2016, at 10:35 AM, lily li wrote: > > Hi all, > >

Re: [R] about netcdf files

2016-07-26 Thread Roy Mendelssohn - NOAA Federal
count > = c(1, 1, -1)) where the -1 value tells it to get all the values along the time dimension. You now have that slice of the data stored in myPrecip. I hope this gets you started, but i strongly urge you to read through the link above. -Roy > > On Tue, Jul 26, 2016 at 2

Re: [R] about netcdf files

2016-07-26 Thread Roy Mendelssohn - NOAA Federal
Hi Lily: I doubt the mail-list would pass through the netcdf file. Instead, could you do the following, and post the results: library(ncdf4 pre1 = nc_open('sample_precip_daily.nc') str(pre1) nc_close(pre1) I have a feeling you haven't worked much with netcdf files. I will try to find a

Re: [R] C/C++/Fortran Rolling Window Regressions

2016-07-21 Thread Roy Mendelssohn - NOAA Federal
I have no idea which method produces the fastest results, but the package KFAS has a function to do recursive regressions using the Kalman filter. One difference is that it is not, as far as a I can telll, a moving window (so past data are being dropped), just a recursively computed

Re: [R] a package-building opinion question, please

2016-07-08 Thread Roy Mendelssohn - NOAA Federal
Hi Erin: Everyone's tastes differ, but when I started out knowing nothing about packages, I found Hadley's guide (thank you Hadley!!!) indispensable: http://r-pkgs.had.co.nz/intro.html For obvious reasons, his guide really is geared to built-in features of RStudio, though I believe

Re: [R] netcdf data precision or least significant digit

2016-07-07 Thread Roy Mendelssohn - NOAA Federal
kage but author said that it is nothing > to do with ncdf4 package. > > Please, forgive me for taking your time. > > >> On 08 Jul 2016, at 03:21, Roy Mendelssohn - NOAA Federal >> <roy.mendelss...@noaa.gov> wrote: >> >> After looking at the file, doing an extrac

Re: [R] netcdf data precision or least significant digit

2016-07-07 Thread Roy Mendelssohn - NOAA Federal
ically, their absolute values must be equal. > > 1- http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis2.html > 2- > ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis2.dailyavgs/pressure/uwnd.2015.nc > > > >> On 08 Jul 2016, at 02:27, Roy Mendelssohn - NOAA Fed

Re: [R] netcdf data precision or least significant digit

2016-07-07 Thread Roy Mendelssohn - NOAA Federal
Hi Ismail: Can you point me to a particular netcdf file you are working with. I would like to play with it for awhile. I am pretty certain the scale factor is 0.01 and what you are seeing in rounding error (or mor precisely I should say problems with representations of floating point

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-06 Thread Roy Mendelssohn - NOAA Federal
Thanks muchly. I hate the smart quotes! -Roy > On Jul 6, 2016, at 11:42 AM, David Winsemius wrote: > > >> On Jul 6, 2016, at 9:45 AM, rmendelss gmail wrote: >> >> >>> On Jul 6, 2016, at 9:36 AM, David Winsemius wrote:

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-02 Thread Roy Mendelssohn - NOAA Federal
Sending this to Hemant a second time as i forgot to reply to list. Hi Hemant: Well technically the code you give below shouldn’t work, because “start” and “count” are suppose to be of the same dimensions as the variables. I guess Pierce’s code must be very forgiving if that is working. One

Re: [R] How to get bathymetry data using R

2016-06-11 Thread Roy Mendelssohn - NOAA Federal
Use the “rerddap” package that accesses our ERDDAP server. You can see the data available at: http://upwell.pfeg.noaa.gov/erddap In the search box type in “bathymetry”.You can subset as you want, using “rerddap” you get back a netcdf file that is already read into your R workspace, or

Re: [R] system() command not working

2016-06-04 Thread Roy Mendelssohn - NOAA Federal
Hi John: When El Capitan first came out there was a discussion in the R-SIg-Mac list about environmental variables not being passed down to applications (not just R abut in general). I believe a work around was suggested, but I would search the archives for that. So what is happening,

Re: [R] Request for help

2016-06-03 Thread Roy Mendelssohn - NOAA Federal
Hi All: > On Jun 3, 2016, at 11:33 AM, jlu...@ria.buffalo.edu wrote: > > There is a video tutorial on the RStudio web site showing how to create R > packages within RStudio. Hadley Wickham also has a book on creating R > packages. > And I would add that Hadley has kindly put the book

Re: [R] Matrix multiplications

2016-05-21 Thread Roy Mendelssohn - NOAA Federal
> str(t(y-X %*% b)) num [1, 1:10] 0.595 -1.7538 -0.0498 -1.651 -0.6328 ... > str((y-X %*% b)) num [1:10, 1] 0.595 -1.7538 -0.0498 -1.651 -0.6328 … -Roy > On May 21, 2016, at 12:00 PM, george brida wrote: > > Dear R users: > > I have written the following lines : >

Re: [R] Unexpected values obtained when reading in data using ncdf and ncdf4

2016-04-22 Thread Roy Mendelssohn - NOAA Federal
Hi Louise: If Dave can’t figure it out, I can give a look also. A couple of things I would suggest: 1. Don’t use the name “data” in the nc_open command, that is a reserved command in R and you never know what problems that can cause. 2. You are doing calculations to get set the start and

Re: [R] Memory usage in prcomp

2016-03-22 Thread Roy Mendelssohn - NOAA Federal
> On Mar 22, 2016, at 10:00 AM, Martin Maechler <maech...@stat.math.ethz.ch> > wrote: > >>>>>> Roy Mendelssohn <- NOAA Federal <roy.mendelss...@noaa.gov>> >>>>>>on Tue, 22 Mar 2016 07:42:10 -0700 writes: > >> Hi

[R] Memory usage in prcomp

2016-03-22 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am running prcomp on a very large array, roughly [50, 3650]. The array itself is 16GB. I am running on a Unix machine and am running “top” at the same time and am quite surprised to see that the application memory usage is 76GB. I have the “tol” set very high (.8) so that it

Re: [R] Reshaping an array - how does it work in R

2016-03-22 Thread Roy Mendelssohn - NOAA Federal
uot;outside", >> notably Tomas Kalibera. >> >> And hence:*NO* such strange workarounds are needed in this specific case: >> >> > Workaround: use data.table::setattr or bit::setattr to modify the >> > dimensions in place (i.e., without mak

Re: [R] Reshaping an array - how does it work in R

2016-03-21 Thread Roy Mendelssohn - NOAA Federal
Thanks for the info, but I will stay with regular R. Work -arounds for what I want to do just took some thought and programming, I just didn’t know if R copied the array or just manipulated indices, and given the size of the array I am memory limited. This gets into the old thing of

Re: [R] Reshaping an array - how does it work in R

2016-03-19 Thread Roy Mendelssohn - NOAA Federal
> On Mar 19, 2016, at 8:18 AM, Henrik Bengtsson <henrik.bengts...@gmail.com> > wrote: > > On Fri, Mar 18, 2016 at 8:28 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: >> Hi Henrik: >> >> I want to do want in oceanography is ca

[R] Reshaping an array - how does it work in R

2016-03-19 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am working with a very large array. if noLat is the number of latitudes, noLon the number of longitudes and noTime the number of time periods, the array is of the form: myData[noLat, no Lon, noTime]. It is read in this way because that is how it is stored in a (series) of netcdf

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Roy Mendelssohn - NOAA Federal
8, 2016 at 3:15 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: >> Thanks. That is what I needed to know. I don’t want to play around with >> some of the other suggestions, as I don’t totally understand what they do, >> and don’t want

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Roy Mendelssohn - NOAA Federal
> On Mar 18, 2016, at 2:56 PM, Bert Gunter wrote: > > However copying may occur anyway as part of R's semantics. Others will > have to help you on that, as the details here are beyond me. > > Cheers, > Bert Hi Bert: Thanks for your response. The only part I was

  1   2   >