-
Notifications
You must be signed in to change notification settings - Fork 1k
error using function setkey #3496
Copy link
Copy link
Closed
Description
I know how to avoid this error, but I donot know why this error happen if I run it in this way.
datain <- data.frame(
chrom = c("chr17", "chr4", "chr5", "chr13"),
map = c(81061047, 106061533, 40102442, 73791553),
rs = c("rs75954926", "rs7679673", "rs7708610", "rs78341008"),
start = c(79061048, 104061534, 38102443, 71791554),
end = c(83061048, 108061534, 42102443, 75791554)
)
datain
datain$chr<-datain$chrom
setDT(datain)
setkey(datain, chr, start, end)
datain
Thanks!
Alex
Reactions are currently unavailable