'R. Convert TimeStamp column from DataFrame to Date Format column
I have got a question.
There are a column with timestamp records like '1643410273'(summary more than 1.2M records). How can I transform it into Date format?
I created this code (R Language):
mydata <- read.csv("summary_dataset.csv")
unique(mydata$Callsign)
flight <- mydata[mydata$Callsign == "AFR228",]
AltitudeValue <- flight$Altitude
UTC_Timestamp <- flight$Timestamp
Flight_Date <- vector()
for (i in 1:length(UTC_Timestamp)){
Flight_Date[i]=as.POSIXct(UTC_Timestamp[i], origin='1970-01-01', tz="UTC")
}
Flight_Date
But, in result, vector Flight_Date was filled Timestamp records. What's wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
