fxrates <-rbind(fxrates,c("EODMRS","USD","M",1,1,"17-APR-2019",1))
Warning message: In
[<-.factor
(*tmp*
, ri, value = "USD") :
invalid factor level, NA generated
Guys, Do you know why second cell (with USD) is not generated?
We can change the factor
columns to character
and rbind
with a list
of values as the types can be different and vector
(constructed withc
) can store only a single type
i1 <- sapply(fxrates, is.factor)
fxrates[i1] <- lapply(fxrates[i1], as.character)
rbind(fxrates,list("EODMRS","USD","M",1,1,"17-APR-2019",1))
factor
columns tocharacter
and it would be fine i..ei1 <- sapply(fxrates, isfactor); fxrates[i1] <- lapply(fxrates[i1], as.character)
– akrun