简体   繁体   English

替换 R 中一个单元格上的日期值

[英]Replace the date value on one cell in R

I would replace the date value in a single cell, but I didn't find the way to do...我会替换单个单元格中的日期值,但我没有找到方法......

## dataframe = these_ac
## Anonymat = one of the variables
## these_ac$Anonymat == 17725 : the ligne I want to select
## entree = a date variable

these_ac[these_ac$Anonymat == 17725, "entree"] <- 1993-03-22 

these_ac["entree"][these_ac["Anonymat"] == 17725] <- "22/03/1993"

I think it's one way to do this.我认为这是一种方法。

It works in my case.它适用于我的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM