Here is my data:
> factors.table
# A tibble: 10 x 7
var nfacts corr corrAbs l50 l70 l75
<chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 mpg 127 0.837 0.837 1 1 1
2 cylinders 5 -0.759 0.759 1 1 1
3 displacement 81 -0.753 0.753 1 1 1
4 horsepower 93 -0.667 0.667 1 0 0
5 weight 346 -0.758 0.758 1 1 1
6 acceleration 95 0.347 0.347 0 0 0
7 year 13 0.430 0.430 0 0 0
8 origin 3 0.514 0.514 1 0 0
9 name 301 0.264 0.264 0 0 0
10 mpg01 2 1 1 1 1 1
I am trying to compute the sums of rows 5-7 as suggested here (Efficiently sum across multiple columns in R) but I am getting this error:
> rowSums(factors.table[,5:7])
Error in weekSum(dat, start, end, c) :
argument "start" is missing, with no default
I have never seen weekSum
before and it doesn't appear in R when I search help(weekSum)
.