Help for this page

Select Code to Download


  1. or download this
    > data <- c("2016-03-15 13","2016-03-16 23","2016-03-17 06","2016-03-1
    +8 15","2016-03-19 08","2016-03-20 21")
    > datevec <- strptime(data,"%Y-%m-%d %H")
    > difftime(datevec[-length(datevec)],datevec[-1],units="hours")
    
  2. or download this
    $R->set( 'data', "2016-03-15 13","2016-03-16 23","2016-03-17 06","2016
    +-03-18 15","2016-03-19 08","2016-03-20 21" );
    $R->run( q`datevec <- strptime(data,"%Y-%m-%d %H")` );
    $R->run( q`xx <- difftime(datevec[-length(datevec)],datevec[-1],units=
    +"hours")` );
    @Rres = $R->get('xx');
    print Dumper(\@Rres);
    
  3. or download this
    $VAR1 = [
              [
    ...
                'hours'
              ]
            ];