Guest User

Untitled

a guest
Jun 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. numbers <- c(9, 23, 33, 91, 13)
  2. players <- c("Ron Harper", "Michael Jordan", "Scottie Pippen", "Dennis Rodman", "Luc Longley")
  3. birth_dates <- c("January 20, 1964", "February 17, 1963", "September 25, 1965", "May 13, 1961", "January 19, 1969")
  4. df <- data.frame(number = numbers,
  5. player = players,
  6. birth_date = birth_dates,
  7. stringsAsFactors = FALSE) # 避免處理 factor 型別
  8. df$birth_date <- as.Date(df$birth_date, format = "%B %d, %Y")
  9. class(df$birth_date)
  10. View(df)
Add Comment
Please, Sign In to add comment