Changes between Version 4 and Version 5 of udg/ecoms/RPackage/examples/pointSelection
- Timestamp:
- Jun 17, 2014 12:40:34 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
udg/ecoms/RPackage/examples/pointSelection
v4 v5 14 14 }}} 15 15 16 The returned object contains all the necessary information for data representation (geo-location, time ...). In the next lines we plot the loaded time series for each member :16 The returned object contains all the necessary information for data representation (geo-location, time ...). In the next lines we plot the loaded time series for each member. The element `Data` contains the data itself. In this case, it is a 2D array with the dimensions `time` (92 days for June, July and August) and `member` (10 members selected), as indicated by the `dimensions` attribute: 17 17 18 18 {{{ 19 > str(ex.point$Data) 20 num [1:92, 1:10] 19.7 24.4 24.4 24.5 26.6 ... 21 - attr(*, "dimensions")= chr [1:2] "time" "member" 19 22 }}} 23 24 In the following example we plot the time series with the multi-member mean and its dispersion (interquartilic range 25-75): 25 26 {{{ 27 > quartiles <- apply(ex.point$Data, MARGIN = 1, FUN = quantile, probs = c(.25,.75)) 28 > ens.mean <- rowMeans(ex.point$Data) 29 > dates <- ex.point$Dates$start 30 > plot(dates, ens.mean, ylim = range(ex.point$Data), ty = 'n', ylab = "tas - 12UTC", xlab = "time") 31 > polygon(x = c(dates, rev(dates)), y = c(quartiles[1, ], rev(quartiles[2, ])), border = "transparent", col = rgb(0,0,1,.4)) 32 > lines(dates, ens.mean) 33 }}} 34 35 [[Image(image-20140617-123935.png)]] 36 37 20 38 21 39