79137205

Date: 2024-10-29 12:31:26
Score: 1.5
Natty:
Report link

Unable to convert character to dates

head(lbw) State_Name Birth_Date LMP birthWt M_Age 1 Chandigarh 6/9/24 9/8/23 2.5 10 2 Jharkhand 4/12/24 7/2/23 2.5 10 3 Jharkhand 6/10/24 9/5/23 2.5 10 4 Jharkhand 5/5/24 8/17/23 2.5 10 5 Jharkhand 6/21/24 9/15/23 2.5 10 6 Punjab 6/6/24 9/6/23 2.5 10

lbw$Birth_Date <-as.date(mdy(lbw$Birth_Date)) Error in as.date(mdy(lbw$Birth_Date)) : could not find function "as.date"

#also tried this code

lbw$Birth_Date <-as.date(lbw$Birth_Date, "%m/%d/%y") Error in as.date(lbw$Birth_Date, "%m/%d/%y") : could not find function "as.date"

Don't know where the problem is! Any inputs will be helpful.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: nishant