Hey everyone,? ? I am new to R and I am trying to find the index of all of the values in a data.frame. ? I have a .csv file that outputs pass, fail, error, and indeterminate readings. ?I have passed the data from the .csv to a data.frame, have performed the proper matching criteria to generate a data.frame of 0's and 1's, and am outputting the total 1's (therefore matches) found. ?I would also like to find the index of these values so that I can output a matrix containing the date and data point which has produced that match. Can anyone help set me in the right direction? here is a github link to the code I have already generated for more clarity on the project: https://github.com/KevinKowitski/datasciencecoursera/blob/master/ErrorCount.R Thank you,? Kevin
David Winsemius
2015-Jun-10 19:21 UTC
[R] Finding index of specific values in a data.frame
On Jun 10, 2015, at 9:41 AM, Kevin Kowitski wrote:> Hey everyone, > > I am new to R and I am trying to find the index of all of the values in a data.frame. I have a .csv file that outputs pass, fail, error, and indeterminate readings. I have passed the data from the .csv to a data.frame, have performed the proper matching criteria to generate a data.frame of 0's and 1's, and am outputting the total 1's (therefore matches) found. I would also like to find the index of these values so that I can output a matrix containing the date and data point which has produced that match. Can anyone help set me in the right direction? > > here is a github link to the code I have already generated for more clarity on the project: > > https://github.com/KevinKowitski/datasciencecoursera/blob/master/ErrorCount.RI think the coursera homework assignments are supposed to be discussed in a course-provided web-mediated mailing list. It's unclear from the presentation why the `which` and `%in%` do not provide a solution.> > Thank you, > Kevin > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
I did not realize that there is a coursers assignment similar to this. I am running this for data analysis at work, not for coursers. However I will look through the link you provided and see if it is applicable. Thanks, Kevin Sent from my iPhone> On Jun 10, 2015, at 3:21 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jun 10, 2015, at 9:41 AM, Kevin Kowitski wrote: >> >> Hey everyone, >> >> I am new to R and I am trying to find the index of all of the values in a data.frame. I have a .csv file that outputs pass, fail, error, and indeterminate readings. I have passed the data from the .csv to a data.frame, have performed the proper matching criteria to generate a data.frame of 0's and 1's, and am outputting the total 1's (therefore matches) found. I would also like to find the index of these values so that I can output a matrix containing the date and data point which has produced that match. Can anyone help set me in the right direction? >> >> here is a github link to the code I have already generated for more clarity on the project: >> >> https://github.com/KevinKowitski/datasciencecoursera/blob/master/ErrorCount.R > > I think the coursera homework assignments are supposed to be discussed in a course-provided web-mediated mailing list. > > It's unclear from the presentation why the `which` and `%in%` do not provide a solution. >> >> Thank you, >> Kevin >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius > Alameda, CA, USA > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Oh I see, I'm sorry I just plopped it in GitHub for ease of help, I didn't notice I put it under coursera work. This task is not related to coursera, I will separate it out. -Kevin Sent from my iPhone> On Jun 10, 2015, at 3:21 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jun 10, 2015, at 9:41 AM, Kevin Kowitski wrote: >> >> Hey everyone, >> >> I am new to R and I am trying to find the index of all of the values in a data.frame. I have a .csv file that outputs pass, fail, error, and indeterminate readings. I have passed the data from the .csv to a data.frame, have performed the proper matching criteria to generate a data.frame of 0's and 1's, and am outputting the total 1's (therefore matches) found. I would also like to find the index of these values so that I can output a matrix containing the date and data point which has produced that match. Can anyone help set me in the right direction? >> >> here is a github link to the code I have already generated for more clarity on the project: >> >> https://github.com/KevinKowitski/datasciencecoursera/blob/master/ErrorCount.R > > I think the coursera homework assignments are supposed to be discussed in a course-provided web-mediated mailing list. > > It's unclear from the presentation why the `which` and `%in%` do not provide a solution. >> >> Thank you, >> Kevin >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius > Alameda, CA, USA > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.