Comments (6)
Hi @EamonnMallon,
Thanks for reporting. I will look into that. I am in a bit of a busy time ATM, but should have some time next week. Don't hesitate to update or remind me
from ggetho.
For info
dt[, phase := ifelse(t %% hours(24) < hours(12), "L", "D")]
creates the same error
Error: Incompatible classes: <numeric> %% <Period>
but
dt[, phase := ifelse(as.period(t) %% hours(24) < hours(12), "L", "D")]
works.
So I guess it is sometime to do with t being a numeric but timewrap needing period data?
from ggetho.
dt_curated$t<-as.period(dt_curated$t) # doesn't work
ggetho(dt_curated, aes(y=asleep, colour=as.factor(sugar)), time_wrap = hours(24)) + stat_pop_etho() + stat_ld_annotations() + facet_grid(as.factor(agar) ~ .) + scale_y_continuous(name= "Fraction of time sleeping",labels = scales::percent)
Just trying to change it to period before running the command doesn't work
from ggetho.
ggetho(dt_curated, aes(y=asleep, colour=sleepDeprived), time_wrap = mins(1440)) +
stat_pop_etho() +
stat_ld_annotations() +
scale_y_continuous(name= "Fraction of time sleeping", limits = c(0,1), labels = scales::percent)
This worked. That is when I expressed the timewrap in minutes. So my issue is completely resolved. Not sure if it was due to my data or a more general problem.
from ggetho.
I had this issue as well. It comes from a conflict with the lubridate package. I don't load that package anymore and it seems to fix the issue. I'm not sure where lubridate is being used in the rest of the code, but I haven't run into any issues as of yet
from ggetho.
I'll give that a try as well. Thanks @epetersen-sci
from ggetho.
Related Issues (20)
- plotting problems after updating ggplot HOT 3
- package βggethoβ is not available (for R version 3.6.3) HOT 2
- periodogram and spectrogram assume an id column named `id`
- CRAN packages failing examples with \donttest HOT 1
- Polar coordinate plots - grey centre circle and activity lines not continuous HOT 2
- time offset and ld annotations fails on polar coordinates when time offset is not 0
- first and last points of stat_stat_etho should join on polar coordinates
- Changing color scale for stat_tile_etho/adding geoms HOT 1
- ggetho() multiplot data differs in adjacent rows HOT 3
- Bar plot functionality for ggetho HOT 1
- time_wrap when some individuals have NA values HOT 3
- How can we export the processed data to csv files?
- Movement Classification and Visualization HOT 6
- Specifying axis limits via scale_y_continuous CHANGES DATA ? HOT 1
- ggperio Issue HOT 5
- Plot different days' data on the same graph HOT 2
- time-wrap doesn't match expected length HOT 2
- Issues with next version of ggplot2
- Double plot controls on actogram
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggetho.