I have this DF
email date user_ipaddress other data
1 x@bla.com 2020-03-24 177.95.75.230 xxxx
2 x@bla.com 2020-04-02 177.139.49.93 yyyy
3 x@bla.com 2020-04-02 177.139.49.93 zzzz
and I want to transform this data to the shape it is going to be stored
the whole problem would be a big data frame with distinct emails and I want to reduce all data for each email in a single row like so
email date user_ipaddress other data
1 x@bla.com 2020-04-02 c('177.95.75.230','177.139.49.93') c('xxxx','yyyy','zzzz')
actually, if someone could help me only with the case that there is only one email address it would save my life but feel free to help with the whole problem
using
ipadreessVec<-Reduce(append,x =df$network_userid)
I can get my vector c('177.95.75.230','177.139.49.93') but if i try to make
newdf$network_userid<-a
I get
Error in `$<-.data.frame`(`*tmp*`, network_userid, value = c("20562206-f557-48a3-861b-5d1e18524bbb", :
replacement has 3 rows, data has 1
any answer that makes me go a step further will get a approve even if it does not solve everything.