Here is a sample of the data that I am working with. Dates may go back as far as 1930?s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCentury(Date = df[1,?TERM DATE?) it will return the correct date. However, if I use the function as follows DateCentury[,?TERM DATE?]) it does not work. Anyhow, I have been at this awhile and I am totally stumped. I need to refactor the below date vectors across just under 50,000 observations. Any suggestions would be greatly appreciated. Best, Glenn DateCentury <- function(Date = "character"){ ThisDate = as.Date(Date, format = "%m/%d/%y", origin = "1900-01-01") CurrDate = as.Date(Sys.Date()) Century = as.Date("1999-12-31", format = "%Y-%m-%d", origin = "1900-01-01") NewDate <- if(ThisDate > CurrDate){ if(nchar(Date) == 6){ paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") } else { if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") } else { paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") } } } else { if(ThisDate <= Century){ if(nchar(Date) == 6){ paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") } else { if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") } else { paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") } } } else { if(nchar(Date) == 6){paste(substr(Date,1,4),"20", substr(Date,5,6),sep ="") } else { if(nchar(Date) == 7){paste(substr(Date,1,5),"20", substr(Date,6,7),sep ="") } else { paste(substr(Date,1,6),"20", substr(Date,7,8),sep ="") } } } } return(NewDate)} Data structure(list(`HUD PROJECT NUMBER` = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 39L, 43L, 46L, 47L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 58L, 59L, 60L, 61L, 62L, 66L, 68L, 69L, 74L, 77L, 78L, 82L, 83L, 84L, 87L, 88L, 89L, 90L, 91L, 98L, 99L, 100L, 101L, 102L, 103L, 104L, 105L, 107L, 108L, 110L, 111L, 112L, 113L, 114L, 116L, 118L, 119L, 120L, 121L, 122L, 123L, 125L, 135L, 140L, 141L, 144L, 146L, 9001L, 9002L, 10001L, 10004L, 10005L, 10007L, 10008L, 10010L, 10011L, 10501L, 10502L, 10503L, 10504L, 10505L, 10506L, 10507L, 10508L, 10510L, 10515L, 10516L, 10517L, 10518L, 10519L, 10520L, 10521L, 10522L, 10523L, 10525L, 10526L, 10527L, 10528L, 10529L), `PROPERTY NAME` = c("COLONIAL VILLAGE APTS", "COLONIAL VILLAGE APTS", "FALKLAND APTS", "COLONIAL VILLAGE APTS", "BRENTWOOD VILLAGE", "FALKLAND APTS", "BUCKINGHAM II", "FIRST BUCKINGHAM", "PARKBELT HOMES", "BUCKINGHAM III", "SKYLAND APTS", "BUCKINGHAM IV", "WESTOVER APTS", "MT VERNON DEV", "ARLINGTON VILLAGE APTS", "FAIRFAX VILLAGE III", "BUCKINGHAM V", "SUBURBAN GARDENS", "BUCKINGHAM III", "PINEY BRANCH APTS", "AUBURN GARDENS", "BUCKINGHAM V", "BUCKINGHAM IV", "GLEBE COURT APTS", "BARCROFT APTS", "FAIRFAX VILLAGE IV", "BELLEVUE GARDENS", "FILLMORE CO INC", "BRADLEY BLVD APTS", "2702 WISCONSIN", "WINCHESTER SUMMIT", "BUCKINGHAM II", "ARLINGTON TOWERS", "ARLINGTON TOWERS", "ARLINGTON TOWERS", "BRADDOCK LEE APT I", "BRADDOCK LEE APT II", "BRADDOCK LEE APT III", "BRADDOCK LEE APT IV", "BRADDOCK LEE APT V", "4600 CONN COOP", "GARFIELD APTS", "CATHEDERAL PK TOW", "SECOND PKSIDE APT", "THE ENVOY", "CARDINAL HOUSE", "TUNLAW PARK APTS", "RAVENWOOD TOWERS", "PARKSIDE APTS", "PARK BERKSHIRE APTS", "JOHN MARSHALL APTS", "MATTAPONY MANOR", "MOSBY VILLAGE APTS", "RIVER TOWERS", "", "BARNETT HOUSE", "RIVERS TOWERS II", "FAIRHAVEN GARDENS", "CIRCLE APARTMENTS", "HYBLA VALLEY MOBLE HMS", "PARK PLAZA APTS", "ENVOY TOWERS", "C H HOUSTON APTS", "DUMFRIES MOBILE HM VLG", "SKYLINE TOWERS APTS I", "SKYLINE CENTER APTS", "CHESTNUT GROVE APTS", "BRENTANA GARDENS", "GREGORY ESTATES", "BARNABY GARDENS", "C H HOUSTON APTS", "HIGHVIEW TERRACE", "CHESTNUT GROVE APTS", "ROCKVILLE NRSNG HOME", "STANTON-WELLINGTON APTS. DBA F", "COLLINSWOOD NURSING HOME", "SHADY GROVE ADVENTIST NURSING", "GLENDALE LAKE APTS", "GARFIELD COURT", "COUNTRYSIDE APTS", "INVIEW HOUSE", "TOP OF THE PARK", "SUMMIT CREST APTS", "BRADFORD PLACE", "HILLSIDE TERR APTS", "OAK HILL APTS", "PARK BERKSHIRE APTS I", "CARROLLAN MANOR", "LANSDOWNE VILLAGE APTS", "GATEWAY SQUARE", "KIRKWOOD VILLAGE APTS", "GOODACRE APTS", "PENN SOUTHERN APTS.", "WOODMONT PARK APTS", "FINIANS CT", "ROCKFORDTHE", "ISABELLA PARK APARTMENTS", "GREENTREE III", "", "MARLOW HEIGHTS SECTION A"), `PROPERTY STREET` = c("1913 WILSON BLVD", "1913 WILSON BLVD", "8305 16TH STREET", "1913 WILSON BLVD", "1287 BRENTWOOD RD NE", "8305 16TH STREET", "313 N GLEBE RD", "313 N GLEBE RD", "", "313 N GLEBE RD", "2307 SKYLAND PL SE", "313 N GLEBE RD", "1649 N LONGFELLOW", "", "1021 S BARTON", "2019 37TH ST SE", "313 N GLEBE RD", "4904 JAY ST NE", "313 N GLEBE RD", "8400 PINEY BRANCH RD", "101 GLEBE ROAD E", "313 N GLEBE RD", "313 N GLEBE RD", "", "1130 S GEORGE MASON DR", "2019 37TH ST SE", "", "", "", "2702 WISCONSIN AVE", "", "313 N GLEBE RD", "1101 ARLINGTON BLVD", "1011 ARLINGTON BLVD", "1011 ARLINGTON BLVD", "3810 KING ST", "3810 KING ST", "3810 KING ST", "3810 KING ST", "3810 KING ST", "4600 CONNECTICUT AVE NW", "5410 CONNECTICUT AVE NW", "3100 CONNECTICUT AVE NW", "", "2144 CALIFORNIA ST NW", "3000 SPOUT RUN PKWY", "3850 TUNLAW RD NW", "6166 LEESBURG PIKE", "10520 MONTROSE AVE", "6317 PENNSYLVANIA AVE", "", "5002 57TH AVE", "10560 MAIN ST", "6631 WAKEFIELD DRIVE", "", "201 MASSACHUSETTS AVE NE", "6631 WAKEFIELD DRIVE", "JERMANTOWN ROAD", "2030 N ADAMS ST", "BARGIN CITY-HYBLA VALLEY", "1629 COLUMBIA RD NW", "2400 16TH ST NW", "1712 16TH ST NW", "DUMFRIES", "5601 SEMINARY ROAD", "5600 SEMINARY ROAD", "11200 CHESTNUT GROVE SQ", "", "7618 GEORGE PALMER HGWY", "3876 9TH ST SE", "1714 16TH ST NW", "6800-7021 HIGHVIEW TER", "11200 CHESTNUT GROVE SQ", "303 ADCLARE ROAD", "2549 ELVANS RD SE", "299 HURLEY AVENUE", "9701 MEDICAL CENTER DRIVE", "10001 GREENBELT RD", "5701 43RD AVE", "9971 GOODLUCK RD", "6161 EDSALL ROAD", "4009 GALLATIN ST", "38 N SUMMIT AVE", "3506 SILVER PARK RD", "1805-1910 23RD ST SE", "11497 COLUMBIA PIKE", "6301 PENNSYLVANIA AVE", "8621 ANNAPOLIS RD", "1720 BRIGHTSEAT RD", "4855 ST. BARNABAS RD", "2731 NICHOLSON", "8619 PINEY BRANCH RD", "", "1001 ROCKVILLE PIKE", "7756 FINNS LANE", "1444 ROCK CREEK FORD RD", "2214 PHELPS ROAD", "8051 GREENLEAF TERR", "", "4223 28TH AVE"), `PROPERTY CITY` = c("ARLINGTON", "ARLINGTON", "SILVER SPRING", "ARLINGTON", "WASHINGTON", "SILVER SPRING", "ARLINGTON", "ARLINGTON", "GREENBELT", "ARLINGTON", "WASHINGTON", "ARLINGTON", "ARLINGTON", "ALEXANDRIA", "ARLINGTON", "WASHINGTON", "ARLINGTON", "WASHINGTON", "ARLINGTON", "SILVER SPRING", "ALEXANDRIA", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "WASHINGTON", "WASHINGTON", "ARLINGTON", "BETHESDA", "WASHINGTON", "WASHINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "WASHINGTON", "WASHINGTON", "WASHINGTON", "ROCKVILLE", "WASHINGTON", "ARLINGTON", "WASHINGTON", "SEVEN CORNERS", "BETHESDA", "SUITLAND-SILVER HI", "WASHINGTON", "BLADENSBURG", "FAIRFAX", "ALEXANDRIA", "", "WASHINGTON", "ALEXANDRIA", "FAIRFAX", "ARLINGTON", "FAIRFAX", "WASHINGTON", "WASHINGTON", "WASHINGTON", "DUMFRIES", "BAILEY'S CROSSROAD", "BAILEY'S CROSSROAD", "RESTON", "RESTON", "SEAT PLEASANT", "WASHINGTON", "WASHINGTON", "HYATTSVILLE", "RESTON", "ROCKVILLE", "WASHINGTON", "ROCKVILLE", "ROCKVLLE", "LANHAM-SEABROOK", "HYATTSVILLE", "HYATTSVILLE", "ALEXANDRIA", "HYATTSVILLE", "GAITHERSBURG", "SUITLAND-SILVER HI", "WASHINGTON", "SILVER SPRING", "FORESTVILLE", "LANHAM-SEABROOK", "LANDOVER", "PRINCE GEORGE'S CO", "HYATTSVILLE", "SILVER SPRING", "SILVER SPRING", "PURCELLVILLE", "LANHAM-SEABROOK", "WASHINGTON", "ADELPHI", "GLEN BURNIE", "", "SUITLAND-SILVER HI"), `PROPERTY STATE` = c("VA", "VA", "MD", "VA", "DC", "MD", "VA", "VA", "MD", "VA", "DC", "VA", "VA", "VA", "VA", "DC", "VA", "DC", "VA", "MD", "VA", "VA", "VA", "VA", "VA", "DC", "DC", "VA", "MD", "DC", "DC", "VA", "VA", "VA", "VA", "VA", "VA", "VA", "VA", "VA", "DC", "DC", "DC", "MD", "DC", "VA", "DC", "VA", "MD", "MD", "DC", "MD", "VA", "VA", "", "DC", "VA", "VA", "VA", "VA", "DC", "DC", "DC", "VA", "00", "VA", "VA", "VA", "MD", "DC", "DC", "MD", "VA", "MD", "DC", "MD", "MD", "MD", "MD", "MD", "VA", "MD", "MD", "MD", "DC", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "VA", "MD", "DC", "MD", "MD", "", "MD" ), `PROPERTY ZIP` = c("22201", "22201", "20910", "22201", "20018", "20910", "22203", "22203", "20770", "22203", "20020", "22203", "22205", "00000", "22204", "20020", "22203", "20019", "22203", "20901", "22305", "22203", "22203", "00000", "22204", "20020", "00000", "00000", "20014", "20007", "00000", "22203", "22209", "22209", "22209", "22302", "22302", "22302", "22302", "22302", "20008", "20015", "20008", "00000", "20008", "22201", "20007", "22044", "20014", "20023", "00000", "20710", "22030", "22037", "00000", "20002", "22307", "22030", "22201", "22030", "20009", "20009", "20009", "22026", "22041", "22041", "22090", "22037", "20027", "20032", "20005", "20782", "22090", "20850", "20020", "20850", "20850", "20801", "20781", "20706", "22304", "20785", "20877", "20746", "20020", "20904", "20747", "20706", "20785", "20748", "20782", "20901", "20910", "20850", "20801", "20011", "20783", "00000", "00000", "20748"), UNITS = c(274L, 464L, 181L, 237L, 440L, 303L, 98L, 524L, 10L, 200L, 223L, 192L, 153L, 57L, 655L, 207L, 276L, 204L, 112L, 214L, 304L, 176L, 248L, 77L, 423L, 214L, 251L, 181L, 161L, 80L, 41L, 98L, 366L, 415L, 434L, 40L, 58L, 80L, 40L, 40L, 267L, 166L, 323L, 120L, 113L, 229L, 284L, 304L, 170L, 336L, 30L, 154L, 205L, 168L, 0L, 95L, 175L, 76L, 116L, 250L, 274L, 332L, 45L, 156L, 470L, 470L, 225L, 240L, 503L, 79L, 46L, 306L, 224L, 100L, 398L, 160L, 170L, 443L, 62L, 451L, 207L, 106L, 232L, 213L, 192L, 281L, 336L, 187L, 345L, 297L, 750L, 156L, 308L, 414L, 57L, 66L, 445L, 1122L, 0L, 0L), `INITIAL ENDORSEMENT DATE` = c("4/20/35", "12/9/35", "9/11/36", "2/8/37", "8/3/37", "8/19/37", "3/15/40", "8/3/37", "5/13/38", "4/13/38", "3/7/39", "8/26/38", "8/24/39", "8/18/39", "1/4/39", "2/24/40", "1/4/39", "4/11/41", "5/9/39", "7/10/40", "8/19/40", "7/15/40", "4/14/41", "7/15/41", "10/23/41", "9/30/41", "7/16/43", "4/23/42", "3/13/42", "6/8/42", "1/18/43", "9/23/44", "1/29/54", "4/30/54", "1/14/54", "9/28/54", "12/1/54", "2/8/55", "1/4/55", "11/4/54", "4/16/59", "5/1/58", "6/10/59", "10/1/58", "9/20/60", "12/4/58", "2/17/60", "4/13/61", "1/18/61", "6/2/61", "6/19/61", "1/25/62", "11/26/62", "3/14/62", "5/4/62", "9/26/62", "8/10/62", "6/3/63", "11/6/63", "8/15/63", "10/11/63", "12/11/63", "8/26/65", "10/27/71", "10/10/72", "1/10/73", "8/3/71", "2/7/72", "7/1/70", "5/1/73", "2/24/78", "8/31/81", "9/17/80", "4/16/82", "1/19/89", "5/21/08", "4/4/08", "5/26/83", "7/11/83", "11/16/83", "6/30/83", "5/26/83", "5/26/83", "6/27/83", "5/13/83", "6/29/83", "1/30/84", "10/25/84", "10/25/84", "10/25/84", "7/28/83", "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", "8/1/83", "7/28/83", "6/20/85", "6/20/85"), `FINAL ENDORSEMENT DATE` = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "9/20/60", "", "", "", "", "", "", "", "", "", "", "11/25/64", "", "", "", "", "8/24/65", "", "2/14/67", "", "1/10/73", "1/10/73", "", "", "", "12/6/82", "2/24/78", "8/31/81", "", "4/16/82", "5/24/91", "7/14/09", "4/4/08", "5/26/83", "7/11/83", "11/16/83", "", "5/26/83", "5/26/83", "6/27/83", "5/16/83", "6/29/83", "1/31/84", "10/25/84", "10/25/84", "10/25/84", "7/28/83", "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", "8/1/83", "7/28/83", "6/20/85", "6/20/85"), `ORIGINAL MORTGAGE AMOUNT` = c("875,000", "1,480,000", "840,000", "725,000", "1,650,000", "1,225,000", "319,000", "1,825,000", "35,000", "650,000", "760,000", "725,000", "410,000", "165,000", "2,385,000", "701,000", "1,035,000", "692,000", "490,000", "815,000", "942,000", "610,000", "935,000", "260,000", "1,500,000", "830,000", "980,000", "660,000", "630,000", "265,000", "139,000", "283,000", "4,301,100", "3,831,000", "4,482,200", "313,700", "462,200", "641,800", "312,000", "312,100", "4,103,600", "2,313,100", "5,626,500", "1,271,600", "1,447,200", "2,838,400", "4,434,100", "3,640,900", "1,905,700", "2,893,200", "270,300", "1,480,000", "3,048,165", "2,365,427", "1,138,600", "1,129,200", "2,436,300", "752,500", "1,691,900", "450,000", "3,799,363", "4,626,400", "484,500", "561,600", "10,795,600", "11,081,000", "4,248,400", "3,714,938", "1,909,441", "436,825", "25,000", "348,700", "173,400", "55,100", "4,311,301", "462,300", "1,170,000", "8,499,800", "1,065,700", "13,387,500", "5,880,000", "1,500,000", "3,846,600", "5,300,000", "1,750,000", "4,600,000", "5,653,000", "3,000,000", "5,000,000", "5,000,000", "7,500,000", "1,600,000", "6,500,000", "7,300,000", "1,350,000", "1,260,900", "8,081,100", "21,988,600", "10,675,000", "4,600,000"), `FIRST PAYMENT DATE` = c("1/1/36", "3/1/37", "4/1/38", "5/1/38", "10/1/38", "6/1/39", "12/1/39", "2/1/39", "9/1/38", "11/1/39", "9/1/40", "3/1/40", "2/1/41", "2/1/41", "7/1/40", "8/1/41", "8/1/40", "7/1/42", "12/1/40", "2/1/42", "5/1/41", "2/1/42", "11/1/42", "1/1/43", "11/1/43", "7/1/43", "5/1/44", "4/1/44", "3/1/44", "7/1/44", "3/1/44", "10/1/44", "6/1/56", "6/1/56", "6/1/56", "10/1/54", "1/1/55", "3/1/55", "2/1/55", "12/1/54", "6/1/59", "8/1/59", "12/1/60", "10/1/59", "10/1/60", "6/1/60", "2/1/62", "1/1/63", "4/1/62", "6/1/63", "3/1/62", "10/1/63", "4/1/65", "6/1/63", "1/1/64", "9/1/64", "5/1/64", "9/1/64", "7/1/65", "6/1/64", "1/1/65", "9/1/65", "12/1/66", "12/1/71", "4/1/73", "4/1/73", "2/1/73", "9/1/73", "7/1/70", "5/1/73", "5/1/78", "10/1/81", "1/1/81", "7/1/82", "9/1/91", "2/1/09", "6/1/08", "7/1/83", "9/1/83", "1/1/84", "8/1/83", "7/1/83", "7/1/83", "8/1/83", "7/1/83", "8/1/83", "3/1/84", "12/1/84", "12/1/84", "12/1/84", "9/1/83", "9/1/83", "12/1/85", "9/1/83", "3/1/84", "6/1/84", "9/1/83", "9/1/83", "7/1/85", "7/1/85"), `MATURITY DATE` = c("4/1/50", "12/1/55", "7/1/64", "2/1/57", "7/1/52", "3/1/59", "1/1/65", "4/1/65", "12/1/63", "1/1/66", "11/1/61", "5/1/66", "11/1/68", "12/1/67", "7/1/72", "8/1/67", "10/1/66", "1/1/75", "2/1/67", "8/1/69", "7/1/68", "8/1/69", "5/1/70", "7/1/70", "5/1/71", "10/1/70", "8/1/71", "11/1/71", "10/1/71", "2/1/72", "10/1/71", "9/1/69", "12/1/94", "3/1/95", "11/1/94", "12/1/93", "3/1/94", "5/1/94", "4/1/94", "2/1/94", "10/1/91", "10/1/98", "2/1/00", "12/1/98", "9/1/99", "2/1/99", "9/1/00", "12/1/01", "3/1/01", "8/1/01", "6/1/97", "9/1/02", "2/1/03", "5/1/02", "12/1/02", "5/1/03", "4/1/03", "5/1/03", "6/1/04", "5/1/79", "12/1/03", "8/1/04", "11/1/05", "11/1/11", "3/1/13", "3/1/13", "1/1/13", "8/1/13", "4/1/00", "12/1/11", "2/1/04", "4/1/12", "1/1/13", "12/1/89", "8/1/21", "1/1/42", "5/1/36", "6/1/18", "8/1/18", "12/1/18", "7/1/18", "6/1/18", "6/1/18", "7/1/18", "6/1/18", "7/1/18", "2/1/19", "11/1/19", "11/1/19", "11/1/19", "8/1/18", "8/1/18", "11/1/20", "8/1/18", "2/1/19", "5/1/19", "8/1/18", "8/1/18", "7/1/20", "7/1/20" ), `TERM IN MONTHS` = c(172L, 226L, 316L, 226L, 166L, 238L, 302L, 315L, 304L, 315L, 255L, 315L, 334L, 323L, 385L, 313L, 315L, 391L, 315L, 331L, 327L, 331L, 331L, 331L, 331L, 328L, 328L, 332L, 332L, 332L, 332L, 300L, 463L, 466L, 462L, 471L, 471L, 471L, 471L, 471L, 389L, 471L, 471L, 471L, 468L, 465L, 464L, 468L, 468L, 459L, 424L, 468L, 455L, 468L, 468L, 465L, 468L, 465L, 468L, 180L, 468L, 468L, 468L, 480L, 480L, 480L, 480L, 480L, 358L, 464L, 310L, 367L, 385L, 90L, 360L, 396L, 336L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 421L, 421L), `INTEREST RATE` = c(4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4, 3.5, 4.5, 3.5, 3.75, 3.5, 4, 4.25, 4.25, 4, 3.5, 4, 3.5, 4, 4, 3.5, 3.5, 4, 4, 4, 4, 4, 4, 4, 4, 3.5, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.5, 4.5, 4.5, 4.5, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 8.5, 7.5, 7.5, 7.5, 7.5, 5.25, 6, 9, 14.5, 13, 16.5, 10.75, 6.95, 5.95, 12.25, 12.5, 13, 12.5, 12.25, 12.25, 12.5, 12, 12.5, 13, 13.5, 13.5, 13.5, 13, 13, 11.5, 12.5, 13, 13.5, 13, 13, 12, 12), `HOLDER NAME` = c("NEW YORK LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", "NEW YORK LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", "NAVY MUTUAL AID ASSN", "WELLS FARGO BANK NA-PRUDENTIAL", "", "WELLS FARGO BANK NA-PRUDENTIAL", "LIFE INSURANCE CO OF VIRGINIA", "WELLS FARGO BANK NA-PRUDENTIAL", "SECURITY MUTUAL LIFE INS CO", "NAVY MUTUAL AID ASSN", "NEW YORK LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", "WELLS FARGO BANK NA-PRUDENTIAL", "NATIONAL LIFE INSURANCE CO", "WELLS FARGO BANK NA-PRUDENTIAL", "", "NEW YORK LIFE INSURANCE CO", "WELLS FARGO BANK NA-PRUDENTIAL", "WELLS FARGO BANK NA-PRUDENTIAL", "KEY BANK CENTRAL NY", "NATIONAL LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", "CONNECTICUT GEN LIFE INS CO", "SAN JUAN COUNTY BK", "SECURITY MUTUAL LIFE INS CO", "WELLS FARGO BANK NA-PRUDENTIAL", "SEAMENS BANK SAVINGS FSB-FDIC", "REPUBLIC NATIONAL BANK OF NEW", "LINCOLN SAVINGS BANK", "LIBERTY LENDING INC", "EMIGRANT BANK", "PROVIDENT BANK", "EMIGRANT BANK", "NEW YORK COMMUNITY BANK", "", "", "", "", "PFC CORPORATION", "DOLLAR-DRY DOCK BANK", "PHILADELPHIA SAVINGS FUND SOC", "PHILADELPHIA SAVINGS FUND SOC", "AMERICAN GEN LIFE AND ACCDT IN", "", "", "", "", "PHILADELPHIA SAVINGS FUND SOC", "SOVRAN BANK MARYLAND", "SWISS RE LIFE AND HEALTH AMERI", "", "", "AMERICAN SECURITY CORPORATION", "PUEBLO MORTGAGE INC", "JOHN HANCOCK LIFE INSURANCE CO", "CHASE MANHATTAN BANK", "RIGGS BANK NA", "FANNIE MAE", "STATE TEACHERS RT BOARD OHIO", "STATE TEACHERS RT BOARD OHIO", "FANNIE MAE", "RIGGS BANK NA", "PEOPLES LIFE INS CO WASHINGTON", "WHITE MOUNTAINS SERVICES CORP", "RIGGS BANK NA", "DRG FUNDING CORPORATION", "FANNIE MAE", "ALLFIRST BANK", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "DRG FUNDING CORPORATION", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC"), `HOLDER CITY` = c("NEW YORK", "NEW YORK", "CINCINNATI", "NEW YORK", "NEW YORK", "CINCINNATI", "ARLINGTON", "FREDERICK", "", "FREDERICK", "RICHMOND", "FREDERICK", "BINGHAMTON", "ARLINGTON", "NEW YORK", "MONTPELIER", "FREDERICK", "MONTPELIER", "FREDERICK", "", "NEW YORK", "FREDERICK", "FREDERICK", "BUFFALO", "MONTPELIER", "MONTPELIER", "NEW YORK", "CINCINNATI", "HARTFORD", "FRIDAY HARBOR", "BINGHAMTON", "FREDERICK", "EAST HARTFORD", "NEW YORK", "JERICHO", "BARTLETT", "NEW YORK", "ISELIN", "NEW YORK", "CLEVELAND", "", "", "", "", "TUSTIN", "WHITE PLAINS", "PHILADELPHIA", "PHILADELPHIA", "NASHVILLE", "", "", "", "", "PHILADELPHIA", "BETHESDA", "NEW YORK", "", "", "BALTIMORE", "TUCSON", "BOSTON", "NEW YORK", "RIVERDALE", "PHILADELPHIA", "COLUMBUS", "COLUMBUS", "ATLANTA", "RIVERDALE", "LOUISVILLE", "FARMINGTON HILLS", "RIVERDALE", "WASHINGTON", "ATLANTA", "FREDERICK", "LA PLATA", "MC LEAN", "NEW ALBANY", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "WASHINGTON", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA"), `HOLDER STATE` = c("NY", "NY", "OH", "NY", "NY", "OH", "VA", "MD", "", "MD", "VA", "MD", "NY", "VA", "NY", "VT", "MD", "VT", "MD", "", "NY", "MD", "MD", "NY", "VT", "VT", "NY", "OH", "CT", "WA", "NY", "MD", "CT", "NY", "NY", "TN", "NY", "NJ", "NY", "OH", "", "", "", "", "CA", "NY", "PA", "PA", "TN", "", "", "", "", "PA", "MD", "NY", "", "", "MD", "AZ", "MA", "NY", "MD", "PA", "OH", "OH", "GA", "MD", "KY", "MI", "MD", "DC", "GA", "MD", "MD", "VA", "OH", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "DC", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD"), `SERVICER NAME` = c("No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "No Data Available", "", "", "", "", "", "", "", "", "No Data Available", "", "No Data Available", "No Data Available", "", "No Data Available", "No Data Available", "", "", "No Data Available", "", "", "", "", "", "No Data Available", "", "", "No Data Available", "", "", "", "", "", "", "", "WHITE MOUNTAINS SERVICES CORP", "", "", "", "", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""), `SERVICER CITY` = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "FARMINGTON HILLS", "", "", "", "", "LA PLATA", "MC LEAN", "NEW ALBANY", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""), `SERVICER STATE` = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "MI", "", "", "", "", "MD", "VA", "OH", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""), `SECTION OF ACT CODE` = c("HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRP", "HRB", "HRP", "HRP", "HRB", "HRB", "HRP", "HRP", "ZSB", "ZSB", "ZSB", "ZSB", "ZSJ", "ZSQ", "ZSQ", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL" ), `SOA CATEGORY Sub Category` = c("207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Rental Projects", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Rental Projects", "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", "207 Rental Projects", "207 Apartments", "207 Rental Projects", "207 Apartments", "207 Rental Projects", "207 Rental Projects", "207 Apartments", "207 Apartments", "207 Rental Projects", "207 Rental Projects", "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", "241(a)/ 221-MIR(d)(3)&(d)(4) Improvements & Additions", "241(a)/ 232 /Improvements & Additions / Nursing Homes", "241(a)/ 232 /Improvements & Additions / Nursing Homes", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance"), `TERM TYPE` = c("11", "11", "11", "11", "11", "11", "12", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "18", "21", "21", "21", "11", "19", "11", "11", "20", "21", "19", "11", "21", "11", "11", "11", "11", "15", "11", "11", "11", "11", "11", "21", "19", "11", "11", "11", "11", "11", "19", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", "14", "11", "11", "11", "11", "11", "11", "11"), `TERMINATION TYPE DESCRIPTION` = c("Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "SUPERSESSION", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Maturity", "VOLUNTARY", "VOLUNTARY", "VOLUNTARY", "Prepayment", "Assignment", "Prepayment", "Prepayment", "Acquired", "VOLUNTARY", "Assignment", "Prepayment", "VOLUNTARY", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Conveyance", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "VOLUNTARY", "Assignment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Assignment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "CANCELLED", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment" ), `TYPE Claim Non Claim ` = c("NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM"), `TERM DATE` = c("4/1/39", "4/1/39", "9/1/40", "4/1/39", "2/1/49", "9/1/40", "9/1/44", "8/1/46", "1/1/50", "11/1/44", "7/1/54", "8/1/46", "11/1/41", "7/1/54", "12/1/39", "3/1/46", "8/1/46", "12/1/45", "11/1/44", "7/1/45", "11/1/45", "8/1/46", "8/1/46", "8/1/46", "10/1/46", "7/1/46", "9/1/47", "12/1/43", "7/1/46", "12/1/42", "5/1/44", "8/1/46", "8/1/65", "8/1/65", "8/1/65", "1/31/83", "1/31/83", "2/3/83", "1/31/83", "1/31/83", "12/7/72", "1/3/79", "12/4/79", "10/1/67", "10/1/99", "5/1/71", "4/1/70", "10/16/79", "10/1/67", "8/1/66", "2/27/75", "1/29/82", "12/1/66", "12/3/79", "4/4/75", "10/25/85", "1/30/80", "6/25/74", "12/19/72", "5/31/73", "7/1/94", "4/1/67", "3/19/87", "3/16/73", "2/13/86", "2/13/86", "5/24/82", "7/12/73", "12/8/76", "3/10/89", "3/19/87", "10/31/85", "5/24/82", "1/21/85", "8/30/95", "1/28/11", "11/30/10", "5/31/86", "5/31/86", "4/30/86", "11/20/84", "6/30/86", "6/30/86", "3/31/86", "1/16/87", "10/31/86", "12/31/85", "4/1/86", "4/1/86", "4/1/86", "3/31/86", "3/31/86", "8/3/90", "10/31/86", "6/30/86", "1/30/87", "4/30/86", "4/30/86", "2/27/87", "8/31/86"), TE = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ), TC = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""), Status = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)), .Names = c("HUD PROJECT NUMBER", "PROPERTY NAME", "PROPERTY STREET", "PROPERTY CITY", "PROPERTY STATE", "PROPERTY ZIP", "UNITS", "INITIAL ENDORSEMENT DATE", "FINAL ENDORSEMENT DATE", "ORIGINAL MORTGAGE AMOUNT", "FIRST PAYMENT DATE", "MATURITY DATE", "TERM IN MONTHS", "INTEREST RATE", "HOLDER NAME", "HOLDER CITY", "HOLDER STATE", "SERVICER NAME", "SERVICER CITY", "SERVICER STATE", "SECTION OF ACT CODE", "SOA CATEGORY Sub Category", "TERM TYPE", "TERMINATION TYPE DESCRIPTION", "TYPE Claim Non Claim ", "TERM DATE", "TE", "TC", "Status"), row.names = c(NA, 100L), class = "data.frame")
> On Aug 14, 2016, at 3:40 PM, Glenn Schultz <glennmschultz at me.com> wrote: > > Here is a sample of the data that I am working with. Dates may go back as far as 1930?s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCentury(Date = df[1,?TERM DATE?) it will return the correct date.I seriously doubt that is true since that is not parseable withoput a) correction of the "smart-quotes" and b) a closing "]".> However, if I use the function as follows DateCentury[,?TERM DATE?]) it does not work.That's kind of crazy. How should the DateCentury function know where to get any data without naming the Data object. Actaully the error is thrown by the parser which is unable to deal with DateCentury being called with the smart-quotes but even if you fix that, you get this error: Error: unexpected ')' in "DateCentury[,"TERM DATE"])" DateCentury is a function so you need to have an open paren after its name and then the items inside the matching parens need to be data objects. This shows the function to be "working" with a full column, albeit with a warning related to improper use of the `if` function:> str(DateCentury(Data[, 'TERM DATE']) )chr [1:100] "4/1/1939" "4/1/1939" "9/1/1940" "4/1/1939" "2/1/1949" ... Warning messages: 1: In if (ThisDate > CurrDate) { : the condition has length > 1 and only the first element will be used 2: In if (nchar(Date) == 6) { : the condition has length > 1 and only the first element will be used -- David.> Anyhow, I have been at this awhile and I am totally stumped. I need to refactor the below date vectors across just under 50,000 observations. Any suggestions would be greatly appreciated. > > Best, > Glenn > > DateCentury <- function(Date = "character"){ > ThisDate = as.Date(Date, format = "%m/%d/%y", origin = "1900-01-01") > CurrDate = as.Date(Sys.Date()) > Century = as.Date("1999-12-31", format = "%Y-%m-%d", origin = "1900-01-01") > NewDate <- if(ThisDate > CurrDate){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > > } else { > > if(ThisDate <= Century){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > } else { > if(nchar(Date) == 6){paste(substr(Date,1,4),"20", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"20", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"20", substr(Date,7,8),sep ="") > } > } > } > } > > return(NewDate)} > > > > > > Data > structure(list(`HUD PROJECT NUMBER` = c(1L, 2L, 3L, 4L, 5L, 6L, > 7L, 8L, 9L, 10L, 39L, 43L, 46L, 47L, 49L, 50L, 51L, 52L, 53L, > 54L, 55L, 58L, 59L, 60L, 61L, 62L, 66L, 68L, 69L, 74L, 77L, 78L, > 82L, 83L, 84L, 87L, 88L, 89L, 90L, 91L, 98L, 99L, 100L, 101L, > 102L, 103L, 104L, 105L, 107L, 108L, 110L, 111L, 112L, 113L, 114L, > 116L, 118L, 119L, 120L, 121L, 122L, 123L, 125L, 135L, 140L, 141L, > 144L, 146L, 9001L, 9002L, 10001L, 10004L, 10005L, 10007L, 10008L, > 10010L, 10011L, 10501L, 10502L, 10503L, 10504L, 10505L, 10506L, > 10507L, 10508L, 10510L, 10515L, 10516L, 10517L, 10518L, 10519L, > 10520L, 10521L, 10522L, 10523L, 10525L, 10526L, 10527L, 10528L, > 10529L), `PROPERTY NAME` = c("COLONIAL VILLAGE APTS", "COLONIAL VILLAGE APTS", > "FALKLAND APTS", "COLONIAL VILLAGE APTS", "BRENTWOOD VILLAGE", > "FALKLAND APTS", "BUCKINGHAM II", "FIRST BUCKINGHAM", "PARKBELT HOMES", > "BUCKINGHAM III", "SKYLAND APTS", "BUCKINGHAM IV", "WESTOVER APTS", > "MT VERNON DEV", "ARLINGTON VILLAGE APTS", "FAIRFAX VILLAGE III", > "BUCKINGHAM V", "SUBURBAN GARDENS", "BUCKINGHAM III", "PINEY BRANCH APTS", > "AUBURN GARDENS", "BUCKINGHAM V", "BUCKINGHAM IV", "GLEBE COURT APTS", > "BARCROFT APTS", "FAIRFAX VILLAGE IV", "BELLEVUE GARDENS", "FILLMORE CO INC", > "BRADLEY BLVD APTS", "2702 WISCONSIN", "WINCHESTER SUMMIT", "BUCKINGHAM II", > "ARLINGTON TOWERS", "ARLINGTON TOWERS", "ARLINGTON TOWERS", "BRADDOCK LEE APT I", > "BRADDOCK LEE APT II", "BRADDOCK LEE APT III", "BRADDOCK LEE APT IV", > "BRADDOCK LEE APT V", "4600 CONN COOP", "GARFIELD APTS", "CATHEDERAL PK TOW", > "SECOND PKSIDE APT", "THE ENVOY", "CARDINAL HOUSE", "TUNLAW PARK APTS", > "RAVENWOOD TOWERS", "PARKSIDE APTS", "PARK BERKSHIRE APTS", "JOHN MARSHALL APTS", > "MATTAPONY MANOR", "MOSBY VILLAGE APTS", "RIVER TOWERS", "", > "BARNETT HOUSE", "RIVERS TOWERS II", "FAIRHAVEN GARDENS", "CIRCLE APARTMENTS", > "HYBLA VALLEY MOBLE HMS", "PARK PLAZA APTS", "ENVOY TOWERS", > "C H HOUSTON APTS", "DUMFRIES MOBILE HM VLG", "SKYLINE TOWERS APTS I", > "SKYLINE CENTER APTS", "CHESTNUT GROVE APTS", "BRENTANA GARDENS", > "GREGORY ESTATES", "BARNABY GARDENS", "C H HOUSTON APTS", "HIGHVIEW TERRACE", > "CHESTNUT GROVE APTS", "ROCKVILLE NRSNG HOME", "STANTON-WELLINGTON APTS. DBA F", > "COLLINSWOOD NURSING HOME", "SHADY GROVE ADVENTIST NURSING", > "GLENDALE LAKE APTS", "GARFIELD COURT", "COUNTRYSIDE APTS", "INVIEW HOUSE", > "TOP OF THE PARK", "SUMMIT CREST APTS", "BRADFORD PLACE", "HILLSIDE TERR APTS", > "OAK HILL APTS", "PARK BERKSHIRE APTS I", "CARROLLAN MANOR", > "LANSDOWNE VILLAGE APTS", "GATEWAY SQUARE", "KIRKWOOD VILLAGE APTS", > "GOODACRE APTS", "PENN SOUTHERN APTS.", "WOODMONT PARK APTS", > "FINIANS CT", "ROCKFORDTHE", "ISABELLA PARK APARTMENTS", "GREENTREE III", > "", "MARLOW HEIGHTS SECTION A"), `PROPERTY STREET` = c("1913 WILSON BLVD", > "1913 WILSON BLVD", "8305 16TH STREET", "1913 WILSON BLVD", "1287 BRENTWOOD RD NE", > "8305 16TH STREET", "313 N GLEBE RD", "313 N GLEBE RD", "", "313 N GLEBE RD", > "2307 SKYLAND PL SE", "313 N GLEBE RD", "1649 N LONGFELLOW", > "", "1021 S BARTON", "2019 37TH ST SE", "313 N GLEBE RD", "4904 JAY ST NE", > "313 N GLEBE RD", "8400 PINEY BRANCH RD", "101 GLEBE ROAD E", > "313 N GLEBE RD", "313 N GLEBE RD", "", "1130 S GEORGE MASON DR", > "2019 37TH ST SE", "", "", "", "2702 WISCONSIN AVE", "", "313 N GLEBE RD", > "1101 ARLINGTON BLVD", "1011 ARLINGTON BLVD", "1011 ARLINGTON BLVD", > "3810 KING ST", "3810 KING ST", "3810 KING ST", "3810 KING ST", > "3810 KING ST", "4600 CONNECTICUT AVE NW", "5410 CONNECTICUT AVE NW", > "3100 CONNECTICUT AVE NW", "", "2144 CALIFORNIA ST NW", "3000 SPOUT RUN PKWY", > "3850 TUNLAW RD NW", "6166 LEESBURG PIKE", "10520 MONTROSE AVE", > "6317 PENNSYLVANIA AVE", "", "5002 57TH AVE", "10560 MAIN ST", > "6631 WAKEFIELD DRIVE", "", "201 MASSACHUSETTS AVE NE", "6631 WAKEFIELD DRIVE", > "JERMANTOWN ROAD", "2030 N ADAMS ST", "BARGIN CITY-HYBLA VALLEY", > "1629 COLUMBIA RD NW", "2400 16TH ST NW", "1712 16TH ST NW", > "DUMFRIES", "5601 SEMINARY ROAD", "5600 SEMINARY ROAD", "11200 CHESTNUT GROVE SQ", > "", "7618 GEORGE PALMER HGWY", "3876 9TH ST SE", "1714 16TH ST NW", > "6800-7021 HIGHVIEW TER", "11200 CHESTNUT GROVE SQ", "303 ADCLARE ROAD", > "2549 ELVANS RD SE", "299 HURLEY AVENUE", "9701 MEDICAL CENTER DRIVE", > "10001 GREENBELT RD", "5701 43RD AVE", "9971 GOODLUCK RD", "6161 EDSALL ROAD", > "4009 GALLATIN ST", "38 N SUMMIT AVE", "3506 SILVER PARK RD", > "1805-1910 23RD ST SE", "11497 COLUMBIA PIKE", "6301 PENNSYLVANIA AVE", > "8621 ANNAPOLIS RD", "1720 BRIGHTSEAT RD", "4855 ST. BARNABAS RD", > "2731 NICHOLSON", "8619 PINEY BRANCH RD", "", "1001 ROCKVILLE PIKE", > "7756 FINNS LANE", "1444 ROCK CREEK FORD RD", "2214 PHELPS ROAD", > "8051 GREENLEAF TERR", "", "4223 28TH AVE"), `PROPERTY CITY` = c("ARLINGTON", > "ARLINGTON", "SILVER SPRING", "ARLINGTON", "WASHINGTON", "SILVER SPRING", > "ARLINGTON", "ARLINGTON", "GREENBELT", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ALEXANDRIA", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "WASHINGTON", "ARLINGTON", "SILVER SPRING", "ALEXANDRIA", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "WASHINGTON", > "WASHINGTON", "ARLINGTON", "BETHESDA", "WASHINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ALEXANDRIA", > "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "ROCKVILLE", "WASHINGTON", "ARLINGTON", > "WASHINGTON", "SEVEN CORNERS", "BETHESDA", "SUITLAND-SILVER HI", > "WASHINGTON", "BLADENSBURG", "FAIRFAX", "ALEXANDRIA", "", "WASHINGTON", > "ALEXANDRIA", "FAIRFAX", "ARLINGTON", "FAIRFAX", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "DUMFRIES", "BAILEY'S CROSSROAD", > "BAILEY'S CROSSROAD", "RESTON", "RESTON", "SEAT PLEASANT", "WASHINGTON", > "WASHINGTON", "HYATTSVILLE", "RESTON", "ROCKVILLE", "WASHINGTON", > "ROCKVILLE", "ROCKVLLE", "LANHAM-SEABROOK", "HYATTSVILLE", "HYATTSVILLE", > "ALEXANDRIA", "HYATTSVILLE", "GAITHERSBURG", "SUITLAND-SILVER HI", > "WASHINGTON", "SILVER SPRING", "FORESTVILLE", "LANHAM-SEABROOK", > "LANDOVER", "PRINCE GEORGE'S CO", "HYATTSVILLE", "SILVER SPRING", > "SILVER SPRING", "PURCELLVILLE", "LANHAM-SEABROOK", "WASHINGTON", > "ADELPHI", "GLEN BURNIE", "", "SUITLAND-SILVER HI"), `PROPERTY STATE` = c("VA", > "VA", "MD", "VA", "DC", "MD", "VA", "VA", "MD", "VA", "DC", "VA", > "VA", "VA", "VA", "DC", "VA", "DC", "VA", "MD", "VA", "VA", "VA", > "VA", "VA", "DC", "DC", "VA", "MD", "DC", "DC", "VA", "VA", "VA", > "VA", "VA", "VA", "VA", "VA", "VA", "DC", "DC", "DC", "MD", "DC", > "VA", "DC", "VA", "MD", "MD", "DC", "MD", "VA", "VA", "", "DC", > "VA", "VA", "VA", "VA", "DC", "DC", "DC", "VA", "00", "VA", "VA", > "VA", "MD", "DC", "DC", "MD", "VA", "MD", "DC", "MD", "MD", "MD", > "MD", "MD", "VA", "MD", "MD", "MD", "DC", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD", "VA", "MD", "DC", "MD", "MD", "", "MD" > ), `PROPERTY ZIP` = c("22201", "22201", "20910", "22201", "20018", > "20910", "22203", "22203", "20770", "22203", "20020", "22203", > "22205", "00000", "22204", "20020", "22203", "20019", "22203", > "20901", "22305", "22203", "22203", "00000", "22204", "20020", > "00000", "00000", "20014", "20007", "00000", "22203", "22209", > "22209", "22209", "22302", "22302", "22302", "22302", "22302", > "20008", "20015", "20008", "00000", "20008", "22201", "20007", > "22044", "20014", "20023", "00000", "20710", "22030", "22037", > "00000", "20002", "22307", "22030", "22201", "22030", "20009", > "20009", "20009", "22026", "22041", "22041", "22090", "22037", > "20027", "20032", "20005", "20782", "22090", "20850", "20020", > "20850", "20850", "20801", "20781", "20706", "22304", "20785", > "20877", "20746", "20020", "20904", "20747", "20706", "20785", > "20748", "20782", "20901", "20910", "20850", "20801", "20011", > "20783", "00000", "00000", "20748"), UNITS = c(274L, 464L, 181L, > 237L, 440L, 303L, 98L, 524L, 10L, 200L, 223L, 192L, 153L, 57L, > 655L, 207L, 276L, 204L, 112L, 214L, 304L, 176L, 248L, 77L, 423L, > 214L, 251L, 181L, 161L, 80L, 41L, 98L, 366L, 415L, 434L, 40L, > 58L, 80L, 40L, 40L, 267L, 166L, 323L, 120L, 113L, 229L, 284L, > 304L, 170L, 336L, 30L, 154L, 205L, 168L, 0L, 95L, 175L, 76L, > 116L, 250L, 274L, 332L, 45L, 156L, 470L, 470L, 225L, 240L, 503L, > 79L, 46L, 306L, 224L, 100L, 398L, 160L, 170L, 443L, 62L, 451L, > 207L, 106L, 232L, 213L, 192L, 281L, 336L, 187L, 345L, 297L, 750L, > 156L, 308L, 414L, 57L, 66L, 445L, 1122L, 0L, 0L), `INITIAL ENDORSEMENT DATE` = c("4/20/35", > "12/9/35", "9/11/36", "2/8/37", "8/3/37", "8/19/37", "3/15/40", > "8/3/37", "5/13/38", "4/13/38", "3/7/39", "8/26/38", "8/24/39", > "8/18/39", "1/4/39", "2/24/40", "1/4/39", "4/11/41", "5/9/39", > "7/10/40", "8/19/40", "7/15/40", "4/14/41", "7/15/41", "10/23/41", > "9/30/41", "7/16/43", "4/23/42", "3/13/42", "6/8/42", "1/18/43", > "9/23/44", "1/29/54", "4/30/54", "1/14/54", "9/28/54", "12/1/54", > "2/8/55", "1/4/55", "11/4/54", "4/16/59", "5/1/58", "6/10/59", > "10/1/58", "9/20/60", "12/4/58", "2/17/60", "4/13/61", "1/18/61", > "6/2/61", "6/19/61", "1/25/62", "11/26/62", "3/14/62", "5/4/62", > "9/26/62", "8/10/62", "6/3/63", "11/6/63", "8/15/63", "10/11/63", > "12/11/63", "8/26/65", "10/27/71", "10/10/72", "1/10/73", "8/3/71", > "2/7/72", "7/1/70", "5/1/73", "2/24/78", "8/31/81", "9/17/80", > "4/16/82", "1/19/89", "5/21/08", "4/4/08", "5/26/83", "7/11/83", > "11/16/83", "6/30/83", "5/26/83", "5/26/83", "6/27/83", "5/13/83", > "6/29/83", "1/30/84", "10/25/84", "10/25/84", "10/25/84", "7/28/83", > "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", "8/1/83", > "7/28/83", "6/20/85", "6/20/85"), `FINAL ENDORSEMENT DATE` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "9/20/60", "", "", > "", "", "", "", "", "", "", "", "11/25/64", "", "", "", "", "8/24/65", > "", "2/14/67", "", "1/10/73", "1/10/73", "", "", "", "12/6/82", > "2/24/78", "8/31/81", "", "4/16/82", "5/24/91", "7/14/09", "4/4/08", > "5/26/83", "7/11/83", "11/16/83", "", "5/26/83", "5/26/83", "6/27/83", > "5/16/83", "6/29/83", "1/31/84", "10/25/84", "10/25/84", "10/25/84", > "7/28/83", "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", > "8/1/83", "7/28/83", "6/20/85", "6/20/85"), `ORIGINAL MORTGAGE AMOUNT` = c("875,000", > "1,480,000", "840,000", "725,000", "1,650,000", "1,225,000", > "319,000", "1,825,000", "35,000", "650,000", "760,000", "725,000", > "410,000", "165,000", "2,385,000", "701,000", "1,035,000", "692,000", > "490,000", "815,000", "942,000", "610,000", "935,000", "260,000", > "1,500,000", "830,000", "980,000", "660,000", "630,000", "265,000", > "139,000", "283,000", "4,301,100", "3,831,000", "4,482,200", > "313,700", "462,200", "641,800", "312,000", "312,100", "4,103,600", > "2,313,100", "5,626,500", "1,271,600", "1,447,200", "2,838,400", > "4,434,100", "3,640,900", "1,905,700", "2,893,200", "270,300", > "1,480,000", "3,048,165", "2,365,427", "1,138,600", "1,129,200", > "2,436,300", "752,500", "1,691,900", "450,000", "3,799,363", > "4,626,400", "484,500", "561,600", "10,795,600", "11,081,000", > "4,248,400", "3,714,938", "1,909,441", "436,825", "25,000", "348,700", > "173,400", "55,100", "4,311,301", "462,300", "1,170,000", "8,499,800", > "1,065,700", "13,387,500", "5,880,000", "1,500,000", "3,846,600", > "5,300,000", "1,750,000", "4,600,000", "5,653,000", "3,000,000", > "5,000,000", "5,000,000", "7,500,000", "1,600,000", "6,500,000", > "7,300,000", "1,350,000", "1,260,900", "8,081,100", "21,988,600", > "10,675,000", "4,600,000"), `FIRST PAYMENT DATE` = c("1/1/36", > "3/1/37", "4/1/38", "5/1/38", "10/1/38", "6/1/39", "12/1/39", > "2/1/39", "9/1/38", "11/1/39", "9/1/40", "3/1/40", "2/1/41", > "2/1/41", "7/1/40", "8/1/41", "8/1/40", "7/1/42", "12/1/40", > "2/1/42", "5/1/41", "2/1/42", "11/1/42", "1/1/43", "11/1/43", > "7/1/43", "5/1/44", "4/1/44", "3/1/44", "7/1/44", "3/1/44", "10/1/44", > "6/1/56", "6/1/56", "6/1/56", "10/1/54", "1/1/55", "3/1/55", > "2/1/55", "12/1/54", "6/1/59", "8/1/59", "12/1/60", "10/1/59", > "10/1/60", "6/1/60", "2/1/62", "1/1/63", "4/1/62", "6/1/63", > "3/1/62", "10/1/63", "4/1/65", "6/1/63", "1/1/64", "9/1/64", > "5/1/64", "9/1/64", "7/1/65", "6/1/64", "1/1/65", "9/1/65", "12/1/66", > "12/1/71", "4/1/73", "4/1/73", "2/1/73", "9/1/73", "7/1/70", > "5/1/73", "5/1/78", "10/1/81", "1/1/81", "7/1/82", "9/1/91", > "2/1/09", "6/1/08", "7/1/83", "9/1/83", "1/1/84", "8/1/83", "7/1/83", > "7/1/83", "8/1/83", "7/1/83", "8/1/83", "3/1/84", "12/1/84", > "12/1/84", "12/1/84", "9/1/83", "9/1/83", "12/1/85", "9/1/83", > "3/1/84", "6/1/84", "9/1/83", "9/1/83", "7/1/85", "7/1/85"), > `MATURITY DATE` = c("4/1/50", "12/1/55", "7/1/64", "2/1/57", > "7/1/52", "3/1/59", "1/1/65", "4/1/65", "12/1/63", "1/1/66", > "11/1/61", "5/1/66", "11/1/68", "12/1/67", "7/1/72", "8/1/67", > "10/1/66", "1/1/75", "2/1/67", "8/1/69", "7/1/68", "8/1/69", > "5/1/70", "7/1/70", "5/1/71", "10/1/70", "8/1/71", "11/1/71", > "10/1/71", "2/1/72", "10/1/71", "9/1/69", "12/1/94", "3/1/95", > "11/1/94", "12/1/93", "3/1/94", "5/1/94", "4/1/94", "2/1/94", > "10/1/91", "10/1/98", "2/1/00", "12/1/98", "9/1/99", "2/1/99", > "9/1/00", "12/1/01", "3/1/01", "8/1/01", "6/1/97", "9/1/02", > "2/1/03", "5/1/02", "12/1/02", "5/1/03", "4/1/03", "5/1/03", > "6/1/04", "5/1/79", "12/1/03", "8/1/04", "11/1/05", "11/1/11", > "3/1/13", "3/1/13", "1/1/13", "8/1/13", "4/1/00", "12/1/11", > "2/1/04", "4/1/12", "1/1/13", "12/1/89", "8/1/21", "1/1/42", > "5/1/36", "6/1/18", "8/1/18", "12/1/18", "7/1/18", "6/1/18", > "6/1/18", "7/1/18", "6/1/18", "7/1/18", "2/1/19", "11/1/19", > "11/1/19", "11/1/19", "8/1/18", "8/1/18", "11/1/20", "8/1/18", > "2/1/19", "5/1/19", "8/1/18", "8/1/18", "7/1/20", "7/1/20" > ), `TERM IN MONTHS` = c(172L, 226L, 316L, 226L, 166L, 238L, > 302L, 315L, 304L, 315L, 255L, 315L, 334L, 323L, 385L, 313L, > 315L, 391L, 315L, 331L, 327L, 331L, 331L, 331L, 331L, 328L, > 328L, 332L, 332L, 332L, 332L, 300L, 463L, 466L, 462L, 471L, > 471L, 471L, 471L, 471L, 389L, 471L, 471L, 471L, 468L, 465L, > 464L, 468L, 468L, 459L, 424L, 468L, 455L, 468L, 468L, 465L, > 468L, 465L, 468L, 180L, 468L, 468L, 468L, 480L, 480L, 480L, > 480L, 480L, 358L, 464L, 310L, 367L, 385L, 90L, 360L, 396L, > 336L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 421L, 421L), `INTEREST RATE` = c(4.5, 4.5, 4.5, > 4.5, 4.5, 4.5, 4, 3.5, 4.5, 3.5, 3.75, 3.5, 4, 4.25, 4.25, > 4, 3.5, 4, 3.5, 4, 4, 3.5, 3.5, 4, 4, 4, 4, 4, 4, 4, 4, 3.5, > 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.5, 4.5, > 4.5, 4.5, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 8.5, 7.5, 7.5, 7.5, 7.5, 5.25, 6, 9, 14.5, 13, 16.5, > 10.75, 6.95, 5.95, 12.25, 12.5, 13, 12.5, 12.25, 12.25, 12.5, > 12, 12.5, 13, 13.5, 13.5, 13.5, 13, 13, 11.5, 12.5, 13, 13.5, > 13, 13, 12, 12), `HOLDER NAME` = c("NEW YORK LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "NEW YORK LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", > "UNION CENTRAL LIFE INS CO", "NAVY MUTUAL AID ASSN", "WELLS FARGO BANK NA-PRUDENTIAL", > "", "WELLS FARGO BANK NA-PRUDENTIAL", "LIFE INSURANCE CO OF VIRGINIA", > "WELLS FARGO BANK NA-PRUDENTIAL", "SECURITY MUTUAL LIFE INS CO", > "NAVY MUTUAL AID ASSN", "NEW YORK LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "", "NEW YORK LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "WELLS FARGO BANK NA-PRUDENTIAL", > "KEY BANK CENTRAL NY", "NATIONAL LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "CONNECTICUT GEN LIFE INS CO", "SAN JUAN COUNTY BK", "SECURITY MUTUAL LIFE INS CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "SEAMENS BANK SAVINGS FSB-FDIC", > "REPUBLIC NATIONAL BANK OF NEW", "LINCOLN SAVINGS BANK", > "LIBERTY LENDING INC", "EMIGRANT BANK", "PROVIDENT BANK", > "EMIGRANT BANK", "NEW YORK COMMUNITY BANK", "", "", "", "", > "PFC CORPORATION", "DOLLAR-DRY DOCK BANK", "PHILADELPHIA SAVINGS FUND SOC", > "PHILADELPHIA SAVINGS FUND SOC", "AMERICAN GEN LIFE AND ACCDT IN", > "", "", "", "", "PHILADELPHIA SAVINGS FUND SOC", "SOVRAN BANK MARYLAND", > "SWISS RE LIFE AND HEALTH AMERI", "", "", "AMERICAN SECURITY CORPORATION", > "PUEBLO MORTGAGE INC", "JOHN HANCOCK LIFE INSURANCE CO", > "CHASE MANHATTAN BANK", "RIGGS BANK NA", "FANNIE MAE", "STATE TEACHERS RT BOARD OHIO", > "STATE TEACHERS RT BOARD OHIO", "FANNIE MAE", "RIGGS BANK NA", > "PEOPLES LIFE INS CO WASHINGTON", "WHITE MOUNTAINS SERVICES CORP", > "RIGGS BANK NA", "DRG FUNDING CORPORATION", "FANNIE MAE", > "ALLFIRST BANK", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "DRG FUNDING CORPORATION", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC"), `HOLDER CITY` = c("NEW YORK", > "NEW YORK", "CINCINNATI", "NEW YORK", "NEW YORK", "CINCINNATI", > "ARLINGTON", "FREDERICK", "", "FREDERICK", "RICHMOND", "FREDERICK", > "BINGHAMTON", "ARLINGTON", "NEW YORK", "MONTPELIER", "FREDERICK", > "MONTPELIER", "FREDERICK", "", "NEW YORK", "FREDERICK", "FREDERICK", > "BUFFALO", "MONTPELIER", "MONTPELIER", "NEW YORK", "CINCINNATI", > "HARTFORD", "FRIDAY HARBOR", "BINGHAMTON", "FREDERICK", "EAST HARTFORD", > "NEW YORK", "JERICHO", "BARTLETT", "NEW YORK", "ISELIN", > "NEW YORK", "CLEVELAND", "", "", "", "", "TUSTIN", "WHITE PLAINS", > "PHILADELPHIA", "PHILADELPHIA", "NASHVILLE", "", "", "", > "", "PHILADELPHIA", "BETHESDA", "NEW YORK", "", "", "BALTIMORE", > "TUCSON", "BOSTON", "NEW YORK", "RIVERDALE", "PHILADELPHIA", > "COLUMBUS", "COLUMBUS", "ATLANTA", "RIVERDALE", "LOUISVILLE", > "FARMINGTON HILLS", "RIVERDALE", "WASHINGTON", "ATLANTA", > "FREDERICK", "LA PLATA", "MC LEAN", "NEW ALBANY", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "WASHINGTON", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA"), `HOLDER STATE` = c("NY", "NY", "OH", > "NY", "NY", "OH", "VA", "MD", "", "MD", "VA", "MD", "NY", > "VA", "NY", "VT", "MD", "VT", "MD", "", "NY", "MD", "MD", > "NY", "VT", "VT", "NY", "OH", "CT", "WA", "NY", "MD", "CT", > "NY", "NY", "TN", "NY", "NJ", "NY", "OH", "", "", "", "", > "CA", "NY", "PA", "PA", "TN", "", "", "", "", "PA", "MD", > "NY", "", "", "MD", "AZ", "MA", "NY", "MD", "PA", "OH", "OH", > "GA", "MD", "KY", "MI", "MD", "DC", "GA", "MD", "MD", "VA", > "OH", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "DC", "MD", > "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD"), `SERVICER NAME` = c("No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "", "", "", "", "", "", "", "", "No Data Available", > "", "No Data Available", "No Data Available", "", "No Data Available", > "No Data Available", "", "", "No Data Available", "", "", > "", "", "", "No Data Available", "", "", "No Data Available", > "", "", "", "", "", "", "", "WHITE MOUNTAINS SERVICES CORP", > "", "", "", "", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SERVICER CITY` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "FARMINGTON HILLS", "", "", > "", "", "LA PLATA", "MC LEAN", "NEW ALBANY", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", ""), `SERVICER STATE` = c("", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "MI", "", "", "", "", "MD", "VA", "OH", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SECTION OF ACT CODE` = c("HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRP", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRP", "HRB", > "HRP", "HRP", "HRB", "HRB", "HRP", "HRP", "ZSB", "ZSB", "ZSB", > "ZSB", "ZSJ", "ZSQ", "ZSQ", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL" > ), `SOA CATEGORY Sub Category` = c("207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Rental Projects", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Rental Projects", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Rental Projects", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 221-MIR(d)(3)&(d)(4) Improvements & Additions", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance"), `TERM TYPE` = c("11", "11", > "11", "11", "11", "11", "12", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "18", "21", "21", "21", "11", "19", "11", "11", > "20", "21", "19", "11", "21", "11", "11", "11", "11", "15", > "11", "11", "11", "11", "11", "21", "19", "11", "11", "11", > "11", "11", "19", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "14", "11", "11", "11", "11", "11", "11", "11"), `TERMINATION TYPE DESCRIPTION` = c("Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "SUPERSESSION", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Maturity", > "VOLUNTARY", "VOLUNTARY", "VOLUNTARY", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Acquired", "VOLUNTARY", "Assignment", > "Prepayment", "VOLUNTARY", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Conveyance", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "VOLUNTARY", "Assignment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "CANCELLED", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment" > ), `TYPE Claim Non Claim ` = c("NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM"), `TERM DATE` = c("4/1/39", "4/1/39", "9/1/40", > "4/1/39", "2/1/49", "9/1/40", "9/1/44", "8/1/46", "1/1/50", > "11/1/44", "7/1/54", "8/1/46", "11/1/41", "7/1/54", "12/1/39", > "3/1/46", "8/1/46", "12/1/45", "11/1/44", "7/1/45", "11/1/45", > "8/1/46", "8/1/46", "8/1/46", "10/1/46", "7/1/46", "9/1/47", > "12/1/43", "7/1/46", "12/1/42", "5/1/44", "8/1/46", "8/1/65", > "8/1/65", "8/1/65", "1/31/83", "1/31/83", "2/3/83", "1/31/83", > "1/31/83", "12/7/72", "1/3/79", "12/4/79", "10/1/67", "10/1/99", > "5/1/71", "4/1/70", "10/16/79", "10/1/67", "8/1/66", "2/27/75", > "1/29/82", "12/1/66", "12/3/79", "4/4/75", "10/25/85", "1/30/80", > "6/25/74", "12/19/72", "5/31/73", "7/1/94", "4/1/67", "3/19/87", > "3/16/73", "2/13/86", "2/13/86", "5/24/82", "7/12/73", "12/8/76", > "3/10/89", "3/19/87", "10/31/85", "5/24/82", "1/21/85", "8/30/95", > "1/28/11", "11/30/10", "5/31/86", "5/31/86", "4/30/86", "11/20/84", > "6/30/86", "6/30/86", "3/31/86", "1/16/87", "10/31/86", "12/31/85", > "4/1/86", "4/1/86", "4/1/86", "3/31/86", "3/31/86", "8/3/90", > "10/31/86", "6/30/86", "1/30/87", "4/30/86", "4/30/86", "2/27/87", > "8/31/86"), TE = c("", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" > ), TC = c("", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", ""), Status = c(TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)), .Names = c("HUD PROJECT NUMBER", > "PROPERTY NAME", "PROPERTY STREET", "PROPERTY CITY", "PROPERTY STATE", > "PROPERTY ZIP", "UNITS", "INITIAL ENDORSEMENT DATE", "FINAL ENDORSEMENT DATE", > "ORIGINAL MORTGAGE AMOUNT", "FIRST PAYMENT DATE", "MATURITY DATE", > "TERM IN MONTHS", "INTEREST RATE", "HOLDER NAME", "HOLDER CITY", > "HOLDER STATE", "SERVICER NAME", "SERVICER CITY", "SERVICER STATE", > "SECTION OF ACT CODE", "SOA CATEGORY Sub Category", "TERM TYPE", > "TERMINATION TYPE DESCRIPTION", "TYPE Claim Non Claim ", "TERM DATE", > "TE", "TC", "Status"), row.names = c(NA, 100L), class = "data.frame") > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
> On 15 Aug 2016, at 00:40 , Glenn Schultz <glennmschultz at me.com> wrote: > > Here is a sample of the data that I am working with. Dates may go back as far as 1930?s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCentury(Date = df[1,?TERM DATE?) it will return the correct date. However, if I use the function as follows DateCentury[,?TERM DATE?]) it does not work.I suppose you intended DateCentury(Date = df[,?TERM DATE?]) there> Anyhow, I have been at this awhile and I am totally stumped. I need to refactor the below date vectors across just under 50,000 observations. Any suggestions would be greatly appreciated.Your code isn't vectorized; a vector argument will cause trouble as soon as you get to the if() statements inside the function. A quick (but slow...) way out is to use Vectorize(DateCentury)(...) (or a for loop, or sapply()). A better way is to learn how to write code in a vectorized fashion. This typically involves replacing if() with indexing ([...]) or maybe ifelse() constructions (sorry, fixing your actual code would take a bit too much time). A couple of other hints: - Don't write code that relies on current date. You'll regret it when you need to run it again in 20 years and 2035 is no longer in the future. - The string manipulation looks like it would be more conveniently done by converting the dates to POSIXlt objects, manipulate the year field directly, and then convert to character using a suitable format. Or, can't you just add/subtract 100 years = 36525 days? That should work as long as you don't need to go back further than March 1, 1900 (when you'll get bitten by the fact that 1900 was not a leap year but 2000 was...). -pd> > Best, > Glenn > > DateCentury <- function(Date = "character"){ > ThisDate = as.Date(Date, format = "%m/%d/%y", origin = "1900-01-01") > CurrDate = as.Date(Sys.Date()) > Century = as.Date("1999-12-31", format = "%Y-%m-%d", origin = "1900-01-01") > NewDate <- if(ThisDate > CurrDate){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > > } else { > > if(ThisDate <= Century){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > } else { > if(nchar(Date) == 6){paste(substr(Date,1,4),"20", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"20", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"20", substr(Date,7,8),sep ="") > } > } > } > } > > return(NewDate)} > > > > > > Data > structure(list(`HUD PROJECT NUMBER` = c(1L, 2L, 3L, 4L, 5L, 6L, > 7L, 8L, 9L, 10L, 39L, 43L, 46L, 47L, 49L, 50L, 51L, 52L, 53L, > 54L, 55L, 58L, 59L, 60L, 61L, 62L, 66L, 68L, 69L, 74L, 77L, 78L, > 82L, 83L, 84L, 87L, 88L, 89L, 90L, 91L, 98L, 99L, 100L, 101L, > 102L, 103L, 104L, 105L, 107L, 108L, 110L, 111L, 112L, 113L, 114L, > 116L, 118L, 119L, 120L, 121L, 122L, 123L, 125L, 135L, 140L, 141L, > 144L, 146L, 9001L, 9002L, 10001L, 10004L, 10005L, 10007L, 10008L, > 10010L, 10011L, 10501L, 10502L, 10503L, 10504L, 10505L, 10506L, > 10507L, 10508L, 10510L, 10515L, 10516L, 10517L, 10518L, 10519L, > 10520L, 10521L, 10522L, 10523L, 10525L, 10526L, 10527L, 10528L, > 10529L), `PROPERTY NAME` = c("COLONIAL VILLAGE APTS", "COLONIAL VILLAGE APTS", > "FALKLAND APTS", "COLONIAL VILLAGE APTS", "BRENTWOOD VILLAGE", > "FALKLAND APTS", "BUCKINGHAM II", "FIRST BUCKINGHAM", "PARKBELT HOMES", > "BUCKINGHAM III", "SKYLAND APTS", "BUCKINGHAM IV", "WESTOVER APTS", > "MT VERNON DEV", "ARLINGTON VILLAGE APTS", "FAIRFAX VILLAGE III", > "BUCKINGHAM V", "SUBURBAN GARDENS", "BUCKINGHAM III", "PINEY BRANCH APTS", > "AUBURN GARDENS", "BUCKINGHAM V", "BUCKINGHAM IV", "GLEBE COURT APTS", > "BARCROFT APTS", "FAIRFAX VILLAGE IV", "BELLEVUE GARDENS", "FILLMORE CO INC", > "BRADLEY BLVD APTS", "2702 WISCONSIN", "WINCHESTER SUMMIT", "BUCKINGHAM II", > "ARLINGTON TOWERS", "ARLINGTON TOWERS", "ARLINGTON TOWERS", "BRADDOCK LEE APT I", > "BRADDOCK LEE APT II", "BRADDOCK LEE APT III", "BRADDOCK LEE APT IV", > "BRADDOCK LEE APT V", "4600 CONN COOP", "GARFIELD APTS", "CATHEDERAL PK TOW", > "SECOND PKSIDE APT", "THE ENVOY", "CARDINAL HOUSE", "TUNLAW PARK APTS", > "RAVENWOOD TOWERS", "PARKSIDE APTS", "PARK BERKSHIRE APTS", "JOHN MARSHALL APTS", > "MATTAPONY MANOR", "MOSBY VILLAGE APTS", "RIVER TOWERS", "", > "BARNETT HOUSE", "RIVERS TOWERS II", "FAIRHAVEN GARDENS", "CIRCLE APARTMENTS", > "HYBLA VALLEY MOBLE HMS", "PARK PLAZA APTS", "ENVOY TOWERS", > "C H HOUSTON APTS", "DUMFRIES MOBILE HM VLG", "SKYLINE TOWERS APTS I", > "SKYLINE CENTER APTS", "CHESTNUT GROVE APTS", "BRENTANA GARDENS", > "GREGORY ESTATES", "BARNABY GARDENS", "C H HOUSTON APTS", "HIGHVIEW TERRACE", > "CHESTNUT GROVE APTS", "ROCKVILLE NRSNG HOME", "STANTON-WELLINGTON APTS. DBA F", > "COLLINSWOOD NURSING HOME", "SHADY GROVE ADVENTIST NURSING", > "GLENDALE LAKE APTS", "GARFIELD COURT", "COUNTRYSIDE APTS", "INVIEW HOUSE", > "TOP OF THE PARK", "SUMMIT CREST APTS", "BRADFORD PLACE", "HILLSIDE TERR APTS", > "OAK HILL APTS", "PARK BERKSHIRE APTS I", "CARROLLAN MANOR", > "LANSDOWNE VILLAGE APTS", "GATEWAY SQUARE", "KIRKWOOD VILLAGE APTS", > "GOODACRE APTS", "PENN SOUTHERN APTS.", "WOODMONT PARK APTS", > "FINIANS CT", "ROCKFORDTHE", "ISABELLA PARK APARTMENTS", "GREENTREE III", > "", "MARLOW HEIGHTS SECTION A"), `PROPERTY STREET` = c("1913 WILSON BLVD", > "1913 WILSON BLVD", "8305 16TH STREET", "1913 WILSON BLVD", "1287 BRENTWOOD RD NE", > "8305 16TH STREET", "313 N GLEBE RD", "313 N GLEBE RD", "", "313 N GLEBE RD", > "2307 SKYLAND PL SE", "313 N GLEBE RD", "1649 N LONGFELLOW", > "", "1021 S BARTON", "2019 37TH ST SE", "313 N GLEBE RD", "4904 JAY ST NE", > "313 N GLEBE RD", "8400 PINEY BRANCH RD", "101 GLEBE ROAD E", > "313 N GLEBE RD", "313 N GLEBE RD", "", "1130 S GEORGE MASON DR", > "2019 37TH ST SE", "", "", "", "2702 WISCONSIN AVE", "", "313 N GLEBE RD", > "1101 ARLINGTON BLVD", "1011 ARLINGTON BLVD", "1011 ARLINGTON BLVD", > "3810 KING ST", "3810 KING ST", "3810 KING ST", "3810 KING ST", > "3810 KING ST", "4600 CONNECTICUT AVE NW", "5410 CONNECTICUT AVE NW", > "3100 CONNECTICUT AVE NW", "", "2144 CALIFORNIA ST NW", "3000 SPOUT RUN PKWY", > "3850 TUNLAW RD NW", "6166 LEESBURG PIKE", "10520 MONTROSE AVE", > "6317 PENNSYLVANIA AVE", "", "5002 57TH AVE", "10560 MAIN ST", > "6631 WAKEFIELD DRIVE", "", "201 MASSACHUSETTS AVE NE", "6631 WAKEFIELD DRIVE", > "JERMANTOWN ROAD", "2030 N ADAMS ST", "BARGIN CITY-HYBLA VALLEY", > "1629 COLUMBIA RD NW", "2400 16TH ST NW", "1712 16TH ST NW", > "DUMFRIES", "5601 SEMINARY ROAD", "5600 SEMINARY ROAD", "11200 CHESTNUT GROVE SQ", > "", "7618 GEORGE PALMER HGWY", "3876 9TH ST SE", "1714 16TH ST NW", > "6800-7021 HIGHVIEW TER", "11200 CHESTNUT GROVE SQ", "303 ADCLARE ROAD", > "2549 ELVANS RD SE", "299 HURLEY AVENUE", "9701 MEDICAL CENTER DRIVE", > "10001 GREENBELT RD", "5701 43RD AVE", "9971 GOODLUCK RD", "6161 EDSALL ROAD", > "4009 GALLATIN ST", "38 N SUMMIT AVE", "3506 SILVER PARK RD", > "1805-1910 23RD ST SE", "11497 COLUMBIA PIKE", "6301 PENNSYLVANIA AVE", > "8621 ANNAPOLIS RD", "1720 BRIGHTSEAT RD", "4855 ST. BARNABAS RD", > "2731 NICHOLSON", "8619 PINEY BRANCH RD", "", "1001 ROCKVILLE PIKE", > "7756 FINNS LANE", "1444 ROCK CREEK FORD RD", "2214 PHELPS ROAD", > "8051 GREENLEAF TERR", "", "4223 28TH AVE"), `PROPERTY CITY` = c("ARLINGTON", > "ARLINGTON", "SILVER SPRING", "ARLINGTON", "WASHINGTON", "SILVER SPRING", > "ARLINGTON", "ARLINGTON", "GREENBELT", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ALEXANDRIA", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "WASHINGTON", "ARLINGTON", "SILVER SPRING", "ALEXANDRIA", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "WASHINGTON", > "WASHINGTON", "ARLINGTON", "BETHESDA", "WASHINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ALEXANDRIA", > "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "ROCKVILLE", "WASHINGTON", "ARLINGTON", > "WASHINGTON", "SEVEN CORNERS", "BETHESDA", "SUITLAND-SILVER HI", > "WASHINGTON", "BLADENSBURG", "FAIRFAX", "ALEXANDRIA", "", "WASHINGTON", > "ALEXANDRIA", "FAIRFAX", "ARLINGTON", "FAIRFAX", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "DUMFRIES", "BAILEY'S CROSSROAD", > "BAILEY'S CROSSROAD", "RESTON", "RESTON", "SEAT PLEASANT", "WASHINGTON", > "WASHINGTON", "HYATTSVILLE", "RESTON", "ROCKVILLE", "WASHINGTON", > "ROCKVILLE", "ROCKVLLE", "LANHAM-SEABROOK", "HYATTSVILLE", "HYATTSVILLE", > "ALEXANDRIA", "HYATTSVILLE", "GAITHERSBURG", "SUITLAND-SILVER HI", > "WASHINGTON", "SILVER SPRING", "FORESTVILLE", "LANHAM-SEABROOK", > "LANDOVER", "PRINCE GEORGE'S CO", "HYATTSVILLE", "SILVER SPRING", > "SILVER SPRING", "PURCELLVILLE", "LANHAM-SEABROOK", "WASHINGTON", > "ADELPHI", "GLEN BURNIE", "", "SUITLAND-SILVER HI"), `PROPERTY STATE` = c("VA", > "VA", "MD", "VA", "DC", "MD", "VA", "VA", "MD", "VA", "DC", "VA", > "VA", "VA", "VA", "DC", "VA", "DC", "VA", "MD", "VA", "VA", "VA", > "VA", "VA", "DC", "DC", "VA", "MD", "DC", "DC", "VA", "VA", "VA", > "VA", "VA", "VA", "VA", "VA", "VA", "DC", "DC", "DC", "MD", "DC", > "VA", "DC", "VA", "MD", "MD", "DC", "MD", "VA", "VA", "", "DC", > "VA", "VA", "VA", "VA", "DC", "DC", "DC", "VA", "00", "VA", "VA", > "VA", "MD", "DC", "DC", "MD", "VA", "MD", "DC", "MD", "MD", "MD", > "MD", "MD", "VA", "MD", "MD", "MD", "DC", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD", "VA", "MD", "DC", "MD", "MD", "", "MD" > ), `PROPERTY ZIP` = c("22201", "22201", "20910", "22201", "20018", > "20910", "22203", "22203", "20770", "22203", "20020", "22203", > "22205", "00000", "22204", "20020", "22203", "20019", "22203", > "20901", "22305", "22203", "22203", "00000", "22204", "20020", > "00000", "00000", "20014", "20007", "00000", "22203", "22209", > "22209", "22209", "22302", "22302", "22302", "22302", "22302", > "20008", "20015", "20008", "00000", "20008", "22201", "20007", > "22044", "20014", "20023", "00000", "20710", "22030", "22037", > "00000", "20002", "22307", "22030", "22201", "22030", "20009", > "20009", "20009", "22026", "22041", "22041", "22090", "22037", > "20027", "20032", "20005", "20782", "22090", "20850", "20020", > "20850", "20850", "20801", "20781", "20706", "22304", "20785", > "20877", "20746", "20020", "20904", "20747", "20706", "20785", > "20748", "20782", "20901", "20910", "20850", "20801", "20011", > "20783", "00000", "00000", "20748"), UNITS = c(274L, 464L, 181L, > 237L, 440L, 303L, 98L, 524L, 10L, 200L, 223L, 192L, 153L, 57L, > 655L, 207L, 276L, 204L, 112L, 214L, 304L, 176L, 248L, 77L, 423L, > 214L, 251L, 181L, 161L, 80L, 41L, 98L, 366L, 415L, 434L, 40L, > 58L, 80L, 40L, 40L, 267L, 166L, 323L, 120L, 113L, 229L, 284L, > 304L, 170L, 336L, 30L, 154L, 205L, 168L, 0L, 95L, 175L, 76L, > 116L, 250L, 274L, 332L, 45L, 156L, 470L, 470L, 225L, 240L, 503L, > 79L, 46L, 306L, 224L, 100L, 398L, 160L, 170L, 443L, 62L, 451L, > 207L, 106L, 232L, 213L, 192L, 281L, 336L, 187L, 345L, 297L, 750L, > 156L, 308L, 414L, 57L, 66L, 445L, 1122L, 0L, 0L), `INITIAL ENDORSEMENT DATE` = c("4/20/35", > "12/9/35", "9/11/36", "2/8/37", "8/3/37", "8/19/37", "3/15/40", > "8/3/37", "5/13/38", "4/13/38", "3/7/39", "8/26/38", "8/24/39", > "8/18/39", "1/4/39", "2/24/40", "1/4/39", "4/11/41", "5/9/39", > "7/10/40", "8/19/40", "7/15/40", "4/14/41", "7/15/41", "10/23/41", > "9/30/41", "7/16/43", "4/23/42", "3/13/42", "6/8/42", "1/18/43", > "9/23/44", "1/29/54", "4/30/54", "1/14/54", "9/28/54", "12/1/54", > "2/8/55", "1/4/55", "11/4/54", "4/16/59", "5/1/58", "6/10/59", > "10/1/58", "9/20/60", "12/4/58", "2/17/60", "4/13/61", "1/18/61", > "6/2/61", "6/19/61", "1/25/62", "11/26/62", "3/14/62", "5/4/62", > "9/26/62", "8/10/62", "6/3/63", "11/6/63", "8/15/63", "10/11/63", > "12/11/63", "8/26/65", "10/27/71", "10/10/72", "1/10/73", "8/3/71", > "2/7/72", "7/1/70", "5/1/73", "2/24/78", "8/31/81", "9/17/80", > "4/16/82", "1/19/89", "5/21/08", "4/4/08", "5/26/83", "7/11/83", > "11/16/83", "6/30/83", "5/26/83", "5/26/83", "6/27/83", "5/13/83", > "6/29/83", "1/30/84", "10/25/84", "10/25/84", "10/25/84", "7/28/83", > "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", "8/1/83", > "7/28/83", "6/20/85", "6/20/85"), `FINAL ENDORSEMENT DATE` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "9/20/60", "", "", > "", "", "", "", "", "", "", "", "11/25/64", "", "", "", "", "8/24/65", > "", "2/14/67", "", "1/10/73", "1/10/73", "", "", "", "12/6/82", > "2/24/78", "8/31/81", "", "4/16/82", "5/24/91", "7/14/09", "4/4/08", > "5/26/83", "7/11/83", "11/16/83", "", "5/26/83", "5/26/83", "6/27/83", > "5/16/83", "6/29/83", "1/31/84", "10/25/84", "10/25/84", "10/25/84", > "7/28/83", "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", > "8/1/83", "7/28/83", "6/20/85", "6/20/85"), `ORIGINAL MORTGAGE AMOUNT` = c("875,000", > "1,480,000", "840,000", "725,000", "1,650,000", "1,225,000", > "319,000", "1,825,000", "35,000", "650,000", "760,000", "725,000", > "410,000", "165,000", "2,385,000", "701,000", "1,035,000", "692,000", > "490,000", "815,000", "942,000", "610,000", "935,000", "260,000", > "1,500,000", "830,000", "980,000", "660,000", "630,000", "265,000", > "139,000", "283,000", "4,301,100", "3,831,000", "4,482,200", > "313,700", "462,200", "641,800", "312,000", "312,100", "4,103,600", > "2,313,100", "5,626,500", "1,271,600", "1,447,200", "2,838,400", > "4,434,100", "3,640,900", "1,905,700", "2,893,200", "270,300", > "1,480,000", "3,048,165", "2,365,427", "1,138,600", "1,129,200", > "2,436,300", "752,500", "1,691,900", "450,000", "3,799,363", > "4,626,400", "484,500", "561,600", "10,795,600", "11,081,000", > "4,248,400", "3,714,938", "1,909,441", "436,825", "25,000", "348,700", > "173,400", "55,100", "4,311,301", "462,300", "1,170,000", "8,499,800", > "1,065,700", "13,387,500", "5,880,000", "1,500,000", "3,846,600", > "5,300,000", "1,750,000", "4,600,000", "5,653,000", "3,000,000", > "5,000,000", "5,000,000", "7,500,000", "1,600,000", "6,500,000", > "7,300,000", "1,350,000", "1,260,900", "8,081,100", "21,988,600", > "10,675,000", "4,600,000"), `FIRST PAYMENT DATE` = c("1/1/36", > "3/1/37", "4/1/38", "5/1/38", "10/1/38", "6/1/39", "12/1/39", > "2/1/39", "9/1/38", "11/1/39", "9/1/40", "3/1/40", "2/1/41", > "2/1/41", "7/1/40", "8/1/41", "8/1/40", "7/1/42", "12/1/40", > "2/1/42", "5/1/41", "2/1/42", "11/1/42", "1/1/43", "11/1/43", > "7/1/43", "5/1/44", "4/1/44", "3/1/44", "7/1/44", "3/1/44", "10/1/44", > "6/1/56", "6/1/56", "6/1/56", "10/1/54", "1/1/55", "3/1/55", > "2/1/55", "12/1/54", "6/1/59", "8/1/59", "12/1/60", "10/1/59", > "10/1/60", "6/1/60", "2/1/62", "1/1/63", "4/1/62", "6/1/63", > "3/1/62", "10/1/63", "4/1/65", "6/1/63", "1/1/64", "9/1/64", > "5/1/64", "9/1/64", "7/1/65", "6/1/64", "1/1/65", "9/1/65", "12/1/66", > "12/1/71", "4/1/73", "4/1/73", "2/1/73", "9/1/73", "7/1/70", > "5/1/73", "5/1/78", "10/1/81", "1/1/81", "7/1/82", "9/1/91", > "2/1/09", "6/1/08", "7/1/83", "9/1/83", "1/1/84", "8/1/83", "7/1/83", > "7/1/83", "8/1/83", "7/1/83", "8/1/83", "3/1/84", "12/1/84", > "12/1/84", "12/1/84", "9/1/83", "9/1/83", "12/1/85", "9/1/83", > "3/1/84", "6/1/84", "9/1/83", "9/1/83", "7/1/85", "7/1/85"), > `MATURITY DATE` = c("4/1/50", "12/1/55", "7/1/64", "2/1/57", > "7/1/52", "3/1/59", "1/1/65", "4/1/65", "12/1/63", "1/1/66", > "11/1/61", "5/1/66", "11/1/68", "12/1/67", "7/1/72", "8/1/67", > "10/1/66", "1/1/75", "2/1/67", "8/1/69", "7/1/68", "8/1/69", > "5/1/70", "7/1/70", "5/1/71", "10/1/70", "8/1/71", "11/1/71", > "10/1/71", "2/1/72", "10/1/71", "9/1/69", "12/1/94", "3/1/95", > "11/1/94", "12/1/93", "3/1/94", "5/1/94", "4/1/94", "2/1/94", > "10/1/91", "10/1/98", "2/1/00", "12/1/98", "9/1/99", "2/1/99", > "9/1/00", "12/1/01", "3/1/01", "8/1/01", "6/1/97", "9/1/02", > "2/1/03", "5/1/02", "12/1/02", "5/1/03", "4/1/03", "5/1/03", > "6/1/04", "5/1/79", "12/1/03", "8/1/04", "11/1/05", "11/1/11", > "3/1/13", "3/1/13", "1/1/13", "8/1/13", "4/1/00", "12/1/11", > "2/1/04", "4/1/12", "1/1/13", "12/1/89", "8/1/21", "1/1/42", > "5/1/36", "6/1/18", "8/1/18", "12/1/18", "7/1/18", "6/1/18", > "6/1/18", "7/1/18", "6/1/18", "7/1/18", "2/1/19", "11/1/19", > "11/1/19", "11/1/19", "8/1/18", "8/1/18", "11/1/20", "8/1/18", > "2/1/19", "5/1/19", "8/1/18", "8/1/18", "7/1/20", "7/1/20" > ), `TERM IN MONTHS` = c(172L, 226L, 316L, 226L, 166L, 238L, > 302L, 315L, 304L, 315L, 255L, 315L, 334L, 323L, 385L, 313L, > 315L, 391L, 315L, 331L, 327L, 331L, 331L, 331L, 331L, 328L, > 328L, 332L, 332L, 332L, 332L, 300L, 463L, 466L, 462L, 471L, > 471L, 471L, 471L, 471L, 389L, 471L, 471L, 471L, 468L, 465L, > 464L, 468L, 468L, 459L, 424L, 468L, 455L, 468L, 468L, 465L, > 468L, 465L, 468L, 180L, 468L, 468L, 468L, 480L, 480L, 480L, > 480L, 480L, 358L, 464L, 310L, 367L, 385L, 90L, 360L, 396L, > 336L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 421L, 421L), `INTEREST RATE` = c(4.5, 4.5, 4.5, > 4.5, 4.5, 4.5, 4, 3.5, 4.5, 3.5, 3.75, 3.5, 4, 4.25, 4.25, > 4, 3.5, 4, 3.5, 4, 4, 3.5, 3.5, 4, 4, 4, 4, 4, 4, 4, 4, 3.5, > 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.5, 4.5, > 4.5, 4.5, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 8.5, 7.5, 7.5, 7.5, 7.5, 5.25, 6, 9, 14.5, 13, 16.5, > 10.75, 6.95, 5.95, 12.25, 12.5, 13, 12.5, 12.25, 12.25, 12.5, > 12, 12.5, 13, 13.5, 13.5, 13.5, 13, 13, 11.5, 12.5, 13, 13.5, > 13, 13, 12, 12), `HOLDER NAME` = c("NEW YORK LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "NEW YORK LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", > "UNION CENTRAL LIFE INS CO", "NAVY MUTUAL AID ASSN", "WELLS FARGO BANK NA-PRUDENTIAL", > "", "WELLS FARGO BANK NA-PRUDENTIAL", "LIFE INSURANCE CO OF VIRGINIA", > "WELLS FARGO BANK NA-PRUDENTIAL", "SECURITY MUTUAL LIFE INS CO", > "NAVY MUTUAL AID ASSN", "NEW YORK LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "", "NEW YORK LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "WELLS FARGO BANK NA-PRUDENTIAL", > "KEY BANK CENTRAL NY", "NATIONAL LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "CONNECTICUT GEN LIFE INS CO", "SAN JUAN COUNTY BK", "SECURITY MUTUAL LIFE INS CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "SEAMENS BANK SAVINGS FSB-FDIC", > "REPUBLIC NATIONAL BANK OF NEW", "LINCOLN SAVINGS BANK", > "LIBERTY LENDING INC", "EMIGRANT BANK", "PROVIDENT BANK", > "EMIGRANT BANK", "NEW YORK COMMUNITY BANK", "", "", "", "", > "PFC CORPORATION", "DOLLAR-DRY DOCK BANK", "PHILADELPHIA SAVINGS FUND SOC", > "PHILADELPHIA SAVINGS FUND SOC", "AMERICAN GEN LIFE AND ACCDT IN", > "", "", "", "", "PHILADELPHIA SAVINGS FUND SOC", "SOVRAN BANK MARYLAND", > "SWISS RE LIFE AND HEALTH AMERI", "", "", "AMERICAN SECURITY CORPORATION", > "PUEBLO MORTGAGE INC", "JOHN HANCOCK LIFE INSURANCE CO", > "CHASE MANHATTAN BANK", "RIGGS BANK NA", "FANNIE MAE", "STATE TEACHERS RT BOARD OHIO", > "STATE TEACHERS RT BOARD OHIO", "FANNIE MAE", "RIGGS BANK NA", > "PEOPLES LIFE INS CO WASHINGTON", "WHITE MOUNTAINS SERVICES CORP", > "RIGGS BANK NA", "DRG FUNDING CORPORATION", "FANNIE MAE", > "ALLFIRST BANK", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "DRG FUNDING CORPORATION", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC"), `HOLDER CITY` = c("NEW YORK", > "NEW YORK", "CINCINNATI", "NEW YORK", "NEW YORK", "CINCINNATI", > "ARLINGTON", "FREDERICK", "", "FREDERICK", "RICHMOND", "FREDERICK", > "BINGHAMTON", "ARLINGTON", "NEW YORK", "MONTPELIER", "FREDERICK", > "MONTPELIER", "FREDERICK", "", "NEW YORK", "FREDERICK", "FREDERICK", > "BUFFALO", "MONTPELIER", "MONTPELIER", "NEW YORK", "CINCINNATI", > "HARTFORD", "FRIDAY HARBOR", "BINGHAMTON", "FREDERICK", "EAST HARTFORD", > "NEW YORK", "JERICHO", "BARTLETT", "NEW YORK", "ISELIN", > "NEW YORK", "CLEVELAND", "", "", "", "", "TUSTIN", "WHITE PLAINS", > "PHILADELPHIA", "PHILADELPHIA", "NASHVILLE", "", "", "", > "", "PHILADELPHIA", "BETHESDA", "NEW YORK", "", "", "BALTIMORE", > "TUCSON", "BOSTON", "NEW YORK", "RIVERDALE", "PHILADELPHIA", > "COLUMBUS", "COLUMBUS", "ATLANTA", "RIVERDALE", "LOUISVILLE", > "FARMINGTON HILLS", "RIVERDALE", "WASHINGTON", "ATLANTA", > "FREDERICK", "LA PLATA", "MC LEAN", "NEW ALBANY", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "WASHINGTON", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA"), `HOLDER STATE` = c("NY", "NY", "OH", > "NY", "NY", "OH", "VA", "MD", "", "MD", "VA", "MD", "NY", > "VA", "NY", "VT", "MD", "VT", "MD", "", "NY", "MD", "MD", > "NY", "VT", "VT", "NY", "OH", "CT", "WA", "NY", "MD", "CT", > "NY", "NY", "TN", "NY", "NJ", "NY", "OH", "", "", "", "", > "CA", "NY", "PA", "PA", "TN", "", "", "", "", "PA", "MD", > "NY", "", "", "MD", "AZ", "MA", "NY", "MD", "PA", "OH", "OH", > "GA", "MD", "KY", "MI", "MD", "DC", "GA", "MD", "MD", "VA", > "OH", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "DC", "MD", > "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD"), `SERVICER NAME` = c("No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "", "", "", "", "", "", "", "", "No Data Available", > "", "No Data Available", "No Data Available", "", "No Data Available", > "No Data Available", "", "", "No Data Available", "", "", > "", "", "", "No Data Available", "", "", "No Data Available", > "", "", "", "", "", "", "", "WHITE MOUNTAINS SERVICES CORP", > "", "", "", "", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SERVICER CITY` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "FARMINGTON HILLS", "", "", > "", "", "LA PLATA", "MC LEAN", "NEW ALBANY", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", ""), `SERVICER STATE` = c("", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "MI", "", "", "", "", "MD", "VA", "OH", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SECTION OF ACT CODE` = c("HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRP", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRP", "HRB", > "HRP", "HRP", "HRB", "HRB", "HRP", "HRP", "ZSB", "ZSB", "ZSB", > "ZSB", "ZSJ", "ZSQ", "ZSQ", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL" > ), `SOA CATEGORY Sub Category` = c("207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Rental Projects", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Rental Projects", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Rental Projects", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 221-MIR(d)(3)&(d)(4) Improvements & Additions", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance"), `TERM TYPE` = c("11", "11", > "11", "11", "11", "11", "12", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "18", "21", "21", "21", "11", "19", "11", "11", > "20", "21", "19", "11", "21", "11", "11", "11", "11", "15", > "11", "11", "11", "11", "11", "21", "19", "11", "11", "11", > "11", "11", "19", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "14", "11", "11", "11", "11", "11", "11", "11"), `TERMINATION TYPE DESCRIPTION` = c("Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "SUPERSESSION", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Maturity", > "VOLUNTARY", "VOLUNTARY", "VOLUNTARY", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Acquired", "VOLUNTARY", "Assignment", > "Prepayment", "VOLUNTARY", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Conveyance", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "VOLUNTARY", "Assignment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "CANCELLED", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment" > ), `TYPE Claim Non Claim ` = c("NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM"), `TERM DATE` = c("4/1/39", "4/1/39", "9/1/40", > "4/1/39", "2/1/49", "9/1/40", "9/1/44", "8/1/46", "1/1/50", > "11/1/44", "7/1/54", "8/1/46", "11/1/41", "7/1/54", "12/1/39", > "3/1/46", "8/1/46", "12/1/45", "11/1/44", "7/1/45", "11/1/45", > "8/1/46", "8/1/46", "8/1/46", "10/1/46", "7/1/46", "9/1/47", > "12/1/43", "7/1/46", "12/1/42", "5/1/44", "8/1/46", "8/1/65", > "8/1/65", "8/1/65", "1/31/83", "1/31/83", "2/3/83", "1/31/83", > "1/31/83", "12/7/72", "1/3/79", "12/4/79", "10/1/67", "10/1/99", > "5/1/71", "4/1/70", "10/16/79", "10/1/67", "8/1/66", "2/27/75", > "1/29/82", "12/1/66", "12/3/79", "4/4/75", "10/25/85", "1/30/80", > "6/25/74", "12/19/72", "5/31/73", "7/1/94", "4/1/67", "3/19/87", > "3/16/73", "2/13/86", "2/13/86", "5/24/82", "7/12/73", "12/8/76", > "3/10/89", "3/19/87", "10/31/85", "5/24/82", "1/21/85", "8/30/95", > "1/28/11", "11/30/10", "5/31/86", "5/31/86", "4/30/86", "11/20/84", > "6/30/86", "6/30/86", "3/31/86", "1/16/87", "10/31/86", "12/31/85", > "4/1/86", "4/1/86", "4/1/86", "3/31/86", "3/31/86", "8/3/90", > "10/31/86", "6/30/86", "1/30/87", "4/30/86", "4/30/86", "2/27/87", > "8/31/86"), TE = c("", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" > ), TC = c("", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", ""), Status = c(TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)), .Names = c("HUD PROJECT NUMBER", > "PROPERTY NAME", "PROPERTY STREET", "PROPERTY CITY", "PROPERTY STATE", > "PROPERTY ZIP", "UNITS", "INITIAL ENDORSEMENT DATE", "FINAL ENDORSEMENT DATE", > "ORIGINAL MORTGAGE AMOUNT", "FIRST PAYMENT DATE", "MATURITY DATE", > "TERM IN MONTHS", "INTEREST RATE", "HOLDER NAME", "HOLDER CITY", > "HOLDER STATE", "SERVICER NAME", "SERVICER CITY", "SERVICER STATE", > "SECTION OF ACT CODE", "SOA CATEGORY Sub Category", "TERM TYPE", > "TERMINATION TYPE DESCRIPTION", "TYPE Claim Non Claim ", "TERM DATE", > "TE", "TC", "Status"), row.names = c(NA, 100L), class = "data.frame") > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Thank you for the (not quite working) example. a) your '= "character"' bit is a bit anti-productive, since on the one hand you are indicating that a default value can be used (so omitting any argument is okay) yet the default value you are specifying is invalid. b) The origin argument is rarely needed when converting from character strings. It is usually needed when you plan to convert to or from the underlying numeric value, which is primarily useful when interfacing with broken data formats such as XLS. c) You really need to study the help pages for ?if and ?ifelse, or perhaps the "Introduction to R" document that comes with R. The "if" programming control construct is not designed for manipulating vectors. DateCentury2 <- function( Dt ) { # strsplit returns a list of "rows" of values # do.call passes that list to the rbind function as arguments # to make a matrix # conversion to numeric loses the matrix dimensions, have to # re-convert to matrix parts <- matrix( as.numeric( do.call( rbind , strsplit( Dt, "/", fixed = TRUE ) ) ) , nrow = length( Dt ) ) # extract two digit year from current Date CurrYr <- as.POSIXlt( Sys.Date() )$year %% 100 # TRUE values for rows where year value needs to be 1900 idx <- parts[ , 3 ] > CurrYr # push two-digit years to appropriate century parts[ , 3 ] <- parts[ , 3 ] + ifelse( idx, 1900, 2000 ) # create a date, note ISOdate returns POSIXct rather than Date type result <- as.Date( ISOdate( parts[ , 3 ], parts[ , 1 ], parts[ , 2 ] ) ) result } On Sun, 14 Aug 2016, Glenn Schultz wrote:> Here is a sample of the data that I am working with. Dates may go back as far as 1930?s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCentury(Date = df[1,?TERM DATE?) it will return the correct date. However, if I use the function as follows DateCentury[,?TERM DATE?]) it does not work. Anyhow, I have been at this awhile and I am totally stumped. I need to refactor the below date vectors across just under 50,000 observations. Any suggestions would be greatly appreciated. > > Best, > Glenn > > DateCentury <- function(Date = "character"){ > ThisDate = as.Date(Date, format = "%m/%d/%y", origin = "1900-01-01") > CurrDate = as.Date(Sys.Date()) > Century = as.Date("1999-12-31", format = "%Y-%m-%d", origin = "1900-01-01") > NewDate <- if(ThisDate > CurrDate){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > > } else { > > if(ThisDate <= Century){ > > if(nchar(Date) == 6){ > paste(substr(Date,1,4),"19", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"19", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"19", substr(Date,7,8),sep ="") > } > } > } else { > if(nchar(Date) == 6){paste(substr(Date,1,4),"20", substr(Date,5,6),sep ="") > } else { > if(nchar(Date) == 7){paste(substr(Date,1,5),"20", substr(Date,6,7),sep ="") > } else { > paste(substr(Date,1,6),"20", substr(Date,7,8),sep ="") > } > } > } > } > > return(NewDate)} > > > > > > Data > structure(list(`HUD PROJECT NUMBER` = c(1L, 2L, 3L, 4L, 5L, 6L, > 7L, 8L, 9L, 10L, 39L, 43L, 46L, 47L, 49L, 50L, 51L, 52L, 53L, > 54L, 55L, 58L, 59L, 60L, 61L, 62L, 66L, 68L, 69L, 74L, 77L, 78L, > 82L, 83L, 84L, 87L, 88L, 89L, 90L, 91L, 98L, 99L, 100L, 101L, > 102L, 103L, 104L, 105L, 107L, 108L, 110L, 111L, 112L, 113L, 114L, > 116L, 118L, 119L, 120L, 121L, 122L, 123L, 125L, 135L, 140L, 141L, > 144L, 146L, 9001L, 9002L, 10001L, 10004L, 10005L, 10007L, 10008L, > 10010L, 10011L, 10501L, 10502L, 10503L, 10504L, 10505L, 10506L, > 10507L, 10508L, 10510L, 10515L, 10516L, 10517L, 10518L, 10519L, > 10520L, 10521L, 10522L, 10523L, 10525L, 10526L, 10527L, 10528L, > 10529L), `PROPERTY NAME` = c("COLONIAL VILLAGE APTS", "COLONIAL VILLAGE APTS", > "FALKLAND APTS", "COLONIAL VILLAGE APTS", "BRENTWOOD VILLAGE", > "FALKLAND APTS", "BUCKINGHAM II", "FIRST BUCKINGHAM", "PARKBELT HOMES", > "BUCKINGHAM III", "SKYLAND APTS", "BUCKINGHAM IV", "WESTOVER APTS", > "MT VERNON DEV", "ARLINGTON VILLAGE APTS", "FAIRFAX VILLAGE III", > "BUCKINGHAM V", "SUBURBAN GARDENS", "BUCKINGHAM III", "PINEY BRANCH APTS", > "AUBURN GARDENS", "BUCKINGHAM V", "BUCKINGHAM IV", "GLEBE COURT APTS", > "BARCROFT APTS", "FAIRFAX VILLAGE IV", "BELLEVUE GARDENS", "FILLMORE CO INC", > "BRADLEY BLVD APTS", "2702 WISCONSIN", "WINCHESTER SUMMIT", "BUCKINGHAM II", > "ARLINGTON TOWERS", "ARLINGTON TOWERS", "ARLINGTON TOWERS", "BRADDOCK LEE APT I", > "BRADDOCK LEE APT II", "BRADDOCK LEE APT III", "BRADDOCK LEE APT IV", > "BRADDOCK LEE APT V", "4600 CONN COOP", "GARFIELD APTS", "CATHEDERAL PK TOW", > "SECOND PKSIDE APT", "THE ENVOY", "CARDINAL HOUSE", "TUNLAW PARK APTS", > "RAVENWOOD TOWERS", "PARKSIDE APTS", "PARK BERKSHIRE APTS", "JOHN MARSHALL APTS", > "MATTAPONY MANOR", "MOSBY VILLAGE APTS", "RIVER TOWERS", "", > "BARNETT HOUSE", "RIVERS TOWERS II", "FAIRHAVEN GARDENS", "CIRCLE APARTMENTS", > "HYBLA VALLEY MOBLE HMS", "PARK PLAZA APTS", "ENVOY TOWERS", > "C H HOUSTON APTS", "DUMFRIES MOBILE HM VLG", "SKYLINE TOWERS APTS I", > "SKYLINE CENTER APTS", "CHESTNUT GROVE APTS", "BRENTANA GARDENS", > "GREGORY ESTATES", "BARNABY GARDENS", "C H HOUSTON APTS", "HIGHVIEW TERRACE", > "CHESTNUT GROVE APTS", "ROCKVILLE NRSNG HOME", "STANTON-WELLINGTON APTS. DBA F", > "COLLINSWOOD NURSING HOME", "SHADY GROVE ADVENTIST NURSING", > "GLENDALE LAKE APTS", "GARFIELD COURT", "COUNTRYSIDE APTS", "INVIEW HOUSE", > "TOP OF THE PARK", "SUMMIT CREST APTS", "BRADFORD PLACE", "HILLSIDE TERR APTS", > "OAK HILL APTS", "PARK BERKSHIRE APTS I", "CARROLLAN MANOR", > "LANSDOWNE VILLAGE APTS", "GATEWAY SQUARE", "KIRKWOOD VILLAGE APTS", > "GOODACRE APTS", "PENN SOUTHERN APTS.", "WOODMONT PARK APTS", > "FINIANS CT", "ROCKFORDTHE", "ISABELLA PARK APARTMENTS", "GREENTREE III", > "", "MARLOW HEIGHTS SECTION A"), `PROPERTY STREET` = c("1913 WILSON BLVD", > "1913 WILSON BLVD", "8305 16TH STREET", "1913 WILSON BLVD", "1287 BRENTWOOD RD NE", > "8305 16TH STREET", "313 N GLEBE RD", "313 N GLEBE RD", "", "313 N GLEBE RD", > "2307 SKYLAND PL SE", "313 N GLEBE RD", "1649 N LONGFELLOW", > "", "1021 S BARTON", "2019 37TH ST SE", "313 N GLEBE RD", "4904 JAY ST NE", > "313 N GLEBE RD", "8400 PINEY BRANCH RD", "101 GLEBE ROAD E", > "313 N GLEBE RD", "313 N GLEBE RD", "", "1130 S GEORGE MASON DR", > "2019 37TH ST SE", "", "", "", "2702 WISCONSIN AVE", "", "313 N GLEBE RD", > "1101 ARLINGTON BLVD", "1011 ARLINGTON BLVD", "1011 ARLINGTON BLVD", > "3810 KING ST", "3810 KING ST", "3810 KING ST", "3810 KING ST", > "3810 KING ST", "4600 CONNECTICUT AVE NW", "5410 CONNECTICUT AVE NW", > "3100 CONNECTICUT AVE NW", "", "2144 CALIFORNIA ST NW", "3000 SPOUT RUN PKWY", > "3850 TUNLAW RD NW", "6166 LEESBURG PIKE", "10520 MONTROSE AVE", > "6317 PENNSYLVANIA AVE", "", "5002 57TH AVE", "10560 MAIN ST", > "6631 WAKEFIELD DRIVE", "", "201 MASSACHUSETTS AVE NE", "6631 WAKEFIELD DRIVE", > "JERMANTOWN ROAD", "2030 N ADAMS ST", "BARGIN CITY-HYBLA VALLEY", > "1629 COLUMBIA RD NW", "2400 16TH ST NW", "1712 16TH ST NW", > "DUMFRIES", "5601 SEMINARY ROAD", "5600 SEMINARY ROAD", "11200 CHESTNUT GROVE SQ", > "", "7618 GEORGE PALMER HGWY", "3876 9TH ST SE", "1714 16TH ST NW", > "6800-7021 HIGHVIEW TER", "11200 CHESTNUT GROVE SQ", "303 ADCLARE ROAD", > "2549 ELVANS RD SE", "299 HURLEY AVENUE", "9701 MEDICAL CENTER DRIVE", > "10001 GREENBELT RD", "5701 43RD AVE", "9971 GOODLUCK RD", "6161 EDSALL ROAD", > "4009 GALLATIN ST", "38 N SUMMIT AVE", "3506 SILVER PARK RD", > "1805-1910 23RD ST SE", "11497 COLUMBIA PIKE", "6301 PENNSYLVANIA AVE", > "8621 ANNAPOLIS RD", "1720 BRIGHTSEAT RD", "4855 ST. BARNABAS RD", > "2731 NICHOLSON", "8619 PINEY BRANCH RD", "", "1001 ROCKVILLE PIKE", > "7756 FINNS LANE", "1444 ROCK CREEK FORD RD", "2214 PHELPS ROAD", > "8051 GREENLEAF TERR", "", "4223 28TH AVE"), `PROPERTY CITY` = c("ARLINGTON", > "ARLINGTON", "SILVER SPRING", "ARLINGTON", "WASHINGTON", "SILVER SPRING", > "ARLINGTON", "ARLINGTON", "GREENBELT", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ALEXANDRIA", "ARLINGTON", "WASHINGTON", > "ARLINGTON", "WASHINGTON", "ARLINGTON", "SILVER SPRING", "ALEXANDRIA", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "WASHINGTON", > "WASHINGTON", "ARLINGTON", "BETHESDA", "WASHINGTON", "WASHINGTON", > "ARLINGTON", "ARLINGTON", "ARLINGTON", "ARLINGTON", "ALEXANDRIA", > "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "ALEXANDRIA", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "ROCKVILLE", "WASHINGTON", "ARLINGTON", > "WASHINGTON", "SEVEN CORNERS", "BETHESDA", "SUITLAND-SILVER HI", > "WASHINGTON", "BLADENSBURG", "FAIRFAX", "ALEXANDRIA", "", "WASHINGTON", > "ALEXANDRIA", "FAIRFAX", "ARLINGTON", "FAIRFAX", "WASHINGTON", > "WASHINGTON", "WASHINGTON", "DUMFRIES", "BAILEY'S CROSSROAD", > "BAILEY'S CROSSROAD", "RESTON", "RESTON", "SEAT PLEASANT", "WASHINGTON", > "WASHINGTON", "HYATTSVILLE", "RESTON", "ROCKVILLE", "WASHINGTON", > "ROCKVILLE", "ROCKVLLE", "LANHAM-SEABROOK", "HYATTSVILLE", "HYATTSVILLE", > "ALEXANDRIA", "HYATTSVILLE", "GAITHERSBURG", "SUITLAND-SILVER HI", > "WASHINGTON", "SILVER SPRING", "FORESTVILLE", "LANHAM-SEABROOK", > "LANDOVER", "PRINCE GEORGE'S CO", "HYATTSVILLE", "SILVER SPRING", > "SILVER SPRING", "PURCELLVILLE", "LANHAM-SEABROOK", "WASHINGTON", > "ADELPHI", "GLEN BURNIE", "", "SUITLAND-SILVER HI"), `PROPERTY STATE` = c("VA", > "VA", "MD", "VA", "DC", "MD", "VA", "VA", "MD", "VA", "DC", "VA", > "VA", "VA", "VA", "DC", "VA", "DC", "VA", "MD", "VA", "VA", "VA", > "VA", "VA", "DC", "DC", "VA", "MD", "DC", "DC", "VA", "VA", "VA", > "VA", "VA", "VA", "VA", "VA", "VA", "DC", "DC", "DC", "MD", "DC", > "VA", "DC", "VA", "MD", "MD", "DC", "MD", "VA", "VA", "", "DC", > "VA", "VA", "VA", "VA", "DC", "DC", "DC", "VA", "00", "VA", "VA", > "VA", "MD", "DC", "DC", "MD", "VA", "MD", "DC", "MD", "MD", "MD", > "MD", "MD", "VA", "MD", "MD", "MD", "DC", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD", "VA", "MD", "DC", "MD", "MD", "", "MD" > ), `PROPERTY ZIP` = c("22201", "22201", "20910", "22201", "20018", > "20910", "22203", "22203", "20770", "22203", "20020", "22203", > "22205", "00000", "22204", "20020", "22203", "20019", "22203", > "20901", "22305", "22203", "22203", "00000", "22204", "20020", > "00000", "00000", "20014", "20007", "00000", "22203", "22209", > "22209", "22209", "22302", "22302", "22302", "22302", "22302", > "20008", "20015", "20008", "00000", "20008", "22201", "20007", > "22044", "20014", "20023", "00000", "20710", "22030", "22037", > "00000", "20002", "22307", "22030", "22201", "22030", "20009", > "20009", "20009", "22026", "22041", "22041", "22090", "22037", > "20027", "20032", "20005", "20782", "22090", "20850", "20020", > "20850", "20850", "20801", "20781", "20706", "22304", "20785", > "20877", "20746", "20020", "20904", "20747", "20706", "20785", > "20748", "20782", "20901", "20910", "20850", "20801", "20011", > "20783", "00000", "00000", "20748"), UNITS = c(274L, 464L, 181L, > 237L, 440L, 303L, 98L, 524L, 10L, 200L, 223L, 192L, 153L, 57L, > 655L, 207L, 276L, 204L, 112L, 214L, 304L, 176L, 248L, 77L, 423L, > 214L, 251L, 181L, 161L, 80L, 41L, 98L, 366L, 415L, 434L, 40L, > 58L, 80L, 40L, 40L, 267L, 166L, 323L, 120L, 113L, 229L, 284L, > 304L, 170L, 336L, 30L, 154L, 205L, 168L, 0L, 95L, 175L, 76L, > 116L, 250L, 274L, 332L, 45L, 156L, 470L, 470L, 225L, 240L, 503L, > 79L, 46L, 306L, 224L, 100L, 398L, 160L, 170L, 443L, 62L, 451L, > 207L, 106L, 232L, 213L, 192L, 281L, 336L, 187L, 345L, 297L, 750L, > 156L, 308L, 414L, 57L, 66L, 445L, 1122L, 0L, 0L), `INITIAL ENDORSEMENT DATE` = c("4/20/35", > "12/9/35", "9/11/36", "2/8/37", "8/3/37", "8/19/37", "3/15/40", > "8/3/37", "5/13/38", "4/13/38", "3/7/39", "8/26/38", "8/24/39", > "8/18/39", "1/4/39", "2/24/40", "1/4/39", "4/11/41", "5/9/39", > "7/10/40", "8/19/40", "7/15/40", "4/14/41", "7/15/41", "10/23/41", > "9/30/41", "7/16/43", "4/23/42", "3/13/42", "6/8/42", "1/18/43", > "9/23/44", "1/29/54", "4/30/54", "1/14/54", "9/28/54", "12/1/54", > "2/8/55", "1/4/55", "11/4/54", "4/16/59", "5/1/58", "6/10/59", > "10/1/58", "9/20/60", "12/4/58", "2/17/60", "4/13/61", "1/18/61", > "6/2/61", "6/19/61", "1/25/62", "11/26/62", "3/14/62", "5/4/62", > "9/26/62", "8/10/62", "6/3/63", "11/6/63", "8/15/63", "10/11/63", > "12/11/63", "8/26/65", "10/27/71", "10/10/72", "1/10/73", "8/3/71", > "2/7/72", "7/1/70", "5/1/73", "2/24/78", "8/31/81", "9/17/80", > "4/16/82", "1/19/89", "5/21/08", "4/4/08", "5/26/83", "7/11/83", > "11/16/83", "6/30/83", "5/26/83", "5/26/83", "6/27/83", "5/13/83", > "6/29/83", "1/30/84", "10/25/84", "10/25/84", "10/25/84", "7/28/83", > "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", "8/1/83", > "7/28/83", "6/20/85", "6/20/85"), `FINAL ENDORSEMENT DATE` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "9/20/60", "", "", > "", "", "", "", "", "", "", "", "11/25/64", "", "", "", "", "8/24/65", > "", "2/14/67", "", "1/10/73", "1/10/73", "", "", "", "12/6/82", > "2/24/78", "8/31/81", "", "4/16/82", "5/24/91", "7/14/09", "4/4/08", > "5/26/83", "7/11/83", "11/16/83", "", "5/26/83", "5/26/83", "6/27/83", > "5/16/83", "6/29/83", "1/31/84", "10/25/84", "10/25/84", "10/25/84", > "7/28/83", "7/28/83", "10/31/85", "7/14/83", "1/31/84", "4/10/84", > "8/1/83", "7/28/83", "6/20/85", "6/20/85"), `ORIGINAL MORTGAGE AMOUNT` = c("875,000", > "1,480,000", "840,000", "725,000", "1,650,000", "1,225,000", > "319,000", "1,825,000", "35,000", "650,000", "760,000", "725,000", > "410,000", "165,000", "2,385,000", "701,000", "1,035,000", "692,000", > "490,000", "815,000", "942,000", "610,000", "935,000", "260,000", > "1,500,000", "830,000", "980,000", "660,000", "630,000", "265,000", > "139,000", "283,000", "4,301,100", "3,831,000", "4,482,200", > "313,700", "462,200", "641,800", "312,000", "312,100", "4,103,600", > "2,313,100", "5,626,500", "1,271,600", "1,447,200", "2,838,400", > "4,434,100", "3,640,900", "1,905,700", "2,893,200", "270,300", > "1,480,000", "3,048,165", "2,365,427", "1,138,600", "1,129,200", > "2,436,300", "752,500", "1,691,900", "450,000", "3,799,363", > "4,626,400", "484,500", "561,600", "10,795,600", "11,081,000", > "4,248,400", "3,714,938", "1,909,441", "436,825", "25,000", "348,700", > "173,400", "55,100", "4,311,301", "462,300", "1,170,000", "8,499,800", > "1,065,700", "13,387,500", "5,880,000", "1,500,000", "3,846,600", > "5,300,000", "1,750,000", "4,600,000", "5,653,000", "3,000,000", > "5,000,000", "5,000,000", "7,500,000", "1,600,000", "6,500,000", > "7,300,000", "1,350,000", "1,260,900", "8,081,100", "21,988,600", > "10,675,000", "4,600,000"), `FIRST PAYMENT DATE` = c("1/1/36", > "3/1/37", "4/1/38", "5/1/38", "10/1/38", "6/1/39", "12/1/39", > "2/1/39", "9/1/38", "11/1/39", "9/1/40", "3/1/40", "2/1/41", > "2/1/41", "7/1/40", "8/1/41", "8/1/40", "7/1/42", "12/1/40", > "2/1/42", "5/1/41", "2/1/42", "11/1/42", "1/1/43", "11/1/43", > "7/1/43", "5/1/44", "4/1/44", "3/1/44", "7/1/44", "3/1/44", "10/1/44", > "6/1/56", "6/1/56", "6/1/56", "10/1/54", "1/1/55", "3/1/55", > "2/1/55", "12/1/54", "6/1/59", "8/1/59", "12/1/60", "10/1/59", > "10/1/60", "6/1/60", "2/1/62", "1/1/63", "4/1/62", "6/1/63", > "3/1/62", "10/1/63", "4/1/65", "6/1/63", "1/1/64", "9/1/64", > "5/1/64", "9/1/64", "7/1/65", "6/1/64", "1/1/65", "9/1/65", "12/1/66", > "12/1/71", "4/1/73", "4/1/73", "2/1/73", "9/1/73", "7/1/70", > "5/1/73", "5/1/78", "10/1/81", "1/1/81", "7/1/82", "9/1/91", > "2/1/09", "6/1/08", "7/1/83", "9/1/83", "1/1/84", "8/1/83", "7/1/83", > "7/1/83", "8/1/83", "7/1/83", "8/1/83", "3/1/84", "12/1/84", > "12/1/84", "12/1/84", "9/1/83", "9/1/83", "12/1/85", "9/1/83", > "3/1/84", "6/1/84", "9/1/83", "9/1/83", "7/1/85", "7/1/85"), > `MATURITY DATE` = c("4/1/50", "12/1/55", "7/1/64", "2/1/57", > "7/1/52", "3/1/59", "1/1/65", "4/1/65", "12/1/63", "1/1/66", > "11/1/61", "5/1/66", "11/1/68", "12/1/67", "7/1/72", "8/1/67", > "10/1/66", "1/1/75", "2/1/67", "8/1/69", "7/1/68", "8/1/69", > "5/1/70", "7/1/70", "5/1/71", "10/1/70", "8/1/71", "11/1/71", > "10/1/71", "2/1/72", "10/1/71", "9/1/69", "12/1/94", "3/1/95", > "11/1/94", "12/1/93", "3/1/94", "5/1/94", "4/1/94", "2/1/94", > "10/1/91", "10/1/98", "2/1/00", "12/1/98", "9/1/99", "2/1/99", > "9/1/00", "12/1/01", "3/1/01", "8/1/01", "6/1/97", "9/1/02", > "2/1/03", "5/1/02", "12/1/02", "5/1/03", "4/1/03", "5/1/03", > "6/1/04", "5/1/79", "12/1/03", "8/1/04", "11/1/05", "11/1/11", > "3/1/13", "3/1/13", "1/1/13", "8/1/13", "4/1/00", "12/1/11", > "2/1/04", "4/1/12", "1/1/13", "12/1/89", "8/1/21", "1/1/42", > "5/1/36", "6/1/18", "8/1/18", "12/1/18", "7/1/18", "6/1/18", > "6/1/18", "7/1/18", "6/1/18", "7/1/18", "2/1/19", "11/1/19", > "11/1/19", "11/1/19", "8/1/18", "8/1/18", "11/1/20", "8/1/18", > "2/1/19", "5/1/19", "8/1/18", "8/1/18", "7/1/20", "7/1/20" > ), `TERM IN MONTHS` = c(172L, 226L, 316L, 226L, 166L, 238L, > 302L, 315L, 304L, 315L, 255L, 315L, 334L, 323L, 385L, 313L, > 315L, 391L, 315L, 331L, 327L, 331L, 331L, 331L, 331L, 328L, > 328L, 332L, 332L, 332L, 332L, 300L, 463L, 466L, 462L, 471L, > 471L, 471L, 471L, 471L, 389L, 471L, 471L, 471L, 468L, 465L, > 464L, 468L, 468L, 459L, 424L, 468L, 455L, 468L, 468L, 465L, > 468L, 465L, 468L, 180L, 468L, 468L, 468L, 480L, 480L, 480L, > 480L, 480L, 358L, 464L, 310L, 367L, 385L, 90L, 360L, 396L, > 336L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, 420L, > 420L, 420L, 421L, 421L), `INTEREST RATE` = c(4.5, 4.5, 4.5, > 4.5, 4.5, 4.5, 4, 3.5, 4.5, 3.5, 3.75, 3.5, 4, 4.25, 4.25, > 4, 3.5, 4, 3.5, 4, 4, 3.5, 3.5, 4, 4, 4, 4, 4, 4, 4, 4, 3.5, > 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.25, 4.5, 4.5, > 4.5, 4.5, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, 5.25, > 5.25, 8.5, 7.5, 7.5, 7.5, 7.5, 5.25, 6, 9, 14.5, 13, 16.5, > 10.75, 6.95, 5.95, 12.25, 12.5, 13, 12.5, 12.25, 12.25, 12.5, > 12, 12.5, 13, 13.5, 13.5, 13.5, 13, 13, 11.5, 12.5, 13, 13.5, > 13, 13, 12, 12), `HOLDER NAME` = c("NEW YORK LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "NEW YORK LIFE INSURANCE CO", "NEW YORK LIFE INSURANCE CO", > "UNION CENTRAL LIFE INS CO", "NAVY MUTUAL AID ASSN", "WELLS FARGO BANK NA-PRUDENTIAL", > "", "WELLS FARGO BANK NA-PRUDENTIAL", "LIFE INSURANCE CO OF VIRGINIA", > "WELLS FARGO BANK NA-PRUDENTIAL", "SECURITY MUTUAL LIFE INS CO", > "NAVY MUTUAL AID ASSN", "NEW YORK LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "NATIONAL LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "", "NEW YORK LIFE INSURANCE CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "WELLS FARGO BANK NA-PRUDENTIAL", > "KEY BANK CENTRAL NY", "NATIONAL LIFE INSURANCE CO", "NATIONAL LIFE INSURANCE CO", > "NEW YORK LIFE INSURANCE CO", "UNION CENTRAL LIFE INS CO", > "CONNECTICUT GEN LIFE INS CO", "SAN JUAN COUNTY BK", "SECURITY MUTUAL LIFE INS CO", > "WELLS FARGO BANK NA-PRUDENTIAL", "SEAMENS BANK SAVINGS FSB-FDIC", > "REPUBLIC NATIONAL BANK OF NEW", "LINCOLN SAVINGS BANK", > "LIBERTY LENDING INC", "EMIGRANT BANK", "PROVIDENT BANK", > "EMIGRANT BANK", "NEW YORK COMMUNITY BANK", "", "", "", "", > "PFC CORPORATION", "DOLLAR-DRY DOCK BANK", "PHILADELPHIA SAVINGS FUND SOC", > "PHILADELPHIA SAVINGS FUND SOC", "AMERICAN GEN LIFE AND ACCDT IN", > "", "", "", "", "PHILADELPHIA SAVINGS FUND SOC", "SOVRAN BANK MARYLAND", > "SWISS RE LIFE AND HEALTH AMERI", "", "", "AMERICAN SECURITY CORPORATION", > "PUEBLO MORTGAGE INC", "JOHN HANCOCK LIFE INSURANCE CO", > "CHASE MANHATTAN BANK", "RIGGS BANK NA", "FANNIE MAE", "STATE TEACHERS RT BOARD OHIO", > "STATE TEACHERS RT BOARD OHIO", "FANNIE MAE", "RIGGS BANK NA", > "PEOPLES LIFE INS CO WASHINGTON", "WHITE MOUNTAINS SERVICES CORP", > "RIGGS BANK NA", "DRG FUNDING CORPORATION", "FANNIE MAE", > "ALLFIRST BANK", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "DRG FUNDING CORPORATION", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", "YORK ASSOCIATES INC", > "YORK ASSOCIATES INC", "YORK ASSOCIATES INC"), `HOLDER CITY` = c("NEW YORK", > "NEW YORK", "CINCINNATI", "NEW YORK", "NEW YORK", "CINCINNATI", > "ARLINGTON", "FREDERICK", "", "FREDERICK", "RICHMOND", "FREDERICK", > "BINGHAMTON", "ARLINGTON", "NEW YORK", "MONTPELIER", "FREDERICK", > "MONTPELIER", "FREDERICK", "", "NEW YORK", "FREDERICK", "FREDERICK", > "BUFFALO", "MONTPELIER", "MONTPELIER", "NEW YORK", "CINCINNATI", > "HARTFORD", "FRIDAY HARBOR", "BINGHAMTON", "FREDERICK", "EAST HARTFORD", > "NEW YORK", "JERICHO", "BARTLETT", "NEW YORK", "ISELIN", > "NEW YORK", "CLEVELAND", "", "", "", "", "TUSTIN", "WHITE PLAINS", > "PHILADELPHIA", "PHILADELPHIA", "NASHVILLE", "", "", "", > "", "PHILADELPHIA", "BETHESDA", "NEW YORK", "", "", "BALTIMORE", > "TUCSON", "BOSTON", "NEW YORK", "RIVERDALE", "PHILADELPHIA", > "COLUMBUS", "COLUMBUS", "ATLANTA", "RIVERDALE", "LOUISVILLE", > "FARMINGTON HILLS", "RIVERDALE", "WASHINGTON", "ATLANTA", > "FREDERICK", "LA PLATA", "MC LEAN", "NEW ALBANY", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "WASHINGTON", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", "BETHESDA", > "BETHESDA", "BETHESDA"), `HOLDER STATE` = c("NY", "NY", "OH", > "NY", "NY", "OH", "VA", "MD", "", "MD", "VA", "MD", "NY", > "VA", "NY", "VT", "MD", "VT", "MD", "", "NY", "MD", "MD", > "NY", "VT", "VT", "NY", "OH", "CT", "WA", "NY", "MD", "CT", > "NY", "NY", "TN", "NY", "NJ", "NY", "OH", "", "", "", "", > "CA", "NY", "PA", "PA", "TN", "", "", "", "", "PA", "MD", > "NY", "", "", "MD", "AZ", "MA", "NY", "MD", "PA", "OH", "OH", > "GA", "MD", "KY", "MI", "MD", "DC", "GA", "MD", "MD", "VA", > "OH", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "DC", "MD", > "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", "MD", > "MD", "MD", "MD", "MD"), `SERVICER NAME` = c("No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "No Data Available", "No Data Available", > "No Data Available", "", "", "", "", "", "", "", "", "No Data Available", > "", "No Data Available", "No Data Available", "", "No Data Available", > "No Data Available", "", "", "No Data Available", "", "", > "", "", "", "No Data Available", "", "", "No Data Available", > "", "", "", "", "", "", "", "WHITE MOUNTAINS SERVICES CORP", > "", "", "", "", "USGI INC", "WELLS FARGO BANK NA", "ZIEGLER FINANCING CORP", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SERVICER CITY` = c("", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "FARMINGTON HILLS", "", "", > "", "", "LA PLATA", "MC LEAN", "NEW ALBANY", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", ""), `SERVICER STATE` = c("", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "MI", "", "", "", "", "MD", "VA", "OH", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", ""), `SECTION OF ACT CODE` = c("HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", > "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", "HRB", > "HRP", "HRB", "HRB", "HRB", "HRB", "HRP", "HRB", "HRP", "HRB", > "HRP", "HRP", "HRB", "HRB", "HRP", "HRP", "ZSB", "ZSB", "ZSB", > "ZSB", "ZSJ", "ZSQ", "ZSQ", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", > "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL", "HRL" > ), `SOA CATEGORY Sub Category` = c("207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Apartments", "207 Apartments", > "207 Rental Projects", "207 Apartments", "207 Rental Projects", > "207 Apartments", "207 Rental Projects", "207 Rental Projects", > "207 Apartments", "207 Apartments", "207 Rental Projects", > "207 Rental Projects", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 207 Improvements & Additions", > "241(a)/ 207 Improvements & Additions", "241(a)/ 221-MIR(d)(3)&(d)(4) Improvements & Additions", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "241(a)/ 232 /Improvements & Additions / Nursing Homes", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance", "207/ 223(f)/ 244 Co-Insurance", > "207/ 223(f)/ 244 Co-Insurance"), `TERM TYPE` = c("11", "11", > "11", "11", "11", "11", "12", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "18", "21", "21", "21", "11", "19", "11", "11", > "20", "21", "19", "11", "21", "11", "11", "11", "11", "15", > "11", "11", "11", "11", "11", "21", "19", "11", "11", "11", > "11", "11", "19", "11", "11", "11", "11", "11", "11", "11", > "11", "11", "11", "11", "11", "11", "11", "11", "11", "11", > "14", "11", "11", "11", "11", "11", "11", "11"), `TERMINATION TYPE DESCRIPTION` = c("Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "SUPERSESSION", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Maturity", > "VOLUNTARY", "VOLUNTARY", "VOLUNTARY", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Acquired", "VOLUNTARY", "Assignment", > "Prepayment", "VOLUNTARY", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Conveyance", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "VOLUNTARY", "Assignment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Assignment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "CANCELLED", "Prepayment", "Prepayment", > "Prepayment", "Prepayment", "Prepayment", "Prepayment", "Prepayment" > ), `TYPE Claim Non Claim ` = c("NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "CLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "CLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "CLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", "NONCLAIM", > "NONCLAIM"), `TERM DATE` = c("4/1/39", "4/1/39", "9/1/40", > "4/1/39", "2/1/49", "9/1/40", "9/1/44", "8/1/46", "1/1/50", > "11/1/44", "7/1/54", "8/1/46", "11/1/41", "7/1/54", "12/1/39", > "3/1/46", "8/1/46", "12/1/45", "11/1/44", "7/1/45", "11/1/45", > "8/1/46", "8/1/46", "8/1/46", "10/1/46", "7/1/46", "9/1/47", > "12/1/43", "7/1/46", "12/1/42", "5/1/44", "8/1/46", "8/1/65", > "8/1/65", "8/1/65", "1/31/83", "1/31/83", "2/3/83", "1/31/83", > "1/31/83", "12/7/72", "1/3/79", "12/4/79", "10/1/67", "10/1/99", > "5/1/71", "4/1/70", "10/16/79", "10/1/67", "8/1/66", "2/27/75", > "1/29/82", "12/1/66", "12/3/79", "4/4/75", "10/25/85", "1/30/80", > "6/25/74", "12/19/72", "5/31/73", "7/1/94", "4/1/67", "3/19/87", > "3/16/73", "2/13/86", "2/13/86", "5/24/82", "7/12/73", "12/8/76", > "3/10/89", "3/19/87", "10/31/85", "5/24/82", "1/21/85", "8/30/95", > "1/28/11", "11/30/10", "5/31/86", "5/31/86", "4/30/86", "11/20/84", > "6/30/86", "6/30/86", "3/31/86", "1/16/87", "10/31/86", "12/31/85", > "4/1/86", "4/1/86", "4/1/86", "3/31/86", "3/31/86", "8/3/90", > "10/31/86", "6/30/86", "1/30/87", "4/30/86", "4/30/86", "2/27/87", > "8/31/86"), TE = c("", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" > ), TC = c("", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", > "", "", "", "", "", "", "", "", "", "", "", "", ""), Status = c(TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, > TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)), .Names = c("HUD PROJECT NUMBER", > "PROPERTY NAME", "PROPERTY STREET", "PROPERTY CITY", "PROPERTY STATE", > "PROPERTY ZIP", "UNITS", "INITIAL ENDORSEMENT DATE", "FINAL ENDORSEMENT DATE", > "ORIGINAL MORTGAGE AMOUNT", "FIRST PAYMENT DATE", "MATURITY DATE", > "TERM IN MONTHS", "INTEREST RATE", "HOLDER NAME", "HOLDER CITY", > "HOLDER STATE", "SERVICER NAME", "SERVICER CITY", "SERVICER STATE", > "SECTION OF ACT CODE", "SOA CATEGORY Sub Category", "TERM TYPE", > "TERMINATION TYPE DESCRIPTION", "TYPE Claim Non Claim ", "TERM DATE", > "TE", "TC", "Status"), row.names = c(NA, 100L), class = "data.frame") > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.--------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k