1,100 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
1
vote
2
replies
88
views
Show the timezone when printing a data frame with a `POSIXct` column
Is there a simple way (i.e., not involoving writing a print() method) to show the timezone when printing a data frame with a POSIXct column ?
as.data.frame(Sys.time())
# Sys.time()
# 1 2025-...
4
votes
2
answers
125
views
as.POSIXct gives different results from vector and single value arguments
I have run into some unexpected behaviour in some fairly old code runnning in the latest release of R. The underlying issue seems to be that as.POSIXct does not correctly parse date/time strings in ...
0
votes
2
answers
93
views
Changing character to POSIXct failure in R
I import a .xlsx-file in which a column has just daytimes like "9:34"(column is set to time). My import function is importing it as character format, I obtain numbers like "0.45836"...
0
votes
1
answer
85
views
Change "3/12/2025 7:57:00 AM" formatted field from excel CSV file that shows in R as character string to POSIXct format: "2025年03月24日 15:30:54" [duplicate]
I am trying to join two data sets, one is a data frame in R and one is a CSV file loaded in to R. There is a date column where the R data frame is in POSIXct format: "2025年03月24日 15:30:54", ...
1
vote
1
answer
111
views
How does the printing of POSIXct times in R work? How can I make the print method print the correct time?
Have a look at the following code:
options(digits.secs = 6)
options(digits = 22)
structure(1743070066.75, class = c("POSIXct", "POSIXt"))
structure(1743070066.76, class = c("...
0
votes
0
answers
51
views
Seeing something weird in Timezone in R
I'm seeing something weird in force_tz in R. I am applying the force_tz function over a list/vector of dates. But the application of this function over the elements in the list are not consistent. The ...
0
votes
1
answer
50
views
Subset dataset by repeating temporal variable (accelerometer data) [duplicate]
I have a dataset from an accelerometer, which consists in a time variable and measurements in the 3 axis. I have 50 measurements per second, and my ultimate goal is to subset those measurements, i.e. ...
1
vote
2
answers
224
views
Correcting date-times with setoffs to UTC+1
This question might be based on my ignorance on how date-times work, but I struggle with timezone transformations of some logger data. I have multiple loggers which were read out at multiple time ...
0
votes
1
answer
83
views
Parsing and working with microsecond-precision timestamps in R using dplyr
I'm planning to collect data with microsecond-precision timestamps in the format "DD/MM/YY HH:MM:SS.mmmuuun"? How would I parse in R and keep working in a dplyr pipeline?
Example:
"26/...
0
votes
0
answers
33
views
Associate rows with time values to night with unique identifier
I have the data frame (moon_data) below with moon altitude and illumination for each hour of the days.
date altitude illum
9 2020年08月31日 05:30:00 -0.29518673 0.9676100
10 ...
0
votes
1
answer
69
views
Converting datetime from chr to datetime format using POSIXct function in R
I am learning to code in R and currently doing the Bellabeat Google Data Analytics Capstone project. For this, I need to transform a column with datetime values (i.e. 4/12/2016 12:00:00 AM) formatted ...
0
votes
0
answers
101
views
POSIXct conversion from character variable to datetime that causes year to start with '00xx' rather than '20xx'. How to fix this?
I am importing multiple csv files from one folder and I've noticed that when I do a conversion to convert a character datetime stamp, the year will read as '0024' rather than '2024'. How do I fix it ...
0
votes
0
answers
104
views
Error checkPrep(mydata, vars, type, remove.calm = FALSE) in R
I get an error
"checkPrep(mydata, vars, type, remove.calm = FALSE)
Can't find the variable(s) ch4"
when using the function trajLevel in OpenAir package (R).
I attach screenshots and my code.
...
2
votes
2
answers
82
views
Daylight saving overlap, when casting strings to POSIX in R
I have a file of datetime strings which I read in, with the added information, if it is daylight saving time or not, so for example the format:
"2024年10月27日 02:30:00 CEST"
But this time ...
3
votes
0
answers
102
views
plot() error: seq.int(0, to0 - from, by) : 'to' must be a finite number in Windows and Macos
Could anyone help me to understand why:
xt = as.POSIXct(c("2023年09月03日 12:00:00", "2023年09月03日 16:01:40"), tz = "Chile/Continental")
plot(xt, c(1, 2), type = "l")
...