Hello,
I'm trying to manipulate a database with 300+ observations, but each observation has a different number of columns. The problem is that from a certain point, the columns start repeating themselves, but they have different values and I wanted to somehow put them together.
What I want essentially is, within an object, to save the information of each observation in a way that helps in the visualization.
For example:
a b c d e c d e c d e
Obs_1 AA BB CC 8.3 A SSD 2.3 RN S76 5 A
Obs_2 SS DA LL 5 A SDD AD23 8.2 A
And I would like to transform into something like this:
a b c d e
Obs_1 AA BB CC76 8.3 A
SSD89 2.3 RN
S76 5 A
Obs_2 SS DA LL 5 A
SDD
AD23 8.2 A
Is it possible to do this in a non-manual way in R? Note also that there are values in the database that have no value, some values the R complete with NA, others it simply leaves blank.