Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7874819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:52:36+00:00 2026-06-03T02:52:36+00:00

I have been given a challenging problem and was hoping for some recommendations. I

  • 0

I have been given a challenging problem and was hoping for some recommendations.
I have activity data that I would like to display graphically and am looking for a package or program that could be used to solve my problem (preferably R).

The data is count of movements (Activity) collected hourly (Time of day) for 3 weeks (Calendar Date) or more with associated variables (Food/Vegetation).

Typically, as Ive been told the data can be processed and graphed in a program called Clocklab that is a Matlab product. However, the added complication is the desire to plot this data according to a classification of feeding groups. I was trying to find an equitable program/package in R for this but have come up short.

What the data looks like is simply:

Activity     time of day      Food type         Calendar Date
       0           01:00              B            03/24/2007
      13           02:00            ---            03/24/2007
       0           03:00              B            03/24/2007
       0           04:00              B            03/24/2007
       :               :              :                     :
    1246           18:00              C            03/24/2007
    3423           19:00              C            03/24/2007
       :               :              :                     :
       0           00:00            ---            03/25/2007

This data is circadian, circular, activity budgeting and I would like to have a graph that may be 3-D in nature that will show the diet selection and how much activity is associated with that diet plotted over time for multiple days/weeks. I would do this by individual and then at a population level. Ive a link to the program and example plot of what is typically produced by the program Clocklab.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:52:37+00:00Added an answer on June 3, 2026 at 2:52 am

    Absent real data, this is the best I can come up with. No special packages required, just ggplot2 and plyr:

    #Some imagined data
    dat <- data.frame(time = factor(rep(0:23,times = 20)),
                    count = sample(200,size = 480,replace = TRUE),
                    grp = sample(LETTERS[1:3],480,replace = TRUE))
    
    head(dat)
      time count grp
    1    0    79   A
    2    1    19   A
    3    2     9   C
    4    3    11   A
    5    4   123   B
    6    5    37   A
    
    dat1 <- ddply(dat,.(time,grp),summarise,tot = sum(count))
    
    > head(dat1)
      time grp tot
    1    0   A 693
    2    0   B 670
    3    0   C 461
    4    1   A 601
    5    1   B 890
    6    1   C 580
    
    ggplot(data = dat1,aes(x = time,y  = tot,fill = grp)) + 
        geom_bar(stat = "identity",position = "stack") + 
        coord_polar()
    

    enter image description here

    I just coded the hours of the day as integers 0-23, and simply grabbed some random values for Activity counts. But this seems like it’s generally what you’re after.

    Edit

    A few more options based on comments:

    #Force some banding patterns
    xx <- sample(10,9,replace = TRUE)
    dat <- data.frame(time = factor(rep(0:23,times = 20)),
                    day = factor(rep(1:20,each = 24),levels = 20:1),
                    count = rep(c(xx,rep(0,4)),length.out = 20*24),
                    grp = sample(LETTERS[1:3],480,replace = TRUE))
    

    Options one using faceting:

    ggplot(dat,aes(x = time,y = day)) +
        facet_wrap(~grp,nrow = 3) + 
        geom_tile(aes(alpha = count))
    

    enter image description here

    Option two using color (i.e. fill):

    ggplot(dat,aes(x = time,y = day)) +
        geom_tile(aes(alpha = count,fill = grp))
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been given a file that I would like to extract the useful
I have been given some html that look like this (I have no control
I have been given a task to display data on an ASP .net page
I have a challenging problem I've been battling for some time now. The Problem:
I have been given a set of historic data that requires line charting for
I have been given a textfile which contains data on time sheet. That line
I have been given the task of re-writing some libraries written in C# so
While clensing PII from test data I have been stuck with a challenging scenario:
I have been given the following: <div class=elf>Label 1</div> <div class=eff>Data 1</div> <div class=elf>Label
I have been given a task to create a Python file that will take

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.