[R] Extracting files per types of data file
Pedro páramo
percent||101 @end|ng |rom gm@||@com
Sat May 16 10:21:10 CEST 2020
Hi all,
For many years I have left R in my daily task but I have returned.
I write to try to get your help on what function look for to program the
next:
My data file is a csv file with lots of data and at the end it ends
with \r\n
Imagine
Name ; Surname; Code; age; CP; \r\n
Oscar ; example ; 1; 42; 4857; \r\n
Maria; Ex3; 2; 33; 879;\r\n
Luz; pruve; 1; 42; 4785; \r\n
I want to run a function that detects all different items in Code in this
case "1" and "2" and output two files named "1.csv or txt" and "2.csv or
txt" and in this file contain the rows withs all items where Code is 1 and
so on.
The thing is thar I dont know exactly how many different codes are there,
so the programm should "count them" and extract the differents codes and
output the equivalent files of the same kind of code.
It is possible with R? I use big files (and in excel is tedious).
Can you suggest some functions to analyse and to achieve my goal?
Many thanks in advance
[[alternative HTML version deleted]]
More information about the R-help
mailing list