Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in charToDate(x) : character string is not in a standard unambiguous format #95

Open
Akshay-Kalwar opened this issue Mar 28, 2018 · 1 comment

Comments

@Akshay-Kalwar
Copy link

I am trying to automate the date conversion of different columns in a table
here is what my table looks like
DAsset1 PAsset1 DAsset2 PAsset2 DAsset3 PAsset3
1 38721 95.53 38812 1734.55 38812 1123.60
2 38722 93.55 38814 1705.95 38814 1093.50
3 38723 94.33 38817 1695.60 38817 1202.85
4 38726 94.70 38819 1699.75 38819 1197.65
5 38727 94.78 38820 1701.85 38820 1193.50
6 38729 90.55 38824 1624.50 38824 1217.55

So i want to change date format for DAsset1,DAsset2,DAsset3
in the following way

for(i in 1:n)
{
if(i %% 2!=0)
{
Data[i]=as.Date(paste0("Data$DAsset",i),origin="1899-12-29",format=)
Data[i]
next
}
}

But i am getting this error
Error in as.Date.default(Data[f]) : do not know how to convert 'Data[f]' to class “Date”

@Akshay-Kalwar Akshay-Kalwar changed the title Error in as.Date.default(Data[f]) : do not know how to convert 'Data[f]' to class “Date” Error in charToDate(x) : character string is not in a standard unambiguous format Mar 28, 2018
@jdeboer
Copy link

jdeboer commented Jun 30, 2018

This issue appears to be off topic and may be more suitable on Stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants