mercredi 10 octobre 2018

Looping and creating a new summary table

I'm quite new at R and I have to do a project in which I have to create a summary table of 60000 entries. My dataset is a comparison of 3 types of one website (3 different morphs) with SEO purposes. The 60 000 entries are the clicks of different users on the website, so in which order they click on different links. As you can see from the picture 'dataset', there are various different entries per one user and I need to create a summary table of all the entries of all the different users. I want to create a column with a new row for each user which sums up all the different clicks they have done. I know I have to do something with looping, but I don't understand it quite yet... This is what I have now;

for (i in dsData) {if(dsData$user[i] == dsData$user[i-1]) {}

I know my question is pretty vague... Sorry haha. If anyone could help me it would be great!! Dataset

Aucun commentaire:

Enregistrer un commentaire