Replace values in data frame with other values according to a rule

前端 未结 4 1439
时光说笑
时光说笑 2020-12-16 15:19

I am an beginner in R and don`t find a solution for the following problem. Any help would be really appreciated!

I have a data.frame and want to replace certain valu

4条回答
  •  青春惊慌失措
    2020-12-16 15:57

    merge() might also be of help.

    yearend<-c("19921231","19931231","19941231")
    year<-c("1992","1993","1994")
    map = data.frame(yearend,year)
    
    merge(dataframe,map,by.x='date',by.y='yearend')
    

提交回复
热议问题