s-news
[Top] [All Lists]

substring with different formats

To: <s-news@lists.biostat.wustl.edu>
Subject: substring with different formats
From: "Boylan, Richard" <rboylan@bus.olemiss.edu>
Date: Sat, 7 Jul 2001 13:35:11 -0500
Thread-index: AcEHE45JnjcBIw+kTTORhqXSuS72tw==
Thread-topic: substring with different formats
Hello: I was wondering if anyone had extended the * substring * command to allow for something
like this:
 
x <- c("Alabama, Northern", "Alaska", "Georgia, Southern")
unpaste( x, ",")
 
[[1]] "Alabama"  "Alaska"  "Georgia"
[[2]] "Northern" "NA"  "Southern"
 
In other words, extending unpaste to the case in which the separtor does not exist for all
observations.
 
Thanks.
 
Richard
<Prev in Thread] Current Thread [Next in Thread>