Hi Sergy,
I also faced a similar issue when invoking the PAL library. I also face this issue while executing a few vector based codes in R. On further research I found its way the numbers are treated in R. R treats numbers as "numeric" (double in C and other languages). Numeric values are physically stored without any extra leading or trailing zeroes. Thus, the declared precision and scale of a column are maximums, not fixed allocations. (In this sense the numeric type is more akin to varchar(n) than to char(n).) The actual storage requirement is two bytes for each group of four decimal digits, plus three to eight bytes overhead. In addition to ordinary numeric values, the numeric type allows the special value NaN, meaning "not-a-number"
This changes the treatment of null values. Most classes in R accept numeric values as opposed to integer. If you have null values in a column declared as integer R does not know how to treat it and throws an error. There are some conversions you need to do using functions like as.numeric or storage.mode to declare your data set as numeric and than run the algorithms. You can also change the column type to double.
I had faced this issue while doing a stock simulator where my default dataset was throwing error similar to above. I found out that there were null values in my dataset that were treated as NA since datatpe was integer. On changing the storage mode to numeric for the dataset it worked. I may not be 100% correct here but this is what I could gather from R forums that I visited to solve my error. Hope it helps you a little.