# Thanks again to everyone who provided suggestions.
# I was curious about which approaches would be the fastest... so a
little benchmarking
# My approach was by far the worst :)
# The approach suggested by Duncan Murdoch and Peter Langfelder, based
on indexing , was by far the fastest (~
Remove the around the options. You also have to put it in a sapply, as
switch only works on single values. But I wouldn't call this optimal...
elevation.DM -sapply(Population,switch, CO= 2169, CN = 1121,
Ga =500, KO = 2500, Mw = 625, Ng = 300 )
Cheers
Joris
On
2 matches
Mail list logo