Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

How to keep the first four strings in a list?

$
0
0

I have a list of 49 rows. Each line in the list contains a series of strings like below:

[[1]]
 [1] "ANGEL""Jan""R""26""PO""Box""40426""Olympia""WA""98504"  

[[2]]
 [1] "BAILEY""Barbara""R""10""PO""Box""40410""Olympia""WA""98504"

What I am trying to figure out is how to keep the first four strings in every row and to remove everything else. I'm not experienced with strings and am struggling to do this. Can anyone make a suggestion?

Thank you.


Viewing all articles
Browse latest Browse all 201894

Trending Articles