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

  • Home
  • SEARCH
  • 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 7075979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:14:34+00:00 2026-05-28T06:14:34+00:00

I have a large data set of GPS collar locations that have a varying

  • 0

I have a large data set of GPS collar locations that have a varying number of locations each day. I want to separate out only the days that have a single location collected and make a new data frame containing all their information.

month    day    easting    northing    time    ID
  6       1     #######    ########    0:00    ##
  6       2     #######    ########    6:00    ##
  6       2     #######    ########    0:00    ##
  6       3     #######    ########    18:00   ##
  6       3     #######    ########    12:00   ##
  6       4     #######    ########    0:00    ##
  6       5     #######    ########    6:00    ##

Currently I have hashed together something, but can’t quite get to the next step.

library(plyr)
dog<-count(data1,vars=c("MONTH","day"))
datasub1<-subset(dog,freq==1)

This gives me a readout that looks like

    MONTH day freq
1       6  29    1
7       7   5    1
8       7   6    1
10      7   8    1
12      7  10    1

I am trying to use the values of the Month and day to pull out the rows that contain them from the main dataset so that I can make a data frame containing only the points with a frequency of 1 but that contains all the associated data. I’ve got to this point:

sis<-c(datasub1$MONTH)
bro<-c(datasub1$day)
datasub2<-subset(data1,MONTH==sis&day==bro)

… but that doesn’t give me anything, personally it makes intuitive sense (R beginner) that it should subset out the rows that contain both the values of bro and sis.

Any help would be greatly appreciated.

  • 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-05-28T06:14:35+00:00Added an answer on May 28, 2026 at 6:14 am

    Revised:

    datasub2<-subset(data1, paste(month,day,sep=".") %in% paste(datasub1$MONTH, datasub1$day,sep=".") )
    

    It’s not very likely (and quite possibly impossible) that any particular MONTH item will exactly equal that subset. You are presumably more interested in whether a combo of “Month.Day” is in the combo sets of “Month.Day” in the datasub1. You have mixed up the capitalization that returns from the count() function if the headers were as you illustrated.

    > dog
      month day freq
    1     6   1    1
    2     6   2    2
    3     6   3    2
    4     6   4    1
    5     6   5    1
    > datasub1
      month day freq
    1     6   1    1
    4     6   4    1
    5     6   5    1
    > datasub2
      month day easting northing time ID
    1     6   1 ####### ######## 0:00 ##
    6     6   4 ####### ######## 0:00 ##
    7     6   5 ####### ######## 6:00 ##
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file that goes thru a large data set and splits out
I have a large data set that is updated once a day. I am
I have a large data set that I want to clean up for the
I have a large data set and I want to write a custom merge
I have a large data set that I'm working with in excel. About 1000+
I have a very large possible data set that I am trying to visualize
I have a large set of data that is generated from a web service
I have large data set, which I want to query. The query does not
A newbie question from me, please. I have a large data set that I
I have a large data set and i want to convert it into array.

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.