I recently worked on a dummy dataset, and I found out that the data provided to me was on the same line. A similar example for him is depicted as follows:
Name,Age,Gender,Occupation A,10,M,Student B,11,M,Student C,11,F,Student
I want to import data and get output as follows:
Name Age Gender Occupation
A 10 M Student
B 11 M Student
C 12 F Student
a case may arise where the value may be absent. importing such data requires logic. Can anyone help me build the import logic of such datasets.
I tried regular import, but it really didn't help. just imported the file using the function read.csv(), and this did not give me the expected result.
EDIT: what if the data is similar:
Name,Age,Gender,Occupation ABC XYZ,10,M,Student B,11,M,Student C,11,F,Student
and I need a conclusion like:
Name Age Gender Occupation
ABC XYZ 10 M Student
B 11 M Student
C 12 F Student