Within a data frame (see below), I would like to compute the frequency of each activity/event (see second column). The frequency of the events should be shown in the appropriate columns (third until sixth).

```user  activity                              Open Docu     Read Docu     Edit Docu   Close Docu
1     c("Open Docu", "Close Docu",…)
3     c("Open Docu", "Close Docu",…)
4     c("Open Docu", "Edit Docu",…)```

E.g. in column 3 (Open Document) and row 2 (user 1) should be written the number "1" and in column 6 (Close Document) should also be computed "1".

Or if user 4 edits a document five times, then "5" should be shown in column 5 (Edit Document) and row 5 (user 4).

How can I apply a loop-function (due to a massive amount of users) to count the frequency in each cell?

Dec 3, 2019 1,191 views

## Counting the frequency of unique values - R

Hi, You can use plyr module. It will give ...READ MORE

## Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

## What is the difference between [] and [[]] notations to access the elements of a list or dataframe in R?

R provides 3 basic indexing operators. Refer ...READ MORE

## R function for finding the index of an element in a vector?

The function match works on vectors : x <- sample(1:10) x # ...READ MORE

## How can I control the size of points in an R scatterplot?

plot(variable, type='o' , pch=5, cex=.3) The pch argument ...READ MORE

+1 vote

## Locating row index of a column which has the maximum value - R

Hi, Nirvana You can also try this. which(iris\$Sepal.Length == ...READ MORE

+1 vote

## How to convert a list of vectors with various length into a Data.Frame?

We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE

## In data frame how to spilt strings into values?

You can do this using dplyr and ...READ MORE