Mailinglist

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

Mailinglist

RachT
Dear Mr/Mrs,

This is my first time working in R studio.
I have a database of 36 participants but it has 150600 entries.
Column -         Column - Column            - Column

Participant       Activityprobe - Activity Level  - High/low/none

Participant       Screenprobe - screenon/off     -

Participant       SMSprobe etc

Participant       CallLogProbe etc.

I need a code that helps me count the activity level of all the participants
High activity level. No activity level and Low activity level.
And to help me find out for every participant what the percentages are of
all their high/no/low activity.

For screenprobe I need to count how many times the participant turned their
screen on and how many times they turned it off and the percentage of
screen on/off.

For callLog I need to count how many times each participant got called and
the percentage.

For SMS I need to count the number of SMS for each participant and their
percentage.

I also need to categorize the probes. So that my database shows all the
activity levels first, organized by none/high/low and then all the
screenprobes, organized by on and off etc...

I hope that my description is clear and that you can maybe help me.

Best,

Rachel

        [[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

Jeff Newmiller
Not really. This is R-help, not R-do-my-work-for-me. You need to make enough progress in doing your work that you can ask a focused question about how to do some step of your work in R before your query will be answerable on this mailing list. Once you have started your work you will have some code and sample data you can share with us that w can run so we can understand your question (code without data is often really confusing). Note that R is text-based, and so is this mailing list... when you allow your email program to add HTML formatting to the email you send, the formatting will get removed anyway and the plain text that remains is often not readable or R won't understand the code... so follow the Posting Guide and set your email program to send plain text to begin with.

Some useful readings are [1][2][3], and don't forget the Posting Guide mentioned in the footer of this and every posting on this mailing list. If you haven't already found an intro to R that you like, you might read [4].

Finally... please notice that RStudio provides one possible (very nice) way to interact with R, but this mailing list is indeed about R and not that specific user interface. You have to install R before RStudio can even be used, so you can always test your problem in R to be sure which program is causing your difficulty. If your question only arises when RStudio is being used then it doesn't belong here.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette)

[4] https://rstudio-education.github.io/hopr/


On January 4, 2019 10:24:26 AM PST, Rachel Thompson <[hidden email]> wrote:

>Dear Mr/Mrs,
>
>This is my first time working in R studio.
>I have a database of 36 participants but it has 150600 entries.
>Column -         Column - Column            - Column
>
>Participant       Activityprobe - Activity Level  - High/low/none
>
>Participant       Screenprobe - screenon/off     -
>
>Participant       SMSprobe etc
>
>Participant       CallLogProbe etc.
>
>I need a code that helps me count the activity level of all the
>participants
>High activity level. No activity level and Low activity level.
>And to help me find out for every participant what the percentages are
>of
>all their high/no/low activity.
>
>For screenprobe I need to count how many times the participant turned
>their
>screen on and how many times they turned it off and the percentage of
>screen on/off.
>
>For callLog I need to count how many times each participant got called
>and
>the percentage.
>
>For SMS I need to count the number of SMS for each participant and
>their
>percentage.
>
>I also need to categorize the probes. So that my database shows all the
>activity levels first, organized by none/high/low and then all the
>screenprobes, organized by on and off etc...
>
>I hope that my description is clear and that you can maybe help me.
>
>Best,
>
>Rachel
>
> [[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.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[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

Jim Lemon-4
In reply to this post by RachT
Hi Rachel,
I'll take a guess and assume that you are monitoring the mobile phones
of 36 people, adding an observation every time some specified change
of state is sensed on each device. I'll also assume that you are only
recording four types of measurement. It seems that you want to
aggregate these events for each subject over the interval or
observation (or over each day or something). I think you are going to
create a new data frame of these summaries from the one you have of
individual observations. Creating each summary doesn't look too hard,
but you will have to define more precisely what you want those
summaries to be. For instance, "I want the mean activity level for
each subject during the overall time that their mobile phone is
switched on", One you have clearly defined your goals, it probably
won't be too hard to get to them.

Jim

On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
<[hidden email]> wrote:

>
> Dear Mr/Mrs,
>
> This is my first time working in R studio.
> I have a database of 36 participants but it has 150600 entries.
> Column -         Column - Column            - Column
>
> Participant       Activityprobe - Activity Level  - High/low/none
>
> Participant       Screenprobe - screenon/off     -
>
> Participant       SMSprobe etc
>
> Participant       CallLogProbe etc.
>
> I need a code that helps me count the activity level of all the participants
> High activity level. No activity level and Low activity level.
> And to help me find out for every participant what the percentages are of
> all their high/no/low activity.
>
> For screenprobe I need to count how many times the participant turned their
> screen on and how many times they turned it off and the percentage of
> screen on/off.
>
> For callLog I need to count how many times each participant got called and
> the percentage.
>
> For SMS I need to count the number of SMS for each participant and their
> percentage.
>
> I also need to categorize the probes. So that my database shows all the
> activity levels first, organized by none/high/low and then all the
> screenprobes, organized by on and off etc...
>
> I hope that my description is clear and that you can maybe help me.
>
> Best,
>
> Rachel
>
>         [[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

Jim Lemon-4
Hi Rachel,
It looks to me as though the first thing you want to do is to get your
data, which you attach as images, into a data frame. If these are flat
files like CSV or TAB, you should be able to read them in with some
variant of the read.table function. If Excel, look at the various
Excel import packages. Then you can operate on the data frame by doing
things like tabulating Participant ID against the code for SMS or call
(which I assume are those 3000+ numbers). You can take the differences
in what look like POSIX time values between successive TRUE and FALSE
screen values to get the duration of screen activity and it looks like
participant activity is recorded at regular intervals. As Jeff
suggested, this is really just boring work figuring out how to extract
the events:

call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
== _id  & Valuedetailed ==3271)

using suitable logical statements and then tabulating them by
ParticipantID. If you know how to do that in SPSS, it won't be too
hard to translate the logical statements into R syntax as above. I may
have misunderstood the variable names, but I think the logic is clear.

Jim

On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
<[hidden email]> wrote:

>
> Hi Jim,
>
> Thank you for the clarification. Since I only work in SPSS and I am from Amsterdam I have had problems with specifying what I am trying to do in this specific program and also in clear English language.
>
> I think I want to indeed aggregate these events for each subject over the observation. But in this case several observations.
> 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 percentages, so I am able to say...Subject 36 has low social interactions ( because they only got called and texted 500 times in total, while the average of all the participants is 10000 or something). I have to come up with the percentages myself and define cutoff points of what is considered low-medium-high, based on what the results of all the subjects are.
>
> I hope that I am as clear as possible .
>
>
> I feel as if I am on my way of understanding it, but since I do not clearly know, I am trying out a lot of different codes etc. and I do not know if I am doing the right thing. I indeed made a new data frame etc, but I still feel a bit lost. Do I need to make one per subject or per Probe etc..
>
>
> Thanks for your help. I hope that you can help me resolve this issue.
>
>
> Best,
>
>
> Rachel
>
>
>
>
>
>
> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]> wrote:
>>
>> Hi Rachel,
>> I'll take a guess and assume that you are monitoring the mobile phones
>> of 36 people, adding an observation every time some specified change
>> of state is sensed on each device. I'll also assume that you are only
>> recording four types of measurement. It seems that you want to
>> aggregate these events for each subject over the interval or
>> observation (or over each day or something). I think you are going to
>> create a new data frame of these summaries from the one you have of
>> individual observations. Creating each summary doesn't look too hard,
>> but you will have to define more precisely what you want those
>> summaries to be. For instance, "I want the mean activity level for
>> each subject during the overall time that their mobile phone is
>> switched on", One you have clearly defined your goals, it probably
>> won't be too hard to get to them.
>>
>> Jim
>>
>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
>> <[hidden email]> wrote:
>> >
>> > Dear Mr/Mrs,
>> >
>> > This is my first time working in R studio.
>> > I have a database of 36 participants but it has 150600 entries.
>> > Column -         Column - Column            - Column
>> >
>> > Participant       Activityprobe - Activity Level  - High/low/none
>> >
>> > Participant       Screenprobe - screenon/off     -
>> >
>> > Participant       SMSprobe etc
>> >
>> > Participant       CallLogProbe etc.
>> >
>> > I need a code that helps me count the activity level of all the participants
>> > High activity level. No activity level and Low activity level.
>> > And to help me find out for every participant what the percentages are of
>> > all their high/no/low activity.
>> >
>> > For screenprobe I need to count how many times the participant turned their
>> > screen on and how many times they turned it off and the percentage of
>> > screen on/off.
>> >
>> > For callLog I need to count how many times each participant got called and
>> > the percentage.
>> >
>> > For SMS I need to count the number of SMS for each participant and their
>> > percentage.
>> >
>> > I also need to categorize the probes. So that my database shows all the
>> > activity levels first, organized by none/high/low and then all the
>> > screenprobes, organized by on and off etc...
>> >
>> > I hope that my description is clear and that you can maybe help me.
>> >
>> > Best,
>> >
>> > Rachel
>> >
>> >         [[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

Jeff Newmiller
I would not want to leave the impression that I think the task at hand is merely tedious... my point is that there are numerous steps involved and each step depends on information that has not been communicated to the list, and there is a learning curve even in knowing what to include in an email question. What I do think is that knowing enough basic R syntax to express small bits of the problem in R will be a vast improvement over attempting to use only English descriptions, and Rachel has to bridge that initial gap.

For example, some images of data were apparently sent to Jim only, yet he still does not know in what format the data file is stored, so that technique was not very effective. One way for the question to become more focused is for Rachel to study up on her own how to import data and provide us with a "dput" (see the StackOverflow discussion I referenced before) of a small sample of data. Another is for Rachel to use basic R syntax to create an anonymous data set from scratch (also outlined in the SO discussion). These approaches allow us to keep the focus of our mailing list discussion on manipulating the data into summaries. Another approach is to re-focus the question on importing data by supplying a download link to the data so we can make suggestions as to what R commands will handle this data in its raw form. In any case, we cannot leapfrog over the data to the analysis as the question stands.

Given the above, I have to wonder why Rachel hasn't simply used the tool she is familiar with... SPSS... to do this? If it is because this is an academic assignment to learn R then she should be talking to her institutional support (instructor/teaching assistant/tutoring staff) anyway since there is a no-homework policy on this list (and that avenue would have the benefit of being conducted orally and most likely in her native language).


On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]> wrote:

>Hi Rachel,
>It looks to me as though the first thing you want to do is to get your
>data, which you attach as images, into a data frame. If these are flat
>files like CSV or TAB, you should be able to read them in with some
>variant of the read.table function. If Excel, look at the various
>Excel import packages. Then you can operate on the data frame by doing
>things like tabulating Participant ID against the code for SMS or call
>(which I assume are those 3000+ numbers). You can take the differences
>in what look like POSIX time values between successive TRUE and FALSE
>screen values to get the duration of screen activity and it looks like
>participant activity is recorded at regular intervals. As Jeff
>suggested, this is really just boring work figuring out how to extract
>the events:
>
>call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
>== _id  & Valuedetailed ==3271)
>
>using suitable logical statements and then tabulating them by
>ParticipantID. If you know how to do that in SPSS, it won't be too
>hard to translate the logical statements into R syntax as above. I may
>have misunderstood the variable names, but I think the logic is clear.
>
>Jim
>
>On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
><[hidden email]> wrote:
>>
>> Hi Jim,
>>
>> Thank you for the clarification. Since I only work in SPSS and I am
>from Amsterdam I have had problems with specifying what I am trying to
>do in this specific program and also in clear English language.
>>
>> I think I want to indeed aggregate these events for each subject over
>the observation. But in this case several observations.
>> 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 percentages, so I am able to
>say...Subject 36 has low social interactions ( because they only got
>called and texted 500 times in total, while the average of all the
>participants is 10000 or something). I have to come up with the
>percentages myself and define cutoff points of what is considered
>low-medium-high, based on what the results of all the subjects are.
>>
>> I hope that I am as clear as possible .
>>
>>
>> I feel as if I am on my way of understanding it, but since I do not
>clearly know, I am trying out a lot of different codes etc. and I do
>not know if I am doing the right thing. I indeed made a new data frame
>etc, but I still feel a bit lost. Do I need to make one per subject or
>per Probe etc..
>>
>>
>> Thanks for your help. I hope that you can help me resolve this issue.
>>
>>
>> Best,
>>
>>
>> Rachel
>>
>>
>>
>>
>>
>>
>> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
>wrote:
>>>
>>> Hi Rachel,
>>> I'll take a guess and assume that you are monitoring the mobile
>phones
>>> of 36 people, adding an observation every time some specified change
>>> of state is sensed on each device. I'll also assume that you are
>only
>>> recording four types of measurement. It seems that you want to
>>> aggregate these events for each subject over the interval or
>>> observation (or over each day or something). I think you are going
>to
>>> create a new data frame of these summaries from the one you have of
>>> individual observations. Creating each summary doesn't look too
>hard,
>>> but you will have to define more precisely what you want those
>>> summaries to be. For instance, "I want the mean activity level for
>>> each subject during the overall time that their mobile phone is
>>> switched on", One you have clearly defined your goals, it probably
>>> won't be too hard to get to them.
>>>
>>> Jim
>>>
>>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
>>> <[hidden email]> wrote:
>>> >
>>> > Dear Mr/Mrs,
>>> >
>>> > This is my first time working in R studio.
>>> > I have a database of 36 participants but it has 150600 entries.
>>> > Column -         Column - Column            - Column
>>> >
>>> > Participant       Activityprobe - Activity Level  - High/low/none
>>> >
>>> > Participant       Screenprobe - screenon/off     -
>>> >
>>> > Participant       SMSprobe etc
>>> >
>>> > Participant       CallLogProbe etc.
>>> >
>>> > I need a code that helps me count the activity level of all the
>participants
>>> > High activity level. No activity level and Low activity level.
>>> > And to help me find out for every participant what the percentages
>are of
>>> > all their high/no/low activity.
>>> >
>>> > For screenprobe I need to count how many times the participant
>turned their
>>> > screen on and how many times they turned it off and the percentage
>of
>>> > screen on/off.
>>> >
>>> > For callLog I need to count how many times each participant got
>called and
>>> > the percentage.
>>> >
>>> > For SMS I need to count the number of SMS for each participant and
>their
>>> > percentage.
>>> >
>>> > I also need to categorize the probes. So that my database shows
>all the
>>> > activity levels first, organized by none/high/low and then all the
>>> > screenprobes, organized by on and off etc...
>>> >
>>> > I hope that my description is clear and that you can maybe help
>me.
>>> >
>>> > Best,
>>> >
>>> > Rachel
>>> >
>>> >         [[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.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[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 Jim Lemon-4
Hi Jim,

Thank you for your email and information
It is a CVS file which I imported in Rstudio.
I will look into what you told me and see if I am able to figure it out.

Best,

Rachel


On Sun, Jan 6, 2019 at 4:12 AM Jim Lemon <[hidden email]> wrote:

> Hi Rachel,
> It looks to me as though the first thing you want to do is to get your
> data, which you attach as images, into a data frame. If these are flat
> files like CSV or TAB, you should be able to read them in with some
> variant of the read.table function. If Excel, look at the various
> Excel import packages. Then you can operate on the data frame by doing
> things like tabulating Participant ID against the code for SMS or call
> (which I assume are those 3000+ numbers). You can take the differences
> in what look like POSIX time values between successive TRUE and FALSE
> screen values to get the duration of screen activity and it looks like
> participant activity is recorded at regular intervals. As Jeff
> suggested, this is really just boring work figuring out how to extract
> the events:
>
> call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
> == _id  & Valuedetailed ==3271)
>
> using suitable logical statements and then tabulating them by
> ParticipantID. If you know how to do that in SPSS, it won't be too
> hard to translate the logical statements into R syntax as above. I may
> have misunderstood the variable names, but I think the logic is clear.
>
> Jim
>
> On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
> <[hidden email]> wrote:
> >
> > Hi Jim,
> >
> > Thank you for the clarification. Since I only work in SPSS and I am from
> Amsterdam I have had problems with specifying what I am trying to do in
> this specific program and also in clear English language.
> >
> > I think I want to indeed aggregate these events for each subject over
> the observation. But in this case several observations.
> > 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 percentages, so I am able to say...Subject
> 36 has low social interactions ( because they only got called and texted
> 500 times in total, while the average of all the participants is 10000 or
> something). I have to come up with the percentages myself and define cutoff
> points of what is considered low-medium-high, based on what the results of
> all the subjects are.
> >
> > I hope that I am as clear as possible .
> >
> >
> > I feel as if I am on my way of understanding it, but since I do not
> clearly know, I am trying out a lot of different codes etc. and I do not
> know if I am doing the right thing. I indeed made a new data frame etc, but
> I still feel a bit lost. Do I need to make one per subject or per Probe
> etc..
> >
> >
> > Thanks for your help. I hope that you can help me resolve this issue.
> >
> >
> > Best,
> >
> >
> > Rachel
> >
> >
> >
> >
> >
> >
> > On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]> wrote:
> >>
> >> Hi Rachel,
> >> I'll take a guess and assume that you are monitoring the mobile phones
> >> of 36 people, adding an observation every time some specified change
> >> of state is sensed on each device. I'll also assume that you are only
> >> recording four types of measurement. It seems that you want to
> >> aggregate these events for each subject over the interval or
> >> observation (or over each day or something). I think you are going to
> >> create a new data frame of these summaries from the one you have of
> >> individual observations. Creating each summary doesn't look too hard,
> >> but you will have to define more precisely what you want those
> >> summaries to be. For instance, "I want the mean activity level for
> >> each subject during the overall time that their mobile phone is
> >> switched on", One you have clearly defined your goals, it probably
> >> won't be too hard to get to them.
> >>
> >> Jim
> >>
> >> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
> >> <[hidden email]> wrote:
> >> >
> >> > Dear Mr/Mrs,
> >> >
> >> > This is my first time working in R studio.
> >> > I have a database of 36 participants but it has 150600 entries.
> >> > Column -         Column - Column            - Column
> >> >
> >> > Participant       Activityprobe - Activity Level  - High/low/none
> >> >
> >> > Participant       Screenprobe - screenon/off     -
> >> >
> >> > Participant       SMSprobe etc
> >> >
> >> > Participant       CallLogProbe etc.
> >> >
> >> > I need a code that helps me count the activity level of all the
> participants
> >> > High activity level. No activity level and Low activity level.
> >> > And to help me find out for every participant what the percentages
> are of
> >> > all their high/no/low activity.
> >> >
> >> > For screenprobe I need to count how many times the participant turned
> their
> >> > screen on and how many times they turned it off and the percentage of
> >> > screen on/off.
> >> >
> >> > For callLog I need to count how many times each participant got
> called and
> >> > the percentage.
> >> >
> >> > For SMS I need to count the number of SMS for each participant and
> their
> >> > percentage.
> >> >
> >> > I also need to categorize the probes. So that my database shows all
> the
> >> > activity levels first, organized by none/high/low and then all the
> >> > screenprobes, organized by on and off etc...
> >> >
> >> > I hope that my description is clear and that you can maybe help me.
> >> >
> >> > Best,
> >> >
> >> > Rachel
> >> >
> >> >         [[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 Jeff Newmiller
Hi Jeff,

Thanks for your email.
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)

Please understand that I am new to this. I will unsubscribe to the mailing
list if my question does not belong here.

Thanks,

Rachel

On Sun, Jan 6, 2019 at 11:01 AM Jeff Newmiller <[hidden email]>
wrote:

> I would not want to leave the impression that I think the task at hand is
> merely tedious... my point is that there are numerous steps involved and
> each step depends on information that has not been communicated to the
> list, and there is a learning curve even in knowing what to include in an
> email question. What I do think is that knowing enough basic R syntax to
> express small bits of the problem in R will be a vast improvement over
> attempting to use only English descriptions, and Rachel has to bridge that
> initial gap.
>
> For example, some images of data were apparently sent to Jim only, yet he
> still does not know in what format the data file is stored, so that
> technique was not very effective. One way for the question to become more
> focused is for Rachel to study up on her own how to import data and provide
> us with a "dput" (see the StackOverflow discussion I referenced before) of
> a small sample of data. Another is for Rachel to use basic R syntax to
> create an anonymous data set from scratch (also outlined in the SO
> discussion). These approaches allow us to keep the focus of our mailing
> list discussion on manipulating the data into summaries. Another approach
> is to re-focus the question on importing data by supplying a download link
> to the data so we can make suggestions as to what R commands will handle
> this data in its raw form. In any case, we cannot leapfrog over the data to
> the analysis as the question stands.
>
> Given the above, I have to wonder why Rachel hasn't simply used the tool
> she is familiar with... SPSS... to do this? If it is because this is an
> academic assignment to learn R then she should be talking to her
> institutional support (instructor/teaching assistant/tutoring staff) anyway
> since there is a no-homework policy on this list (and that avenue would
> have the benefit of being conducted orally and most likely in her native
> language).
>
>
> On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]> wrote:
> >Hi Rachel,
> >It looks to me as though the first thing you want to do is to get your
> >data, which you attach as images, into a data frame. If these are flat
> >files like CSV or TAB, you should be able to read them in with some
> >variant of the read.table function. If Excel, look at the various
> >Excel import packages. Then you can operate on the data frame by doing
> >things like tabulating Participant ID against the code for SMS or call
> >(which I assume are those 3000+ numbers). You can take the differences
> >in what look like POSIX time values between successive TRUE and FALSE
> >screen values to get the duration of screen activity and it looks like
> >participant activity is recorded at regular intervals. As Jeff
> >suggested, this is really just boring work figuring out how to extract
> >the events:
> >
> >call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
> >== _id  & Valuedetailed ==3271)
> >
> >using suitable logical statements and then tabulating them by
> >ParticipantID. If you know how to do that in SPSS, it won't be too
> >hard to translate the logical statements into R syntax as above. I may
> >have misunderstood the variable names, but I think the logic is clear.
> >
> >Jim
> >
> >On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
> ><[hidden email]> wrote:
> >>
> >> Hi Jim,
> >>
> >> Thank you for the clarification. Since I only work in SPSS and I am
> >from Amsterdam I have had problems with specifying what I am trying to
> >do in this specific program and also in clear English language.
> >>
> >> I think I want to indeed aggregate these events for each subject over
> >the observation. But in this case several observations.
> >> 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 percentages, so I am able to
> >say...Subject 36 has low social interactions ( because they only got
> >called and texted 500 times in total, while the average of all the
> >participants is 10000 or something). I have to come up with the
> >percentages myself and define cutoff points of what is considered
> >low-medium-high, based on what the results of all the subjects are.
> >>
> >> I hope that I am as clear as possible .
> >>
> >>
> >> I feel as if I am on my way of understanding it, but since I do not
> >clearly know, I am trying out a lot of different codes etc. and I do
> >not know if I am doing the right thing. I indeed made a new data frame
> >etc, but I still feel a bit lost. Do I need to make one per subject or
> >per Probe etc..
> >>
> >>
> >> Thanks for your help. I hope that you can help me resolve this issue.
> >>
> >>
> >> Best,
> >>
> >>
> >> Rachel
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
> >wrote:
> >>>
> >>> Hi Rachel,
> >>> I'll take a guess and assume that you are monitoring the mobile
> >phones
> >>> of 36 people, adding an observation every time some specified change
> >>> of state is sensed on each device. I'll also assume that you are
> >only
> >>> recording four types of measurement. It seems that you want to
> >>> aggregate these events for each subject over the interval or
> >>> observation (or over each day or something). I think you are going
> >to
> >>> create a new data frame of these summaries from the one you have of
> >>> individual observations. Creating each summary doesn't look too
> >hard,
> >>> but you will have to define more precisely what you want those
> >>> summaries to be. For instance, "I want the mean activity level for
> >>> each subject during the overall time that their mobile phone is
> >>> switched on", One you have clearly defined your goals, it probably
> >>> won't be too hard to get to them.
> >>>
> >>> Jim
> >>>
> >>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
> >>> <[hidden email]> wrote:
> >>> >
> >>> > Dear Mr/Mrs,
> >>> >
> >>> > This is my first time working in R studio.
> >>> > I have a database of 36 participants but it has 150600 entries.
> >>> > Column -         Column - Column            - Column
> >>> >
> >>> > Participant       Activityprobe - Activity Level  - High/low/none
> >>> >
> >>> > Participant       Screenprobe - screenon/off     -
> >>> >
> >>> > Participant       SMSprobe etc
> >>> >
> >>> > Participant       CallLogProbe etc.
> >>> >
> >>> > I need a code that helps me count the activity level of all the
> >participants
> >>> > High activity level. No activity level and Low activity level.
> >>> > And to help me find out for every participant what the percentages
> >are of
> >>> > all their high/no/low activity.
> >>> >
> >>> > For screenprobe I need to count how many times the participant
> >turned their
> >>> > screen on and how many times they turned it off and the percentage
> >of
> >>> > screen on/off.
> >>> >
> >>> > For callLog I need to count how many times each participant got
> >called and
> >>> > the percentage.
> >>> >
> >>> > For SMS I need to count the number of SMS for each participant and
> >their
> >>> > percentage.
> >>> >
> >>> > I also need to categorize the probes. So that my database shows
> >all the
> >>> > activity levels first, organized by none/high/low and then all the
> >>> > screenprobes, organized by on and off etc...
> >>> >
> >>> > I hope that my description is clear and that you can maybe help
> >me.
> >>> >
> >>> > Best,
> >>> >
> >>> > Rachel
> >>> >
> >>> >         [[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.
>
> --
> Sent from my phone. Please excuse my brevity.
>

        [[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

Michael Dewey-3
Dear Rachel

Not sure if this is going to help but if it is a csv file then
read.csv() is your friend. Read the help first in case you need to
specify what is being used for the decimal point and the separator as if
it is from the Netherlands they may not be the default settings.

michael

On 06/01/2019 16:37, Rachel Thompson wrote:

> Hi Jeff,
>
> Thanks for your email.
> 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)
>
> Please understand that I am new to this. I will unsubscribe to the mailing
> list if my question does not belong here.
>
> Thanks,
>
> Rachel
>
> On Sun, Jan 6, 2019 at 11:01 AM Jeff Newmiller <[hidden email]>
> wrote:
>
>> I would not want to leave the impression that I think the task at hand is
>> merely tedious... my point is that there are numerous steps involved and
>> each step depends on information that has not been communicated to the
>> list, and there is a learning curve even in knowing what to include in an
>> email question. What I do think is that knowing enough basic R syntax to
>> express small bits of the problem in R will be a vast improvement over
>> attempting to use only English descriptions, and Rachel has to bridge that
>> initial gap.
>>
>> For example, some images of data were apparently sent to Jim only, yet he
>> still does not know in what format the data file is stored, so that
>> technique was not very effective. One way for the question to become more
>> focused is for Rachel to study up on her own how to import data and provide
>> us with a "dput" (see the StackOverflow discussion I referenced before) of
>> a small sample of data. Another is for Rachel to use basic R syntax to
>> create an anonymous data set from scratch (also outlined in the SO
>> discussion). These approaches allow us to keep the focus of our mailing
>> list discussion on manipulating the data into summaries. Another approach
>> is to re-focus the question on importing data by supplying a download link
>> to the data so we can make suggestions as to what R commands will handle
>> this data in its raw form. In any case, we cannot leapfrog over the data to
>> the analysis as the question stands.
>>
>> Given the above, I have to wonder why Rachel hasn't simply used the tool
>> she is familiar with... SPSS... to do this? If it is because this is an
>> academic assignment to learn R then she should be talking to her
>> institutional support (instructor/teaching assistant/tutoring staff) anyway
>> since there is a no-homework policy on this list (and that avenue would
>> have the benefit of being conducted orally and most likely in her native
>> language).
>>
>>
>> On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]> wrote:
>>> Hi Rachel,
>>> It looks to me as though the first thing you want to do is to get your
>>> data, which you attach as images, into a data frame. If these are flat
>>> files like CSV or TAB, you should be able to read them in with some
>>> variant of the read.table function. If Excel, look at the various
>>> Excel import packages. Then you can operate on the data frame by doing
>>> things like tabulating Participant ID against the code for SMS or call
>>> (which I assume are those 3000+ numbers). You can take the differences
>>> in what look like POSIX time values between successive TRUE and FALSE
>>> screen values to get the duration of screen activity and it looks like
>>> participant activity is recorded at regular intervals. As Jeff
>>> suggested, this is really just boring work figuring out how to extract
>>> the events:
>>>
>>> call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
>>> == _id  & Valuedetailed ==3271)
>>>
>>> using suitable logical statements and then tabulating them by
>>> ParticipantID. If you know how to do that in SPSS, it won't be too
>>> hard to translate the logical statements into R syntax as above. I may
>>> have misunderstood the variable names, but I think the logic is clear.
>>>
>>> Jim
>>>
>>> On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
>>> <[hidden email]> wrote:
>>>>
>>>> Hi Jim,
>>>>
>>>> Thank you for the clarification. Since I only work in SPSS and I am
>> >from Amsterdam I have had problems with specifying what I am trying to
>>> do in this specific program and also in clear English language.
>>>>
>>>> I think I want to indeed aggregate these events for each subject over
>>> the observation. But in this case several observations.
>>>> 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 percentages, so I am able to
>>> say...Subject 36 has low social interactions ( because they only got
>>> called and texted 500 times in total, while the average of all the
>>> participants is 10000 or something). I have to come up with the
>>> percentages myself and define cutoff points of what is considered
>>> low-medium-high, based on what the results of all the subjects are.
>>>>
>>>> I hope that I am as clear as possible .
>>>>
>>>>
>>>> I feel as if I am on my way of understanding it, but since I do not
>>> clearly know, I am trying out a lot of different codes etc. and I do
>>> not know if I am doing the right thing. I indeed made a new data frame
>>> etc, but I still feel a bit lost. Do I need to make one per subject or
>>> per Probe etc..
>>>>
>>>>
>>>> Thanks for your help. I hope that you can help me resolve this issue.
>>>>
>>>>
>>>> Best,
>>>>
>>>>
>>>> Rachel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
>>> wrote:
>>>>>
>>>>> Hi Rachel,
>>>>> I'll take a guess and assume that you are monitoring the mobile
>>> phones
>>>>> of 36 people, adding an observation every time some specified change
>>>>> of state is sensed on each device. I'll also assume that you are
>>> only
>>>>> recording four types of measurement. It seems that you want to
>>>>> aggregate these events for each subject over the interval or
>>>>> observation (or over each day or something). I think you are going
>>> to
>>>>> create a new data frame of these summaries from the one you have of
>>>>> individual observations. Creating each summary doesn't look too
>>> hard,
>>>>> but you will have to define more precisely what you want those
>>>>> summaries to be. For instance, "I want the mean activity level for
>>>>> each subject during the overall time that their mobile phone is
>>>>> switched on", One you have clearly defined your goals, it probably
>>>>> won't be too hard to get to them.
>>>>>
>>>>> Jim
>>>>>
>>>>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
>>>>> <[hidden email]> wrote:
>>>>>>
>>>>>> Dear Mr/Mrs,
>>>>>>
>>>>>> This is my first time working in R studio.
>>>>>> I have a database of 36 participants but it has 150600 entries.
>>>>>> Column -         Column - Column            - Column
>>>>>>
>>>>>> Participant       Activityprobe - Activity Level  - High/low/none
>>>>>>
>>>>>> Participant       Screenprobe - screenon/off     -
>>>>>>
>>>>>> Participant       SMSprobe etc
>>>>>>
>>>>>> Participant       CallLogProbe etc.
>>>>>>
>>>>>> I need a code that helps me count the activity level of all the
>>> participants
>>>>>> High activity level. No activity level and Low activity level.
>>>>>> And to help me find out for every participant what the percentages
>>> are of
>>>>>> all their high/no/low activity.
>>>>>>
>>>>>> For screenprobe I need to count how many times the participant
>>> turned their
>>>>>> screen on and how many times they turned it off and the percentage
>>> of
>>>>>> screen on/off.
>>>>>>
>>>>>> For callLog I need to count how many times each participant got
>>> called and
>>>>>> the percentage.
>>>>>>
>>>>>> For SMS I need to count the number of SMS for each participant and
>>> their
>>>>>> percentage.
>>>>>>
>>>>>> I also need to categorize the probes. So that my database shows
>>> all the
>>>>>> activity levels first, organized by none/high/low and then all the
>>>>>> screenprobes, organized by on and off etc...
>>>>>>
>>>>>> I hope that my description is clear and that you can maybe help
>>> me.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Rachel
>>>>>>
>>>>>>          [[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.
>>
>> --
>> Sent from my phone. Please excuse my brevity.
>>
>
> [[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.
>

--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
[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
Hi Michael

Thanks, I'll check it out.

Best,

Rachel

On Sun, Jan 6, 2019 at 11:45 AM Michael Dewey <[hidden email]>
wrote:

> Dear Rachel
>
> Not sure if this is going to help but if it is a csv file then
> read.csv() is your friend. Read the help first in case you need to
> specify what is being used for the decimal point and the separator as if
> it is from the Netherlands they may not be the default settings.
>
> michael
>
> On 06/01/2019 16:37, Rachel Thompson wrote:
> > Hi Jeff,
> >
> > Thanks for your email.
> > 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)
> >
> > Please understand that I am new to this. I will unsubscribe to the
> mailing
> > list if my question does not belong here.
> >
> > Thanks,
> >
> > Rachel
> >
> > On Sun, Jan 6, 2019 at 11:01 AM Jeff Newmiller <[hidden email]
> >
> > wrote:
> >
> >> I would not want to leave the impression that I think the task at hand
> is
> >> merely tedious... my point is that there are numerous steps involved and
> >> each step depends on information that has not been communicated to the
> >> list, and there is a learning curve even in knowing what to include in
> an
> >> email question. What I do think is that knowing enough basic R syntax to
> >> express small bits of the problem in R will be a vast improvement over
> >> attempting to use only English descriptions, and Rachel has to bridge
> that
> >> initial gap.
> >>
> >> For example, some images of data were apparently sent to Jim only, yet
> he
> >> still does not know in what format the data file is stored, so that
> >> technique was not very effective. One way for the question to become
> more
> >> focused is for Rachel to study up on her own how to import data and
> provide
> >> us with a "dput" (see the StackOverflow discussion I referenced before)
> of
> >> a small sample of data. Another is for Rachel to use basic R syntax to
> >> create an anonymous data set from scratch (also outlined in the SO
> >> discussion). These approaches allow us to keep the focus of our mailing
> >> list discussion on manipulating the data into summaries. Another
> approach
> >> is to re-focus the question on importing data by supplying a download
> link
> >> to the data so we can make suggestions as to what R commands will handle
> >> this data in its raw form. In any case, we cannot leapfrog over the
> data to
> >> the analysis as the question stands.
> >>
> >> Given the above, I have to wonder why Rachel hasn't simply used the tool
> >> she is familiar with... SPSS... to do this? If it is because this is an
> >> academic assignment to learn R then she should be talking to her
> >> institutional support (instructor/teaching assistant/tutoring staff)
> anyway
> >> since there is a no-homework policy on this list (and that avenue would
> >> have the benefit of being conducted orally and most likely in her native
> >> language).
> >>
> >>
> >> On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]>
> wrote:
> >>> Hi Rachel,
> >>> It looks to me as though the first thing you want to do is to get your
> >>> data, which you attach as images, into a data frame. If these are flat
> >>> files like CSV or TAB, you should be able to read them in with some
> >>> variant of the read.table function. If Excel, look at the various
> >>> Excel import packages. Then you can operate on the data frame by doing
> >>> things like tabulating Participant ID against the code for SMS or call
> >>> (which I assume are those 3000+ numbers). You can take the differences
> >>> in what look like POSIX time values between successive TRUE and FALSE
> >>> screen values to get the duration of screen activity and it looks like
> >>> participant activity is recorded at regular intervals. As Jeff
> >>> suggested, this is really just boring work figuring out how to extract
> >>> the events:
> >>>
> >>> call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
> >>> == _id  & Valuedetailed ==3271)
> >>>
> >>> using suitable logical statements and then tabulating them by
> >>> ParticipantID. If you know how to do that in SPSS, it won't be too
> >>> hard to translate the logical statements into R syntax as above. I may
> >>> have misunderstood the variable names, but I think the logic is clear.
> >>>
> >>> Jim
> >>>
> >>> On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
> >>> <[hidden email]> wrote:
> >>>>
> >>>> Hi Jim,
> >>>>
> >>>> Thank you for the clarification. Since I only work in SPSS and I am
> >> >from Amsterdam I have had problems with specifying what I am trying to
> >>> do in this specific program and also in clear English language.
> >>>>
> >>>> I think I want to indeed aggregate these events for each subject over
> >>> the observation. But in this case several observations.
> >>>> 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 percentages, so I am able to
> >>> say...Subject 36 has low social interactions ( because they only got
> >>> called and texted 500 times in total, while the average of all the
> >>> participants is 10000 or something). I have to come up with the
> >>> percentages myself and define cutoff points of what is considered
> >>> low-medium-high, based on what the results of all the subjects are.
> >>>>
> >>>> I hope that I am as clear as possible .
> >>>>
> >>>>
> >>>> I feel as if I am on my way of understanding it, but since I do not
> >>> clearly know, I am trying out a lot of different codes etc. and I do
> >>> not know if I am doing the right thing. I indeed made a new data frame
> >>> etc, but I still feel a bit lost. Do I need to make one per subject or
> >>> per Probe etc..
> >>>>
> >>>>
> >>>> Thanks for your help. I hope that you can help me resolve this issue.
> >>>>
> >>>>
> >>>> Best,
> >>>>
> >>>>
> >>>> Rachel
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
> >>> wrote:
> >>>>>
> >>>>> Hi Rachel,
> >>>>> I'll take a guess and assume that you are monitoring the mobile
> >>> phones
> >>>>> of 36 people, adding an observation every time some specified change
> >>>>> of state is sensed on each device. I'll also assume that you are
> >>> only
> >>>>> recording four types of measurement. It seems that you want to
> >>>>> aggregate these events for each subject over the interval or
> >>>>> observation (or over each day or something). I think you are going
> >>> to
> >>>>> create a new data frame of these summaries from the one you have of
> >>>>> individual observations. Creating each summary doesn't look too
> >>> hard,
> >>>>> but you will have to define more precisely what you want those
> >>>>> summaries to be. For instance, "I want the mean activity level for
> >>>>> each subject during the overall time that their mobile phone is
> >>>>> switched on", One you have clearly defined your goals, it probably
> >>>>> won't be too hard to get to them.
> >>>>>
> >>>>> Jim
> >>>>>
> >>>>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
> >>>>> <[hidden email]> wrote:
> >>>>>>
> >>>>>> Dear Mr/Mrs,
> >>>>>>
> >>>>>> This is my first time working in R studio.
> >>>>>> I have a database of 36 participants but it has 150600 entries.
> >>>>>> Column -         Column - Column            - Column
> >>>>>>
> >>>>>> Participant       Activityprobe - Activity Level  - High/low/none
> >>>>>>
> >>>>>> Participant       Screenprobe - screenon/off     -
> >>>>>>
> >>>>>> Participant       SMSprobe etc
> >>>>>>
> >>>>>> Participant       CallLogProbe etc.
> >>>>>>
> >>>>>> I need a code that helps me count the activity level of all the
> >>> participants
> >>>>>> High activity level. No activity level and Low activity level.
> >>>>>> And to help me find out for every participant what the percentages
> >>> are of
> >>>>>> all their high/no/low activity.
> >>>>>>
> >>>>>> For screenprobe I need to count how many times the participant
> >>> turned their
> >>>>>> screen on and how many times they turned it off and the percentage
> >>> of
> >>>>>> screen on/off.
> >>>>>>
> >>>>>> For callLog I need to count how many times each participant got
> >>> called and
> >>>>>> the percentage.
> >>>>>>
> >>>>>> For SMS I need to count the number of SMS for each participant and
> >>> their
> >>>>>> percentage.
> >>>>>>
> >>>>>> I also need to categorize the probes. So that my database shows
> >>> all the
> >>>>>> activity levels first, organized by none/high/low and then all the
> >>>>>> screenprobes, organized by on and off etc...
> >>>>>>
> >>>>>> I hope that my description is clear and that you can maybe help
> >>> me.
> >>>>>>
> >>>>>> Best,
> >>>>>>
> >>>>>> Rachel
> >>>>>>
> >>>>>>          [[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.
> >>
> >> --
> >> Sent from my phone. Please excuse my brevity.
> >>
> >
> >       [[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.
> >
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>

        [[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

Rich Shepard
In reply to this post by RachT
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Rui Barradas
In reply to this post by Michael Dewey-3
Hello,

In many continental European countries, such as mine, the function to
use is

read.csv2

It defaults to

sep = ";", dec = ","

Note that these functions are in fact calls to read.table with special
default arguments. Another default that changes is header = TRUE.
You might also want to set stringsAsFactors = FALSE since the default
value TRUE is a common source for errors.

Hope this helps,

Rui Barradas

Às 16:45 de 06/01/2019, Michael Dewey escreveu:

> Dear Rachel
>
> Not sure if this is going to help but if it is a csv file then
> read.csv() is your friend. Read the help first in case you need to
> specify what is being used for the decimal point and the separator as if
> it is from the Netherlands they may not be the default settings.
>
> michael
>
> On 06/01/2019 16:37, Rachel Thompson wrote:
>> Hi Jeff,
>>
>> Thanks for your email.
>> 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)
>>
>> Please understand that I am new to this. I will unsubscribe to the
>> mailing
>> list if my question does not belong here.
>>
>> Thanks,
>>
>> Rachel
>>
>> On Sun, Jan 6, 2019 at 11:01 AM Jeff Newmiller <[hidden email]>
>> wrote:
>>
>>> I would not want to leave the impression that I think the task at
>>> hand is
>>> merely tedious... my point is that there are numerous steps involved and
>>> each step depends on information that has not been communicated to the
>>> list, and there is a learning curve even in knowing what to include
>>> in an
>>> email question. What I do think is that knowing enough basic R syntax to
>>> express small bits of the problem in R will be a vast improvement over
>>> attempting to use only English descriptions, and Rachel has to bridge
>>> that
>>> initial gap.
>>>
>>> For example, some images of data were apparently sent to Jim only,
>>> yet he
>>> still does not know in what format the data file is stored, so that
>>> technique was not very effective. One way for the question to become
>>> more
>>> focused is for Rachel to study up on her own how to import data and
>>> provide
>>> us with a "dput" (see the StackOverflow discussion I referenced
>>> before) of
>>> a small sample of data. Another is for Rachel to use basic R syntax to
>>> create an anonymous data set from scratch (also outlined in the SO
>>> discussion). These approaches allow us to keep the focus of our mailing
>>> list discussion on manipulating the data into summaries. Another
>>> approach
>>> is to re-focus the question on importing data by supplying a download
>>> link
>>> to the data so we can make suggestions as to what R commands will handle
>>> this data in its raw form. In any case, we cannot leapfrog over the
>>> data to
>>> the analysis as the question stands.
>>>
>>> Given the above, I have to wonder why Rachel hasn't simply used the tool
>>> she is familiar with... SPSS... to do this? If it is because this is an
>>> academic assignment to learn R then she should be talking to her
>>> institutional support (instructor/teaching assistant/tutoring staff)
>>> anyway
>>> since there is a no-homework policy on this list (and that avenue would
>>> have the benefit of being conducted orally and most likely in her native
>>> language).
>>>
>>>
>>> On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]>
>>> wrote:
>>>> Hi Rachel,
>>>> It looks to me as though the first thing you want to do is to get your
>>>> data, which you attach as images, into a data frame. If these are flat
>>>> files like CSV or TAB, you should be able to read them in with some
>>>> variant of the read.table function. If Excel, look at the various
>>>> Excel import packages. Then you can operate on the data frame by doing
>>>> things like tabulating Participant ID against the code for SMS or call
>>>> (which I assume are those 3000+ numbers). You can take the differences
>>>> in what look like POSIX time values between successive TRUE and FALSE
>>>> screen values to get the duration of screen activity and it looks like
>>>> participant activity is recorded at regular intervals. As Jeff
>>>> suggested, this is really just boring work figuring out how to extract
>>>> the events:
>>>>
>>>> call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
>>>> == _id  & Valuedetailed ==3271)
>>>>
>>>> using suitable logical statements and then tabulating them by
>>>> ParticipantID. If you know how to do that in SPSS, it won't be too
>>>> hard to translate the logical statements into R syntax as above. I may
>>>> have misunderstood the variable names, but I think the logic is clear.
>>>>
>>>> Jim
>>>>
>>>> On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
>>>> <[hidden email]> wrote:
>>>>>
>>>>> Hi Jim,
>>>>>
>>>>> Thank you for the clarification. Since I only work in SPSS and I am
>>> >from Amsterdam I have had problems with specifying what I am trying to
>>>> do in this specific program and also in clear English language.
>>>>>
>>>>> I think I want to indeed aggregate these events for each subject over
>>>> the observation. But in this case several observations.
>>>>> 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 percentages, so I am able to
>>>> say...Subject 36 has low social interactions ( because they only got
>>>> called and texted 500 times in total, while the average of all the
>>>> participants is 10000 or something). I have to come up with the
>>>> percentages myself and define cutoff points of what is considered
>>>> low-medium-high, based on what the results of all the subjects are.
>>>>>
>>>>> I hope that I am as clear as possible .
>>>>>
>>>>>
>>>>> I feel as if I am on my way of understanding it, but since I do not
>>>> clearly know, I am trying out a lot of different codes etc. and I do
>>>> not know if I am doing the right thing. I indeed made a new data frame
>>>> etc, but I still feel a bit lost. Do I need to make one per subject or
>>>> per Probe etc..
>>>>>
>>>>>
>>>>> Thanks for your help. I hope that you can help me resolve this issue.
>>>>>
>>>>>
>>>>> Best,
>>>>>
>>>>>
>>>>> Rachel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
>>>> wrote:
>>>>>>
>>>>>> Hi Rachel,
>>>>>> I'll take a guess and assume that you are monitoring the mobile
>>>> phones
>>>>>> of 36 people, adding an observation every time some specified change
>>>>>> of state is sensed on each device. I'll also assume that you are
>>>> only
>>>>>> recording four types of measurement. It seems that you want to
>>>>>> aggregate these events for each subject over the interval or
>>>>>> observation (or over each day or something). I think you are going
>>>> to
>>>>>> create a new data frame of these summaries from the one you have of
>>>>>> individual observations. Creating each summary doesn't look too
>>>> hard,
>>>>>> but you will have to define more precisely what you want those
>>>>>> summaries to be. For instance, "I want the mean activity level for
>>>>>> each subject during the overall time that their mobile phone is
>>>>>> switched on", One you have clearly defined your goals, it probably
>>>>>> won't be too hard to get to them.
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
>>>>>> <[hidden email]> wrote:
>>>>>>>
>>>>>>> Dear Mr/Mrs,
>>>>>>>
>>>>>>> This is my first time working in R studio.
>>>>>>> I have a database of 36 participants but it has 150600 entries.
>>>>>>> Column -         Column - Column            - Column
>>>>>>>
>>>>>>> Participant       Activityprobe - Activity Level  - High/low/none
>>>>>>>
>>>>>>> Participant       Screenprobe - screenon/off     -
>>>>>>>
>>>>>>> Participant       SMSprobe etc
>>>>>>>
>>>>>>> Participant       CallLogProbe etc.
>>>>>>>
>>>>>>> I need a code that helps me count the activity level of all the
>>>> participants
>>>>>>> High activity level. No activity level and Low activity level.
>>>>>>> And to help me find out for every participant what the percentages
>>>> are of
>>>>>>> all their high/no/low activity.
>>>>>>>
>>>>>>> For screenprobe I need to count how many times the participant
>>>> turned their
>>>>>>> screen on and how many times they turned it off and the percentage
>>>> of
>>>>>>> screen on/off.
>>>>>>>
>>>>>>> For callLog I need to count how many times each participant got
>>>> called and
>>>>>>> the percentage.
>>>>>>>
>>>>>>> For SMS I need to count the number of SMS for each participant and
>>>> their
>>>>>>> percentage.
>>>>>>>
>>>>>>> I also need to categorize the probes. So that my database shows
>>>> all the
>>>>>>> activity levels first, organized by none/high/low and then all the
>>>>>>> screenprobes, organized by on and off etc...
>>>>>>>
>>>>>>> I hope that my description is clear and that you can maybe help
>>>> me.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Rachel
>>>>>>>
>>>>>>>          [[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.
>>>
>>> --
>>> Sent from my phone. Please excuse my brevity.
>>>
>>
>>     [[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

RachT
Hi Rui,

Thank you, I willl look into it.

Best,

Rachel



On Sun, Jan 6, 2019 at 12:27 PM Rui Barradas <[hidden email]> wrote:

> Hello,
>
> In many continental European countries, such as mine, the function to
> use is
>
> read.csv2
>
> It defaults to
>
> sep = ";", dec = ","
>
> Note that these functions are in fact calls to read.table with special
> default arguments. Another default that changes is header = TRUE.
> You might also want to set stringsAsFactors = FALSE since the default
> value TRUE is a common source for errors.
>
> Hope this helps,
>
> Rui Barradas
>
> Às 16:45 de 06/01/2019, Michael Dewey escreveu:
> > Dear Rachel
> >
> > Not sure if this is going to help but if it is a csv file then
> > read.csv() is your friend. Read the help first in case you need to
> > specify what is being used for the decimal point and the separator as if
> > it is from the Netherlands they may not be the default settings.
> >
> > michael
> >
> > On 06/01/2019 16:37, Rachel Thompson wrote:
> >> Hi Jeff,
> >>
> >> Thanks for your email.
> >> 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)
> >>
> >> Please understand that I am new to this. I will unsubscribe to the
> >> mailing
> >> list if my question does not belong here.
> >>
> >> Thanks,
> >>
> >> Rachel
> >>
> >> On Sun, Jan 6, 2019 at 11:01 AM Jeff Newmiller <
> [hidden email]>
> >> wrote:
> >>
> >>> I would not want to leave the impression that I think the task at
> >>> hand is
> >>> merely tedious... my point is that there are numerous steps involved
> and
> >>> each step depends on information that has not been communicated to the
> >>> list, and there is a learning curve even in knowing what to include
> >>> in an
> >>> email question. What I do think is that knowing enough basic R syntax
> to
> >>> express small bits of the problem in R will be a vast improvement over
> >>> attempting to use only English descriptions, and Rachel has to bridge
> >>> that
> >>> initial gap.
> >>>
> >>> For example, some images of data were apparently sent to Jim only,
> >>> yet he
> >>> still does not know in what format the data file is stored, so that
> >>> technique was not very effective. One way for the question to become
> >>> more
> >>> focused is for Rachel to study up on her own how to import data and
> >>> provide
> >>> us with a "dput" (see the StackOverflow discussion I referenced
> >>> before) of
> >>> a small sample of data. Another is for Rachel to use basic R syntax to
> >>> create an anonymous data set from scratch (also outlined in the SO
> >>> discussion). These approaches allow us to keep the focus of our mailing
> >>> list discussion on manipulating the data into summaries. Another
> >>> approach
> >>> is to re-focus the question on importing data by supplying a download
> >>> link
> >>> to the data so we can make suggestions as to what R commands will
> handle
> >>> this data in its raw form. In any case, we cannot leapfrog over the
> >>> data to
> >>> the analysis as the question stands.
> >>>
> >>> Given the above, I have to wonder why Rachel hasn't simply used the
> tool
> >>> she is familiar with... SPSS... to do this? If it is because this is an
> >>> academic assignment to learn R then she should be talking to her
> >>> institutional support (instructor/teaching assistant/tutoring staff)
> >>> anyway
> >>> since there is a no-homework policy on this list (and that avenue would
> >>> have the benefit of being conducted orally and most likely in her
> native
> >>> language).
> >>>
> >>>
> >>> On January 6, 2019 1:12:46 AM PST, Jim Lemon <[hidden email]>
> >>> wrote:
> >>>> Hi Rachel,
> >>>> It looks to me as though the first thing you want to do is to get your
> >>>> data, which you attach as images, into a data frame. If these are flat
> >>>> files like CSV or TAB, you should be able to read them in with some
> >>>> variant of the read.table function. If Excel, look at the various
> >>>> Excel import packages. Then you can operate on the data frame by doing
> >>>> things like tabulating Participant ID against the code for SMS or call
> >>>> (which I assume are those 3000+ numbers). You can take the differences
> >>>> in what look like POSIX time values between successive TRUE and FALSE
> >>>> screen values to get the duration of screen activity and it looks like
> >>>> participant activity is recorded at regular intervals. As Jeff
> >>>> suggested, this is really just boring work figuring out how to extract
> >>>> the events:
> >>>>
> >>>> call_indices<-which(Probetype == xxxxxxCallLogProbe & ValueSpecified
> >>>> == _id  & Valuedetailed ==3271)
> >>>>
> >>>> using suitable logical statements and then tabulating them by
> >>>> ParticipantID. If you know how to do that in SPSS, it won't be too
> >>>> hard to translate the logical statements into R syntax as above. I may
> >>>> have misunderstood the variable names, but I think the logic is clear.
> >>>>
> >>>> Jim
> >>>>
> >>>> On Sun, Jan 6, 2019 at 4:07 PM Rachel Thompson
> >>>> <[hidden email]> wrote:
> >>>>>
> >>>>> Hi Jim,
> >>>>>
> >>>>> Thank you for the clarification. Since I only work in SPSS and I am
> >>> >from Amsterdam I have had problems with specifying what I am trying to
> >>>> do in this specific program and also in clear English language.
> >>>>>
> >>>>> I think I want to indeed aggregate these events for each subject over
> >>>> the observation. But in this case several observations.
> >>>>> 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 percentages, so I am able to
> >>>> say...Subject 36 has low social interactions ( because they only got
> >>>> called and texted 500 times in total, while the average of all the
> >>>> participants is 10000 or something). I have to come up with the
> >>>> percentages myself and define cutoff points of what is considered
> >>>> low-medium-high, based on what the results of all the subjects are.
> >>>>>
> >>>>> I hope that I am as clear as possible .
> >>>>>
> >>>>>
> >>>>> I feel as if I am on my way of understanding it, but since I do not
> >>>> clearly know, I am trying out a lot of different codes etc. and I do
> >>>> not know if I am doing the right thing. I indeed made a new data frame
> >>>> etc, but I still feel a bit lost. Do I need to make one per subject or
> >>>> per Probe etc..
> >>>>>
> >>>>>
> >>>>> Thanks for your help. I hope that you can help me resolve this issue.
> >>>>>
> >>>>>
> >>>>> Best,
> >>>>>
> >>>>>
> >>>>> Rachel
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Sat, Jan 5, 2019 at 9:03 PM Jim Lemon <[hidden email]>
> >>>> wrote:
> >>>>>>
> >>>>>> Hi Rachel,
> >>>>>> I'll take a guess and assume that you are monitoring the mobile
> >>>> phones
> >>>>>> of 36 people, adding an observation every time some specified change
> >>>>>> of state is sensed on each device. I'll also assume that you are
> >>>> only
> >>>>>> recording four types of measurement. It seems that you want to
> >>>>>> aggregate these events for each subject over the interval or
> >>>>>> observation (or over each day or something). I think you are going
> >>>> to
> >>>>>> create a new data frame of these summaries from the one you have of
> >>>>>> individual observations. Creating each summary doesn't look too
> >>>> hard,
> >>>>>> but you will have to define more precisely what you want those
> >>>>>> summaries to be. For instance, "I want the mean activity level for
> >>>>>> each subject during the overall time that their mobile phone is
> >>>>>> switched on", One you have clearly defined your goals, it probably
> >>>>>> won't be too hard to get to them.
> >>>>>>
> >>>>>> Jim
> >>>>>>
> >>>>>> On Sun, Jan 6, 2019 at 5:39 AM Rachel Thompson
> >>>>>> <[hidden email]> wrote:
> >>>>>>>
> >>>>>>> Dear Mr/Mrs,
> >>>>>>>
> >>>>>>> This is my first time working in R studio.
> >>>>>>> I have a database of 36 participants but it has 150600 entries.
> >>>>>>> Column -         Column - Column            - Column
> >>>>>>>
> >>>>>>> Participant       Activityprobe - Activity Level  - High/low/none
> >>>>>>>
> >>>>>>> Participant       Screenprobe - screenon/off     -
> >>>>>>>
> >>>>>>> Participant       SMSprobe etc
> >>>>>>>
> >>>>>>> Participant       CallLogProbe etc.
> >>>>>>>
> >>>>>>> I need a code that helps me count the activity level of all the
> >>>> participants
> >>>>>>> High activity level. No activity level and Low activity level.
> >>>>>>> And to help me find out for every participant what the percentages
> >>>> are of
> >>>>>>> all their high/no/low activity.
> >>>>>>>
> >>>>>>> For screenprobe I need to count how many times the participant
> >>>> turned their
> >>>>>>> screen on and how many times they turned it off and the percentage
> >>>> of
> >>>>>>> screen on/off.
> >>>>>>>
> >>>>>>> For callLog I need to count how many times each participant got
> >>>> called and
> >>>>>>> the percentage.
> >>>>>>>
> >>>>>>> For SMS I need to count the number of SMS for each participant and
> >>>> their
> >>>>>>> percentage.
> >>>>>>>
> >>>>>>> I also need to categorize the probes. So that my database shows
> >>>> all the
> >>>>>>> activity levels first, organized by none/high/low and then all the
> >>>>>>> screenprobes, organized by on and off etc...
> >>>>>>>
> >>>>>>> I hope that my description is clear and that you can maybe help
> >>>> me.
> >>>>>>>
> >>>>>>> Best,
> >>>>>>>
> >>>>>>> Rachel
> >>>>>>>
> >>>>>>>          [[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.
> >>>
> >>> --
> >>> Sent from my phone. Please excuse my brevity.
> >>>
> >>
> >>     [[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 Rich Shepard
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Hasan Diwan-2
Maybe you could put the CSV in a gist or something? -- H

On Sun, 6 Jan 2019 at 10:58, 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.
>


--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Rich Shepard
In reply to this post by RachT
On Sun, 6 Jan 2019, Rachel Thompson wrote:

> 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.

Rachel,

   Those more experienced with R than am I will probably offer their
thoughts, too.

   It looks to me that you want counts of various parameters for each
participant, and perhaps groups of participants. When I read this I see SQL
SELECT count() statements on database tables, not descriptive or explanatory
statistical results.

   Not knowing your computer's OS or whether there is a relational database
magagement system installed I can't offer specific suggestions. A database
would provide counts of each *Probe as well as combinations. If you want to
go that route contact me off the mail list and I'll suggest mail lists for
help if you use Microsoft products as I know only PostgreSQL and SQLite.

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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Richard M. Heiberger
In reply to this post by RachT
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

K. Elo-2
In reply to this post by RachT
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

PIKAL Petr
In reply to this post by RachT
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

Hasan Diwan-2
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mailinglist

PIKAL Petr
In reply to this post by PIKAL Petr
And depending on your further intentions with data, functions ave or aggregate could also be worth to check.

Cheers
Petr

>
> 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.
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.
12