Displaying 1 result from an estimated 1 matches for "prvdr_num".
2012 Mar 10
1
Subsetting a data.frame -> Read in with FWF format from .DAT file
Hi there,
I am having trouble subsetting a data frame by a conditional via one column
(of many).
I read the file into R through "read.fwf," where I specified column widths.
Original data is .DAT. I then utilized "names" function to read in column
headings.
For one column, PRVDR_NUM, I wish to further amend the entire data set, but
only have PRVDR_NUM == 050108. This is where I'm having trouble.
I've tried code like this:
newinpatient <- subset(oldinpatient, oldinpatient$PRVDR_NUM == 050108)
#OR
newinpatient <- oldinpatient[oldinpatient$PRVDR_NUM == 050108, ]...