[R] extend limited dimension in netcdf

2017-09-07 Thread raphael.felber
Dear all I have to combine 3D netCDF files (lon, lat, time). The files contain data of one month and I need a year file containing all the data. Because the attributes of all files are the same, I copied the first file and appended the data of the other months. This went well until the

Re: [R] How to benchmark speed of load/readRDS correctly

2017-08-23 Thread raphael.felber
Hi there Thanks for your answers. I didn't expect that this would be so complex. Honestly, I don't understand everything you wrote since I'm not an IT specialist. But I read something that reading *.rds files is faster than loading *.Rdata and I wanted to proof that for my system and R

Re: [R] How to benchmark speed of load/readRDS correctly

2017-08-23 Thread raphael.felber
Hi Bill Thanks for your answer and the explanations. I tried to use garbage collection but I'm still not satisfied with the result. Maybe the question was not stated clear enough. I want to test the speed of reading/loading of data into R when a 'fresh' R session is started (or even after a

[R] How to benchmark speed of load/readRDS correctly

2017-08-22 Thread raphael.felber
Dear all I was thinking about efficient reading data into R and tried several ways to test if load(file.Rdata) or readRDS(file.rds) is faster. The files file.Rdata and file.rds contain the same data, the first created with save(d, ' file.Rdata', compress=F) and the second with saveRDS(d, '

Re: [R] ncdf4: Why are NAs converted to _FillValue when saving?

2017-08-15 Thread raphael.felber
Dear Dave Thanks a lot for your answer. I agree that it is more an R issue than a package issue. But it's the first time I encountered such a problem. For my R version (v3.4.1) on x86_64-w64-mingw32 the second part of your answer only holds for data_temp2; if I do any manipulation to

[R] ncdf4: Why are NAs converted to _FillValue when saving?

2017-08-14 Thread raphael.felber
Dear all I'm a newbie regarding netcdf data. Today I realized that I maybe do not understand some basics of the netcdf. I want to create a *.nc file containing three variables for Switzerland. All data outside of the country are NAs. The third variable is calculated from the first two

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Hi Marc That's a workaround I can use. Thanks. I'm a newbie regarding netCDF data. Is there any information I'm losing when switching between the packages? Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 15:13 An: Felber Raphael Agroscope

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Dear Marc Thanks for your remark. I don't want to use both packages. I mentioned the package RNetCDF to show that there is a similar function I' d like to use. Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 14:51 An: Felber Raphael Agroscope

[R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Dear all For a model I need to combine several netCDF files into one (which works fine). For better overview I'd like to delete/remove some of the attributes. Is there a simple way doing this? I'm using the package netcdf4, which creates an object of class(nc) = "ncdf4". It seems that for

[R] Problem with POSIXt time zone

2014-02-14 Thread raphael.felber
Hello I have to convert character strings into POSIXt format. And would like to combine two of them. The following code does not what I expect. The single conversions of the character strings, gives a the date and time with time zone GMT as I expect. However if I combine two date time with c()

Re: [R] Problem with POSIXt time zone

2014-02-14 Thread raphael.felber
Thanks a lot for the fast answer. Sys.setenv(TZ=GMT) is a good solution for me. Best regards Raphael -Ursprüngliche Nachricht- Von: Frede Aakmann Tøgersen [mailto:fr...@vestas.com] Gesendet: Freitag, 14. Februar 2014 10:02 An: Felber Raphael Agroscope; r-help@r-project.org Betreff:

[R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread raphael.felber
Good morning! I have the following data frame (df): X.outer Y.outer X.PAD1 Y.PAD1 X.PAD2 Y.PAD2 X.PAD3 Y.PAD3 X.PAD4 Y.PAD4 73 574690.0 179740.0 574690.2 179740.0 574618.3 179650 574729.2 179674 574747.1 179598 74 574680.6 179737.0 574693.4 179740.0 574719.0 179688 574831.8

[R] What is wrong with this plotting?

2012-01-06 Thread raphael.felber
Hello I have a data frame, called input, like this: DateTime CO2_A1cont 1 2011-04-08 11:47:01 NA 2 2011-04-08 12:42:018.9 3 2011-04-08 13:07:01 NA 4 2011-04-08 13:32:01 NA 5 2011-04-08 13:57:01 7.556482 6 2011-04-08 14:22:01 NA 57