default.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. library(ggplot2)
  2. centre <- function(x, type, ...) {
  3. switch(type,
  4. mean = mean(x),
  5. median = median(x),
  6. trimmed = mean(x, trim = .1))
  7. }
  8. myVar1
  9. myVar.2
  10. data$x
  11. foo "bar" baz
  12. # test "test"
  13. "test # test"
  14. (123) (1) (10) (0.1) (.2) (1e-7)
  15. (1.2e+7) (2e) (3e+10) (0x0) (0xa)
  16. (0xabcdef1234567890) (123L) (1L)
  17. (0x10L) (10000000L) (1e6L) (1.1L)
  18. (1e-3L) (4123.381E-10i)
  19. (3.) (3.E10) # BUG: .E10 should be part of number
  20. # Numbers in some different contexts
  21. 1L
  22. 0x40
  23. .234
  24. 3.
  25. 1L + 30
  26. plot(cars, xlim=20)
  27. plot(cars, xlim=0x20)
  28. foo<-30
  29. my.data.3 <- read() # not a number
  30. c(1,2,3)
  31. 1%%2
  32. "this is a quote that spans
  33. multiple lines
  34. \"
  35. is this still a quote? it should be.
  36. # even still!
  37. " # now we're done.
  38. 'same for
  39. single quotes #'
  40. # keywords
  41. NULL, NA, TRUE, FALSE, Inf, NaN, NA_integer_,
  42. NA_real_, NA_character_, NA_complex_, function,
  43. while, repeat, for, if, in, else, next, break,
  44. ..., ..1, ..2
  45. # not keywords
  46. the quick brown fox jumped over the lazy dogs
  47. null na true false inf nan na_integer_ na_real_
  48. na_character_ na_complex_ Function While Repeat
  49. For If In Else Next Break .. .... "NULL" `NULL` 'NULL'
  50. # operators
  51. +, -, *, /, %%, ^, >, >=, <, <=, ==, !=, !, &, |, ~,
  52. ->, <-, <<-, $, :, ::
  53. # infix operator
  54. foo %union% bar
  55. %"test"%
  56. `"test"`