Mailinglist

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

RachT
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 Sun, Jan 6, 2019 at 2:48 PM Richard M. Heiberger <[hidden email]> wrote:

> Questions like this
> 1. I want to have a summary of how many times a specific subject got called
> (CallLogProbe)
>
> suggest that you should look at the table function.  See
> ?table
> and run the examples.
> They show how to get one-way frequency tables and two-way contingency
> tables.
>
> If you have followup questions for the list, you can use the examples in
> ?table as your starting point.
> That way you don't need to worry about sharing your own data.
>
>
> On Sun, Jan 6, 2019 at 1:59 PM Rachel Thompson <
> [hidden email]> wrote:
>
>> 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 <[hidden email]>
>> 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
>> >
>> > ______________________________________________
>> > [hidden email] 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]]
>>
>> ______________________________________________
>> [hidden email] 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

RachT
In reply to this post by K. Elo-2
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 1:28 AM K. Elo <[hidden email]> wrote:

> Hi!
>
> Not having a data chunk prevents me from testing abit, but maybe you
> should take a look on:
>
> ?table
> ?xtabs
>
> to start with.
>
> But as already suggested by other users, a small data set would be of
> great help :)
>
> HTH,
> Kimmo
>
> su, 2019-01-06 kello 13:49 -0500, Rachel Thompson kirjoitti:
> > 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 <
> > [hidden email]>
> > 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
> > >
> > > ______________________________________________
> > > [hidden email] 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]]
> >
> > ______________________________________________
> > [hidden email] 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.
>
> ______________________________________________
> [hidden email] 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

RachT
In reply to this post by PIKAL Petr
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 <[hidden email]> 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 <[hidden email]> On Behalf Of Rachel Thompson
> > Sent: Sunday, January 6, 2019 7:49 PM
> > To: Rich Shepard <[hidden email]>
> > Cc: r-help mailing list <[hidden email]>
> > 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 <[hidden email]>
> > 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
> > >
> > > ______________________________________________
> > > [hidden email] 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]]
> >
> > ______________________________________________
> > [hidden email] 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

RachT
In reply to this post by Hasan Diwan-2
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 4:07 AM Hasan Diwan <[hidden email]> wrote:

> dput(sample(mydata, n=25)) is probably going to be more representative. --
> H
>
> On Mon, 7 Jan 2019 at 00:56, PIKAL Petr <[hidden email]> 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 <[hidden email]> On Behalf Of Rachel
> Thompson
> > > Sent: Sunday, January 6, 2019 7:49 PM
> > > To: Rich Shepard <[hidden email]>
> > > Cc: r-help mailing list <[hidden email]>
> > > 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 <[hidden email]
> >
> > > 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
> > > >
> > > > ______________________________________________
> > > > [hidden email] 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]]
> > >
> > > ______________________________________________
> > > [hidden email] 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/
> >
> > ______________________________________________
> > [hidden email] 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.
> >
>
>
> --
> OpenPGP:
> https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
> If you wish to request my time, please do so using
> *bit.ly/hd1AppointmentRequest
> <http://bit.ly/hd1AppointmentRequest>*.
> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
> <http://bit.ly/hd1AppointmentRequest>*.
>
> <https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
> >Sent
> from my mobile device
> Envoye de mon portable
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Richard M. Heiberger
In reply to this post by RachT
please post a sample dataset based on
mydata <- rbind[participant1[1:3,], participant2[1:4,], participant3[1:5,])

I think mydata at this point is anonymized enough that you can post
it.  Verify with whomever, though.
You might want to change those random U* names of the participants to
c("A","B","C")

post dput(mydata) to the list, in the body of the email.

I think this and the details you posted today will enable one of us to
give you a much simpler script, or maybe even function, to process
your full dataset.
Please confirm that participant1 and p1 are the same object.

Rich

That

On Tue, Jan 8, 2019 at 10:23 AM Rachel Thompson
<[hidden email]> wrote:

>
> 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 Sun, Jan 6, 2019 at 2:48 PM Richard M. Heiberger <[hidden email]> wrote:
>>
>> Questions like this
>> 1. I want to have a summary of how many times a specific subject got called
>> (CallLogProbe)
>>
>> suggest that you should look at the table function.  See
>> ?table
>> and run the examples.
>> They show how to get one-way frequency tables and two-way contingency tables.
>>
>> If you have followup questions for the list, you can use the examples in ?table as your starting point.
>> That way you don't need to worry about sharing your own data.
>>
>>
>> On Sun, Jan 6, 2019 at 1:59 PM Rachel Thompson <[hidden email]> wrote:
>>>
>>> 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 <[hidden email]>
>>> 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
>>> >
>>> > ______________________________________________
>>> > [hidden email] 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]]
>>>
>>> ______________________________________________
>>> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

PIKAL Petr
In reply to this post by RachT
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 <[hidden email]>
Sent: Tuesday, January 8, 2019 4:24 PM
To: PIKAL Petr <[hidden email]>
Cc: r-help mailing list <[hidden email]>
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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]>> On Behalf Of Rachel Thompson
> Sent: Sunday, January 6, 2019 7:49 PM
> To: Rich Shepard <[hidden email]<mailto:[hidden email]>>
> Cc: r-help mailing list <[hidden email]<mailto:[hidden email]>>
> 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 <[hidden email]<mailto:[hidden email]>>
> 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
> >
> > ______________________________________________
> > [hidden email]<mailto:[hidden email]> 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]]
>
> ______________________________________________
> [hidden email]<mailto:[hidden email]> 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]]

______________________________________________
[hidden email] 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.
12