Loading data issues

前端 未结 1 1929
挽巷
挽巷 2021-01-26 01:49

Datalink: Data

Code:

 ccfsisims <- read.csv(file = \"F:/Purdue University/RA_Position/PhD_ResearchandDissert/PhD_Draft/GTAP-CGE/GTAP_NewAggDatabase/Ne         


        
相关标签:
1条回答
  • 2021-01-26 02:42

    when you load ccfsisims do str(ccfsisims )...(get in the habit of doing this)

    you will see that pSVIPM is a factor. So as.numeric will simply change the factors to numbers in the order the levels appear.

    Because if you look at your csv you have #DIV/0! characters in there.

    try it yourself:

    > length(ccfsisims$pSVIPM[ccfsisims$pSVIPM == "#DIV/0!"])
    [1] 350
    
    0 讨论(0)
提交回复
热议问题