[R] rerddap v1.2.0

2024-12-16 Thread Roy Mendelssohn - NOAA Federal via R-help
ople who roll their own ERDDAP access, starting with ERDDAP v2.25, both grids and tables can be downloaded as parquet files, either with or without metadata. A note is that many parquet readers do not appear to provide read access to the metadata section. -Roy ** "

Re: [R] How to install rgeoda in R

2024-11-10 Thread Roy Mendelssohn - NOAA Federal via R-help
https://geodacenter.r-universe.dev/rgeoda HTH, -Roy > On Nov 10, 2024, at 8:49 AM, Jeff Newmiller via R-help > wrote: > > The rgeoda maintainer seems to be having difficulty keeping up with required > changes to be supported on CRAN. This may get corrected soon or never

Re: [R] Problem with converting grib file to excel

2024-09-30 Thread Roy Mendelssohn - NOAA Federal via R-help
raster_data is now one long array that needs to be reshaped: raster_data <- array(raster_data, dim = c(3, 8670) now raster_data[1, ] contains the temperature series, raster_data[2, ] contains the dew point data, and raster_data[3, ] contains the cloud cover data. HTH, -Roy PS - GRIB

Re: [R] Problem with converting grib file to excel

2024-09-26 Thread Roy Mendelssohn - NOAA Federal via R-help
The easiest would be to send the link to the site from which you downloaded the file. Thanks, -Roy > On Sep 26, 2024, at 1:26 PM, CALUM POLWART wrote: > > Attachments CAN NOT be sent to group > > > On Thu, 26 Sep 2024, 21:22 javad bayat, wrote: > Dear Roy, >

Re: [R] Problem with converting grib file to excel

2024-09-26 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Javad: I know a lot about reading GRIB files, I work with them all the time. But if you don’t make the file available, or point me to where I can download it, there is not much I can do. Thanks, -Roy > On Sep 25, 2024, at 9:41 PM, javad bayat wrote: > > Dear all; > Man

Re: [R] Problem with converting grib file to excel

2024-09-25 Thread Roy Mendelssohn - NOAA Federal via R-help
At least for me the dataset file did not come through. I will look at it if it can be made available. It does look like the finial step of reading the data into raster failed, so then did the rest of th commands. -Roy > On Sep 25, 2024, at 3:24 PM, CALUM POLWART wrote: > > N

Re: [R] Problem with combining monthly nc files into a yearly file (era5 climate data)

2024-06-21 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi Leni: You forget to post the important part - the errors you have been getting and if you have the errors isolated to particular lines in the code. HTH, -Roy > On Jun 21, 2024, at 3:59 AM, Leni Koehnen via R-help > wrote: > > Dear R-help List, > > I am currently tr

[R] Fwd: Webinar: How to access ERDDAP data using R

2024-06-11 Thread Roy Mendelssohn - NOAA Federal via R-help
, PhD (she/her) > Program Manager > National Oceanic and Atmospheric Administration <https://www.noaa.gov/> > Global Ocean Monitoring & Observing Program <http://globalocean.noaa.gov/> > and Cooperative Programs for the Advancement of Earth System Science > <https://

Re: [R] Need help testing a problem

2024-02-01 Thread Roy Mendelssohn - NOAA Federal via R-help
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
g to help. One of my issues is I have been unable to reproduce the error, but I also do not have ready access to a Windows machine. -ROy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, se

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
, as well as why they didn’t do what you wanted (be specific) would greatly facilitate things. Happy new year, -Roy > On Dec 29, 2023, at 10:14 AM, Andy wrote: > > Hello > > I am trying to work through a problem, but feel like I've gone down a rabbit > hole. I

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

Re: [R] aniMoutm/foiegras Assistance

2023-01-29 Thread Roy Mendelssohn - NOAA Federal via R-help
what rho_o does, but it might be a first step to figuring things out/ HTH, -Roy > On Jan 27, 2023, at 12:42 PM, ZAC WARHAM > wrote: > > Hi all, I am receiving the error *Newton failed to find minimum* whilst > trying to fit a move persistence model in this package. I think

Re: [R] categorizing data

2022-05-29 Thread Roy Mendelssohn - NOAA Federal via R-help
10, 30, 50) junk[1, order(c(32, 11, 17))] <- values junk[1, ] [1] 50 10 30 This works because order() returns the index of the ordering, not the values. HTH, -Roy > On May 29, 2022, at 1:31 PM, Janet Choate wrote: > > I'm sorry if this has come across as a homework assignment!I

Re: [R] Extract data from .nc file

2021-02-24 Thread Roy Mendelssohn - NOAA Federal via R-help
sed if either of the "cbind()" or "dataframe()" commands works, as everything is of different sizes. HTH, -Roy > On Feb 24, 2021, at 6:19 AM, Shailendra Pratap > wrote: > > Hi, > Please help me. I am trying to get information on "soi" from the Ne

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&t=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: &

Re: [R] NOAA .grb2 files

2020-09-04 Thread Roy Mendelssohn - NOAA Federal via R-help
you have a large computer. Since no example script was given, it is impossible to tell if he is trying to read in the entire grib2 file or what. And each expanded array in R will be much much bigger than the equivalent in grib2. -Roy > On Sep 4, 2020, at 3:32 PM, Philip wrote: >

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

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

2020-08-16 Thread Roy Mendelssohn - NOAA Federal via R-help
yone use R, which is the main point of this mail-list. Thanks, -Roy PS - Or we can start a discussion on the best editor to use - that should be good for a few flames! :-) > On Aug 16, 2020, at 3:39 PM, Abby Spurdle wrote: > >> a) Read about it yourself. It is a legal defi

Re: [R] rNOMAD package

2020-08-13 Thread Roy Mendelssohn - NOAA Federal via R-help
ges, so you may have to spend some time learning how to do that. It is possible that 'tidnyNC' can also do OPeNDAP, I am just not certain that. -Roy > On Aug 13, 2020, at 8:59 AM, Philip wrote: > > Daniel Bowman wrote a wonderful package to access National Weather Service &g

Re: [R] optim with upper and lower bounds

2020-08-11 Thread Roy Mendelssohn - NOAA Federal via R-help
Thanks to all who responded. Will take me some time to digest it all. -Roy > On Aug 11, 2020, at 6:24 AM, J C Nash wrote: > > Thanks to Peter for noting that the numerical derivative part of code doesn't > check bounds in optim(). > I tried to put some checks into

[R] optim with upper and lower bounds

2020-08-10 Thread Roy Mendelssohn - NOAA Federal via R-help
g 'BFGS'. But I was wondering is if it is more robust to solve the problem this way, or to use L-BFGS-B instead. Also how much difference can it make using 'optimx' instead 'optim'? The program I am using (KFAS) allows this, I just have to do

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,

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
tion of why this was happening. I also wonder whether it really 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,

[R] curl options?

2020-07-23 Thread Roy Mendelssohn - NOAA Federal via R-help
options listed there, so maybe that option is in a different form that I am missing. Or is there another way around this still using 'curl' . Using another function that does similar to 'curl' is not an option, because I need the 'rerddap::info()' call which ca

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 g

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 packa

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

2020-02-22 Thread Roy Mendelssohn - NOAA Federal via R-help
the people who took time to respond. -Roy > On Feb 22, 2020, at 5:23 AM, Bob Rudis wrote: > > curl::curl_escape() — > https://github.com/jeroen/curl/search?q=curl_escape&unscoped_q=curl_escape > — uses the underlying libcurl curl_easy_escape() which does proper > escapin

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

2020-02-19 Thread Roy Mendelssohn - NOAA Federal via R-help
ncode twice. Thanks, -Roy > On Feb 19, 2020, at 7:08 AM, Ben Tupper wrote: > > Hi, > > Perhaps you could test it out by using httr::GET() with and without > escaping using xml2::url_escape()? > > https://www.rdocumentation.org/packages/xml2/versions/1.2.2/topics/

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

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

2019-09-21 Thread Roy Mendelssohn - NOAA Federal via R-help
this mail-list. There is one very simple alternative - don't reply. Ben - members of R-core do read this mail-list, and the fact that not a single one has replied probably tells you what you need to know. -Roy > On Sep 21, 2019, at 3:56 PM, Abby Spurdle wrote: > > (excerpt

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

2019-09-19 Thread Roy Mendelssohn - NOAA Federal via R-help
usability (I think I only need to say "NaN", "NULL", and "NA"). > You are certainly welcome to your opinions about R, but these comments are totally aside from what I assume is your main point, and because of this my first reaction was don't feed th

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

2019-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
appropriate response. Don’t waste time discussing such matters on the list. > Ad hominem comments are absolutely out of place. -Roy > > On Jul 24, 2019, at 2:49 PM, Rolf Turner wrote: > > > On 25/07/19 4:36 AM, Weiwen Ng, MPH wrote: > >> Here's one way to phr

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

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

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
you started. I haven't played with either much, just know that they exist and zoom maps. HTH, -Roy > On Mar 6, 2019, at 2:36 PM, > wrote: > > Roy > > Thank you - that's helpful. Going to have to read up on sf and mapview > library. Those are new ones. Then t

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 -

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

[R] cmocean color palette

2019-02-20 Thread Roy Mendelssohn - NOAA Federal via R-help
lette, and to make palettes that are really specific to the type of parameters in oceanography. They are quite popular in the oceanographic community. The file is a small .RData file. If you are interested, email me off-line so as not to spam the entire mail-list. -

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

2019-02-17 Thread Roy Mendelssohn - NOAA Federal via R-help
ed that contains both your expanded grid and the precipitation data and that has to be defined in either the ggplot() call or the geom_point() cal. HTH, -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." **

[R] Two gganimate questions.

2019-02-07 Thread Roy Mendelssohn - NOAA Federal via R-help
separated, it it done using geom_sf. can an initial animation be defined and then frames added to it as new maps are made? Thanks for any help. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ****

Re: [R] how to plot gridded data

2018-09-13 Thread Roy Mendelssohn - NOAA Federal via R-help
mbine objects. There are even plotting functions I believe, or if not there is a ggplot2::geom_sf() HTH, -Roy > On Sep 13, 2018, at 7:02 PM, lily li wrote: > > Hi Petr, > > I have merged the data using cbind. The dataset is like this: > DF > lat1_lon1 lat1_lon2 lat1_lo

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

2018-08-16 Thread Roy Mendelssohn - NOAA Federal via R-help
override the stop() call or am I a goner, or is there another way to override it, given that I can't change the code to err_handle2(). Thanks, -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." *

Re: [R] ggplot2 version 3

2018-07-03 Thread Roy Mendelssohn - NOAA Federal via R-help
Thanks! -Roy > On Jul 3, 2018, at 2:40 PM, William Dunlap wrote: > > One way to test the new ggplot2 is to make a new directory to use as an R > library and to install the new ggplot2 there. >newLibrary <- "C:/tmp/newRLibrary" >dir.create(newLibrary)

[R] ggplot2 version 3

2018-07-03 Thread Roy Mendelssohn - NOAA Federal via R-help
my directory and replace it with the one I want, will that do it, or are there too many other dependencies that are involved? Thanks for any suggestions. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or

Re: [R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
ensaje original - De: "José María Mateos" Para: "r-help@r-project.org r-help@r-project.org" Enviados: Domingo, 11 de Marzo 2018 9:25:51 Asunto: Re: [R] Your browser do not suport oracle bi presentation services On Sun, Mar 11, 2018 at 09:12:56AM -0500, KENNETH ROY CABRERA TORRES

[R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
Hi dear R users: I'm trying the following code to download an information from the web. url1 <- "http://obieebr.banrep.gov.co/analytics/saw.dll?Go&Path=%2fshared%2fSeries%20Estad%C3%ADsticas_T%2f1.%20Tasa%20de%20Cambio%20Peso%20Colombiano%2f1.1%20TRM%20-%20Disponible%20desde%20el%2027%20de%20

Re: [R] httr::content without message

2018-01-02 Thread Roy Mendelssohn - NOAA Federal
if I do: junk <- readr::read_csv(r1$content, col_types = cols()) Perfect. Using httr rather than putting the url in any of the read.csv or read_csv type code allows me greater control if the request fails. Thanks again, -Roy > On Jan 2, 2018, at 9:44 AM, Ben Tupper wrote: > > Ah

[R] httr::content without message

2018-01-02 Thread Roy Mendelssohn - NOAA Federal
") ) I want to suppress that output. Thanks, -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Divisio

Re: [R] LSD-test

2017-12-25 Thread Kenneth Roy Cabrera Torres
Check the agricolae package. library(agricolae) El 25/12/17 a las 17:33, David Winsemius escribió: On Dec 25, 2017, at 2:09 PM, Ahmed Attia wrote: The model should be class aov or lm and my model class is aovlist. tried tidy from broom library but did not work. To make it class aov, I had t

[R] Development versions of xtractomatic and rerddapXtracto

2017-12-22 Thread Roy Mendelssohn - NOAA Federal
changes. To use "rerddapXtracto" you must install the Github version of "rerddap" available from https://github.com/ropensci/rerddap. Basically the initial installation of either package may not go cleanly, if there are problems let me know, it may take several attempts to

Re: [R] dygraphs, multiple graphs and shiny

2017-10-18 Thread Roy Mendelssohn - NOAA Federal
Answering my own question. It took a lot of trial and error, but the code below will work. The trick is to do form the lis to plots, create the html tag, and use renderUI() for that, and then in the UI.R part use htmlOutput() to output the result. -Roy > library(shiny) > > #

[R] dygraphs, multiple graphs and shiny

2017-10-18 Thread Roy Mendelssohn - NOAA Federal
nput, output) { > >output$distPlot <- dygraphs::renderDygraph({ > lungDeaths <- cbind(mdeaths, fdeaths) > res <- lapply(1:2, function(i) dygraph(lungDeaths[, i])) > htmltools::tagList(res) >}) > } > > # Run the application > shinyApp(u

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
Perfect, thank you. I find the Unix style help usual in R is really only helpful once you know what everything is doing. That makes a good vignette, that shows what all of the options do in a careful way, really important. Thanks again. -Roy > On Oct 17, 2017, at 2:01 PM, Will

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
se calls have that effect? Thanks, -Roy > On Oct 17, 2017, at 1:09 PM, William Dunlap wrote: > > Does the following work for you? > >ggplot2::ggplot(plotFrame, aes(x = time, y = depth, height = cycle, group > = depth)) + ggridges::geom_ridgeline(fill="red"

Re: [R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
producing a plot that was a ridgeline for each depth showing the time series at that depth. The plot should be like the geom_line plot, but as a ridgeline for each depth. -Roy > On Oct 17, 2017, at 12:39 PM, Bert Gunter wrote: > > ...and your question is...? > ... and the co

[R] ggridges help

2017-10-17 Thread Roy Mendelssohn - NOAA Federal
help. -Roy >dput(plotFrame) structure(list(time = structure(c(719236800, 721915200, 724507200, 727185600, 729777600, 732283200, 734961600, 737553600, 740232000, 742824000, 745502400, 748180800, 750772800, 753451200, 756043200, 758721600, 761313600, 763819200, 766497600, 769089600, 771768

[R] Calculating Weeks Since Last Event

2017-09-15 Thread Abhinaba Roy
Hi, I have an input data > dput (input) structure(list(ScanDate = structure(c(16433, 16440, 16447, 16454, 16461, 16468, 16475, 16482, 16489, 16496, 16503, 16510, 16517, 16524, 16531, 16538, 16545, 16552, 16559, 16566, 16573, 16580, 16587, 16594, 16601, 16608, 16615, 16622), class = "Date"), OnPr

Re: [R] withr::set_makevars

2017-09-09 Thread Roy Mendelssohn - NOAA Federal
installation of the rstan package. Commenting out some of the rstan specific lines removed this set of error messages. -Roy > On Sep 6, 2017, at 5:26 PM, William Dunlap wrote: > > withr:::set_makevars() can give that error if the makefile named by the > 'old_path' a

Re: [R] withr::set_makevars

2017-09-06 Thread Roy Mendelssohn - NOAA Federal
Perfect, thank you very much for the tip. -Roy > On Sep 6, 2017, at 5:26 PM, William Dunlap wrote: > > withr:::set_makevars() can give that error if the makefile named by the > 'old_path' argument (default "~/.R/Makevars) contains more than one > definition o

[R] withr::set_makevars

2017-09-06 Thread Roy Mendelssohn - NOAA Federal
-18 cran (@1.0.1) ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center

Re: [R] RMarkdown question

2017-08-29 Thread Roy Mendelssohn - NOAA Federal
just grateful for the help. -Roy > On Aug 29, 2017, at 2:52 PM, Yihui Xie wrote: > > Although it is not an elegant solution, but if your output format is > HTML, you can add an arbitrary empty HTML element like id="foo"> before your code chunk. Then you can jump to thi

[R] RMarkdown question

2017-08-29 Thread Roy Mendelssohn - NOAA Federal
is say that such and such code chunk is an example of how to do something, and have that link to the appropriate code chunk. Thanks for any help. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ****

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

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,

Re: [R] Accessing Pointers

2017-06-22 Thread Roy Mendelssohn - NOAA Federal
read_html("http://www.msn.com";) > str(pg1) List of 2 $ node: $ doc : - attr(*, "class")= chr [1:2] "xml_document" "xml_node" ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ***

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

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
Thanks again. I am going to try the different versions. But I probably won't be able to get to it till next week. This is probably at the point where anything further should be sent to me privately. -Roy > On Jun 1, 2017, at 1:56 PM, David L Carlson wrote: > > On the o

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

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
atitudes in the array is irrelevant, as long as the mapping is correct. -Roy > On Jun 1, 2017, at 1:35 PM, Ismail SEZEN wrote: > >> >> On 1 Jun 2017, at 22:42, Roy Mendelssohn - NOAA Federal >> wrote: >> >> Thanks to all for responses/. There was a

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

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
s are in the data. As I the said, I haven't done extensive testing on what Bert sent, but on a toy 3-dimensional example I have it appeared to do what I want. Thanks again, -Roy > On Jun 1, 2017, at 12:22 PM, David L Carlson wrote: > > My error. Clearly I did not do enough tes

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

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
very fragile. Thanks again. -Roy > On Jun 1, 2017, at 10:45 AM, Bert Gunter wrote: > > How about this: > > f <- function(a,wh){ ## a is the array; wh is the index to be reversed > l<- lapply(dim(a),seq_len) > l[[wh]]<- rev(l[[wh]]) > do.call(`[`,c(list(a),

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

2017-06-01 Thread Roy Mendelssohn - NOAA Federal
sume the number of dimensions of the array nor which dimension to reverse. For example, if i try: junk1 <- apply(junk, 2, rev) junk1 comes out as two-dimensional, not three-dimensional. It is probably something obvious but I am not getting it. Thanks for any help. -Roy ***

[R] Xtractomatic version 3.3.2 now available on CRAN

2017-05-23 Thread Roy Mendelssohn - NOAA Federal
help in getting this on CRAN. List of changes below, as always the development version is available at https://github.com/rmendels/xtractomatic -Roy • Fixes problem with newer versions of Apache Tomcat handling of special characters in URLS • dtype as number no longer allowed

Re: [R] Can this be done in ggplot?

2017-04-14 Thread Kenneth Roy Cabrera Torres
A very dirty solution. I hope someone can give a better solution: library(ggplot2) set.seed(1) df <- expand.grid(g = factor(1:4), f = factor(c("a", "b", "c"))) df <- df[-1, ] # some factors are not present in certain groups df$v <- runif(nrow(df)) library(dplyr) df <- df %>% arrange(g, desc(v))

[R] plotly example that highlights a line

2017-02-28 Thread Roy Mendelssohn - NOAA Federal
ndering if anyone's an example or knows how to set it up, so that instead if I click on the factor in the legend it highlights the line, and hen unhighlights if i select again Thanks for any help. -Roy ** "The contents of this message do not reflect any position of the

[R] Baddperiods and other functions

2017-02-27 Thread Piyush Roy
Is there a way to use baddperiods and other Bloomberg API functions in R through package Rblpapi or any other packages ? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://st

[R] testers sought for xtractomatic-like package

2017-02-03 Thread Roy Mendelssohn - NOAA Federal
RNotebook downloaded from there. Thanks in advance for any help. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ****** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmenta

[R] Extracting first number after * in a character vector

2017-01-23 Thread Abhinaba Roy
Hi, How do I extract the first number after '*' in a vector? The vector is given below > dput(out[1:10]) c(" 1 X[0,SMITH] * 0 0 1 ", " 2 X[0,JOHNSON] * 0 0 1 ", " 3 X[0,WILLIAMS]", "*

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 discourag

Re: [R] Error in R_nc4_open

2017-01-11 Thread Roy Mendelssohn - NOAA Federal
ps://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cfsv2_forecast_ts_9mon/2011/201104/20110401/2011040100/tmax.01.2011040100.";| __truncated__ $ writable : logi FALSE $ id : int 65536 $ safemode : logi FALSE $ format : chr "NC_FORMAT_64BIT" $ is_GMT : logi FAL

[R] xtractomatic v3.2.0

2017-01-04 Thread Roy Mendelssohn - NOAA Federal
affected. Thanks, -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ****** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Cent

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

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
format. This should make clear the basis for the logical tests: > as.numeric(test) [1] 34200 36000 37800 39600 > > as.numeric(hm("10:00")) [1] 36000 > -Roy > On Jan 2, 2017, at 12:39 PM, Joe Ceradini wrote: > > Bingo! Thanks! I somehow couldn't find an ex

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

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
> test > hm("10:00") [1] FALSE FALSE TRUE TRUE > test[test > hm("10:00")] [1] "10H 30M 0S" "11H 0M 0S" -Roy > On Jan 2, 2017, at 12:27 PM, Joe Ceradini wrote: > > Thanks for the reply Roy! > > Perhaps you're showi

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

2017-01-02 Thread Roy Mendelssohn - NOAA Federal
@hour > 9] [1] "10H 0M 0S" "10H 30M 0S" "11H 0M 0S" You are using a logical "and" in your test - so the condition "test@minute > 0" isn't met for 11:00 and therefore it doesn't show up. as both conditions must be met You co

[R] JSON to Dataframe

2016-10-18 Thread Abhinaba Roy
Hi R helpers, I have json inputs from an app which I want to convert to dataframes. Below are the two inputs. Can someone help me in converting these to dataframes *Input1* {"booking":{"id":"54092","createdOn":"2016-10-06T06:29:00.000+","bookingDateTime":"2016-10-08T06:45:00.000+

[R] xtractomatic package is now available in CRAN

2016-10-12 Thread Roy Mendelssohn - NOAA Federal
Bob Simons. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ****** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Scie

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

2016-09-30 Thread Roy Mendelssohn - NOAA Federal
FALSE > $ groups :List of 1 > ..$ :List of 7 > .. ..$ id : int 65536 > .. ..$ name : chr "" > .. ..$ ndims: int 4 > .. ..$ nvars: int 7 > .. ..$ natts: int 13 > .. ..$ dimid: int [1:4(1d)] 0 1 2 3 > .. ..$ fqgn : chr "" > ..

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

2016-09-27 Thread Roy Mendelssohn - NOAA Federal
Please post the code of what you tried, as I have no idea otherwise what did or did not work for you. -Roy > On Sep 27, 2016, at 12:44 PM, Debasish Pai Mazumder wrote: > > Hi Roy, > Thanks for your response. I have tried according your suggestion but it > doesn't work. &

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: > http://nomads.

[R] Variable String formation

2016-09-22 Thread Roy Mendelssohn - NOAA Federal
ot;", collapse="") myComma2 <- paste(rep(',', times = (paramLen-latLoc+1)),sep="", collapse="") paramCommand <- paste0('param <- param[', myComma1, myComma2, 'drop = FALSE]') (paramLen can be 2,3,4 and la

[R] Portfolio Optimization

2016-09-17 Thread Abhinaba Roy
Hi, Has anybody worked on portfolio optimization using Genetic Algorithm in R? Could you please share the code and some references on this topic? Really appreciate your help. Thanks, Abhinaba [[alternative HTML version deleted]] __ R-help@r-

[R] Retrieving data from survey in R Studio

2016-08-18 Thread Barathan Roy Pinas
Hello, I have been given a .csv file and it is not loading. This is what I did. survey=read.csv("http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.csv";) attach(survey) pulse.sf=pulse[smoke==1 & sex==2] pulse.sf Template link here.

[R] Calculate mileage at each 'faildate'

2016-08-10 Thread Abhinaba Roy
Hi R-helpers, - I have a dataframe similar to 'simD'. > dput(simD) structure(list(ID = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("A", "B"), class = "factor"), PRODDATE = structure(c(14655, 14655, 14655, 14655, 14664, 14664, 14664, 14664, 14664, 14664 ), class = "Date"),

[R] Update to the xtractomatic package

2016-08-08 Thread Roy Mendelssohn - NOAA Federal
site https://github.com/rmendels/xtractomatic. Also there is the wonderful "rerddap" package from the rOpenSci folk which is available from CRAN. -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ******

Re: [R] open a zip file

2016-08-07 Thread Roy Mendelssohn - NOAA Federal
bs082016.zip was not found on this server. Your saved file will have the ending ".zip" no matter what, because that is what you called it, but I wouldn't be surprised if it just a txt file with the error message. HTH, -Roy > On Aug 7, 2016, at 6:42 PM, Glenn Schultz wro

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, > > I ca

Re: [R] about netcdf files

2016-07-26 Thread Roy Mendelssohn - NOAA Federal
-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:52 PM, Roy Mendelssohn

Re: [R] about netcdf files

2016-07-26 Thread Roy Mendelssohn - NOAA Federal
try to find a tutorial also to help you along. Thanks, -Roy > On Jul 26, 2016, at 12:07 PM, lily li wrote: > > Thanks for your reply. But it says "Error in (function (classes, fdef, > mtable)): > unable to find an inherited method for function 'brick' for signature

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

2016-07-21 Thread Roy Mendelssohn - NOAA Federal
regression. HTH, -Roy > On Jul 21, 2016, at 2:08 PM, Mark Leeds wrote: > > Hi Jermiah: another possibly faster way would be to use a kalman filtering > framework. I forget the details but duncan and horne have a paper which > shows how a regression can be re-computed each time a ne

  1   2   3   4   >