navr 0.1.5
  • Reference
  • Articles
    • Area analysis
    • Basic use
    • Loading and preprocessing
    • onset-search
    • Plotting functions

    Loading and preprocessing

    Lukáš ‘hejtmy’ Hejtmánek

    2020-07-02

    loading-preprocessing.Rmd
    library(navr)
    #> Loading required package: ggplot2
    #> Warning: package 'ggplot2' was built under R version 3.6.3
    library(ggplot2)
    obj <- navr_object

    Preprocessing

    We can prepare necessary columns (time diffs, speeds, distances) with a single function.

    colnames(obj$data)
    #> [1] "timestamp"  "rotation_x" "rotation_y" "fps"        "input"     
    #> [6] "position_x" "position_z" "position_y"
    obj <- prepare_navr(obj)
    colnames(obj$data)
    #>  [1] "timestamp"        "rotation_x"       "rotation_y"      
    #>  [4] "fps"              "input"            "position_x"      
    #>  [7] "position_z"       "position_y"       "time_since_start"
    #> [10] "time_diff"        "distance"         "distance_total"  
    #> [13] "speed"            "rotation_x_diff"  "rotation_y_diff"

    Removing too large speeds/teleports

    #this function picks unreal speeds
    i_speeds <- pick_unreal_speeds(obj, 3, "std")
    
    #this function removes given speed AND distance measurements and recalculates total distance
    obj <- remove_unreal_speeds(obj, indices = i_speeds, total_recalculate = T)

    Contents

    • Preprocessing
    • Removing too large speeds/teleports

    Developed by Lukáš Hejtmánek.

    Site built with pkgdown 1.3.0.