R basic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

R basic

Hye Joon Yoon
Can anyone help with scripting the commands below?

1. Add/create a new column to df and name it as ShortPause .
2. Convert ShortPause as a factor variable.
3. ShortPause will have two levels (short and long). Assign short if pause
is smaller than 0.1, and assign
long otherwise.
4. How many ‘syntax==intransitive’ observations were realized with a tap
(tapped==Tapped)? (Use xtabs()
and ftable() to calculate this.)

        [[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: R basic

Boris Steipe
Hi -

This list has a "no homework" policy, but we can certainly help once you show what effort you have put into this yourself. Read the posting guide, especially regarding the instructions re. reproducible examples, and follow them exactly.

Cheers,
B.




> On Nov 9, 2017, at 10:05 AM, Hye Joon Yoon <[hidden email]> wrote:
>
> Can anyone help with scripting the commands below?
>
> 1. Add/create a new column to df and name it as ShortPause .
> 2. Convert ShortPause as a factor variable.
> 3. ShortPause will have two levels (short and long). Assign short if pause
> is smaller than 0.1, and assign
> long otherwise.
> 4. How many ‘syntax==intransitive’ observations were realized with a tap
> (tapped==Tapped)? (Use xtabs()
> and ftable() to calculate this.)
>
> [[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: R basic

jean-philippe fontaine
In reply to this post by Hye Joon Yoon
Hi,

Since you didn't provide us any detail of what you tried to do so far, I
can point you out to the dplyr library.
It will make your life easier while dealing with dataframes (well at
least it makes mine easier).


Cheers


Jean-Philippe
On 09/11/2017 16:05, Hye Joon Yoon wrote:

> Can anyone help with scripting the commands below?
>
> 1. Add/create a new column to df and name it as ShortPause .
> 2. Convert ShortPause as a factor variable.
> 3. ShortPause will have two levels (short and long). Assign short if pause
> is smaller than 0.1, and assign
> long otherwise.
> 4. How many ‘syntax==intransitive’ observations were realized with a tap
> (tapped==Tapped)? (Use xtabs()
> and ftable() to calculate this.)
>
> [[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.

--
Jean-Philippe Fontaine
PhD Student in Astroparticle Physics,
Gran Sasso Science Institute (GSSI),
Viale Francesco Crispi 7,
67100 L'Aquila, Italy
Mobile: +393487128593, +33615653774

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