Displaying 1 result from an estimated 1 matches for "scalef".
Did you mean:
scale
2008 Jan 18
1
Selecting rows conditionally between 2 data.frames
...ght 0.65 .... 8.4
... NA NA .... NA
... right 0.8 .... 6
... left 1.20 .... 3
I tried various combination of `which` and `match` but could not make
it work.
I fell back on defining a custom function and applying it over the lines
get.scales <- function(x)
{
if (is.na(x$zoom)) {
scaleF = NA
} else {
scaleF = calib[calib$zoom==x$zoom & calib$place==x$place, "scale"]
}
return(scaleF)
}
and
apply(X, 1, get.scales)
but:
- this is not very practical since using apply apparently converts the
data to an array and looses column titles (i.e. x$size does not work...