Ordering Merged data frames

后端 未结 1 1593
旧时难觅i
旧时难觅i 2021-01-15 14:03

As a fairly new R programmer I seem to have run into a strange problem - probably my inexperience with R

After reading and merging successive files into a single dat

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 14:22

    Check whether z$lab_id is a factor (with is.factor(z$lab_id)).

    If it is, try

    z$lab_id <- as.character(z$lab_id)
    

    if it is supposed to be a character vector; or

    z$lab_id <-    as.numeric(as.character(z$lab_id))
    

    if it is supposed to be a numeric vector.

    Then order it again.

    Ps. I had previously put these in the comments.

    0 讨论(0)
提交回复
热议问题