Skip to contents

Small helper function to define the proper order per individual/site, to arrange the sites/individuals properly within the application. Arranges first on all string letters, and then on the numbers.

Usage

order_string(string = appdata$`CBC regular`$subject_id)

Arguments

string

Character string to be used.

Value

An ordered string.

Examples

order_string(rownames(mtcars))
#>  [1] "AMC Javelin"         "Cadillac Fleetwood"  "Camaro Z28"         
#>  [4] "Chrysler Imperial"   "Datsun 710"          "Dodge Challenger"   
#>  [7] "Duster 360"          "Ferrari Dino"        "Fiat 128"           
#> [10] "Fiat X1-9"           "Ford Pantera L"      "Honda Civic"        
#> [13] "Hornet 4 Drive"      "Hornet Sportabout"   "Lincoln Continental"
#> [16] "Lotus Europa"        "Maserati Bora"       "Mazda RX4"          
#> [19] "Mazda RX4 Wag"       "Merc 230"            "Merc 280"           
#> [22] "Merc 280C"           "Merc 240D"           "Merc 450SE"         
#> [25] "Merc 450SL"          "Merc 450SLC"         "Pontiac Firebird"   
#> [28] "Porsche 914-2"       "Toyota Corolla"      "Toyota Corona"      
#> [31] "Valiant"             "Volvo 142E"