Re: [R] halting with errors

2023-09-18 Thread Duncan Murdoch
You can use try() or tryCatch(). The former is simpler, the latter is more flexible. For example: result <- try(read_html(“https://timeseries.sepa.org.uk/KiWIS/KiWIS?service=kisters&type=queryServices&datasource=0&request=getTimeseriesValues&ts_path=1/15016/Q/15m.Cmd&from=2015-01-01&to=2015

[R] halting with errors

2023-09-18 Thread Nick Wray
Hello I am downloading flow data from the UK national river flow archive (NRFA). I have code which works (thanks to previous help on r-help) but the problem is that before I make a call for the data for that particular year I don’t know whether the data exists for that particular year and catchme