[R] Mailinglist

PIKAL Petr petr@pik@l @ending from prechez@@cz
Wed Jan 9 09:39:10 CET 2019


Hm

If I understand from your description correctly, probably aggregate could do it.

with(gmoji_passivedata, aggregate(value, list(probetype, participants), length)

However posting part of your dataset, as Richard suggested, would clear the matter.

Devil is in details, you probably intend to elaborate your results further and it is always good to have appropriately structured results.

Cheers
Petr

From: Rachel Thompson <rachel.thompson using student.uva.nl>
Sent: Tuesday, January 8, 2019 4:24 PM
To: PIKAL Petr <petr.pikal using precheza.cz>
Cc: r-help mailing list <r-help using r-project.org>
Subject: Re: [R] Mailinglist

Hi

Thank you for your help and suggestions!
I have tried a few things and ask help from lots of people online!

My problem is that I am not able to share the database! I tried to recreate one but I wasn't successful.
So I found a way to analyze each subject individually, but I do not know how to perform the same steps for all of the subjects at once.
But I just wanted to share what I did, since you tried to help me!

This is what I did.
I stored all the column names in a vector named "Names"
names=c("participants","id","participantid","key","probetype","time","timespecific","value","valuespecified","valuedetailed","period","periodspecified")

colnames(gmoji_passivedata)=names

I used this code to find the number of participants in the dataset

length(unique(gmoji_passivedata$participants))
The number of participants is 44

I used this code to find the unique ID for every participant

library(plyr)
> count(gmoji_passivedata,”participants")
From the dataset, I selected one participant ""U_..."
I used subset data

participant1=subset(gmoji_passivedata,participants=="U_0139cf62_e615_41f7_a4cc_878c0490c510")


With the table code
table(p1$probetype) I found the counts of all the different values of the probe type column

edu.mit.media.funf.probe.builtin.ActivityProbe
                                                                      16167
edu.mit.media.funf.probe.builtin.BluetoothProbe
                                                                      405
  edu.mit.media.funf.probe.builtin.CallLogProbe
                                                                      1427
   edu.mit.media.funf.probe.builtin.ScreenProbe
                                                                      1791
     edu.mit.media.funf.probe.builtin.WifiProbe
                                                                       5386

The count for the call log probe for the selected participant is 1427

There was only one participant with sms probe for the rest of the participant the count of sms probe is 0

For the screen probe and activity probe I found the total count (1791 and 16167)

For screen probe, I used a subset code and set the value detailed column to false and true

screenon_false=subset(p1,valuedetailed=="False") (this participant 875)
screenon_true=subset(p1,valuedetailed=="True")   (this participant 916)

and for activity probe to none, low and high to find the required values

activity_none=subset(p1,valuedetailed=="none")   (this participant 12900)
activity_low=subset(p1,valuedetailed=="low")     (this participant 1050)
activity_high=subset(p1,valuedetailed=="high")   (this participant 2217)


I did this for each participant

Best,

Rachel

On Mon, Jan 7, 2019 at 3:56 AM PIKAL Petr <petr.pikal using precheza.cz<mailto:petr.pikal using precheza.cz>> wrote:
Hi Rachel.

You already have got several suggestions, but results depend on structure of your data. The best way from your side would be just copy a part of your data directly to email and preferable way is to use "dput".

Assuming your data already transfered to R are called "mydata".

You can just copy otput of

dput(mydata[1:30,])

to your next mail.

Cheers
Petr


> -----Original Message-----
> From: R-help <r-help-bounces using r-project.org<mailto:r-help-bounces using r-project.org>> On Behalf Of Rachel Thompson
> Sent: Sunday, January 6, 2019 7:49 PM
> To: Rich Shepard <rshepard using appl-ecosys.com<mailto:rshepard using appl-ecosys.com>>
> Cc: r-help mailing list <r-help using r-project.org<mailto:r-help using r-project.org>>
> Subject: Re: [R] Mailinglist
>
> Hi Rich,
>
> I really feel lost at this point.
> I need a code that helps me count the phone activity level(high/low/none),
> the screen activity (on/off) and the amount calls and SMS of each subject.
>
> 1. I want to have a summary of how many times a specific subject got called
> (CallLogProbe)
> 2. I want to have a summary of how many times a specific subject got a text
> message (SMS probe)
> 3. I want to have a summary of how many times a specific subject
> - Turned their screen on - True  (ScreenProbe)
> - Or did not turn their screen on - False (ScreenProbe)
> 4.  I want to have a summary of the activity level of a specific subject
> - Activity level - none (ActivityProbe)
> - Activity level- low     (ActivityProbe)
> - Activity level - High  (ActivityProbe)
>
> I want to do this for all the 36 subjects(Participants).
> In the end, I have to define the percentages and cutoff points of what is
> considered low-medium-high, based on what the results of all the subjects
> are. So I am able to see if a specific subject has low social interaction
> etc.
>
> I have tried a lot, with the help of youtube etc. But I feel as if I am
> trying a lot of things but without clearly knowing if it is the right step.
> I have a csv file, but I need to look into what Jeff said about the guides.
> So I am able to share it.
>
> Best.
>
>
> On Sun, Jan 6, 2019 at 11:51 AM Rich Shepard <rshepard using appl-ecosys.com<mailto:rshepard using appl-ecosys.com>>
> wrote:
>
> > On Sun, 6 Jan 2019, Rachel Thompson wrote:
> >
> > > I am an intern from Amsterdam and I have to do an analysis in R. I spoke
> > > to my professor in Amsterdam and my supervisor's here in Boston. But they
> > > are to busy to help. I informed them from the start that I am not
> > familiar
> > > with R(Rstudio) and they told me that I would receive guidance. So since
> > > they can not help me, I decided to share my problem online. (It is a CVS
> > > file imported into R)
> >
> > Rachel,
> >
> >    I find it interesting that you're put in such a difficult position. I've
> > not followed this thread from the start so my comments might be redundant
> > or
> > inappropriate.
> >
> >    If you can, describe the problem. That is, what are you being asked to
> > find and what are the available data? This information helps us to guide
> > you
> > to learning the mechanics for accomplishing your task with R.
> >
> > Regards,
> >
> > Rich
> >
> > ______________________________________________
> > R-help using r-project.org<mailto:R-help using 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.
> >
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org<mailto:R-help using 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.
Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních partnerů PRECHEZA a.s. jsou zveřejněny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner’s personal data are available on website: https://www.precheza.cz/en/personal-data-protection-principles/
Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer: https://www.precheza.cz/en/01-disclaimer/

	[[alternative HTML version deleted]]



More information about the R-help mailing list