jmaccherone

Results 28 issues of jmaccherone

Calculates arithmetic mean. Sum of observations/count of observations.

Creates a XY graph. Sometimes initialized with code similar to this: > plot(1,20,xlim=c(0,20),ylim=c(0,1)) > Then filled in with points using the point() function.

Adds points to a graph started with plot().

Creates a stream of random numbers that fit a poisson distribution. Takes 2 arguments, the first is the count of numbers to create and the second is the mean you...

Takes a list, calculates the difference in seconds between neighboring values and returns a list of those differences.The list will be one smaller than the original list.

Takes variable to sort on and returns a sorted list. tweetDF[order(as.integer(created)), ] sorts the list of tweets according to when they were created.

Saves typing. Typically, to access variables in a data frame, you would use $ notation: > head(DataFrame$field,4) But if you run > attach(DataFrame) > then you can just type the...

Takes two parameters, a list and a number, returns the number of items given from the list starting at the beginning. > List head(list, 2) > "a" "b"

There is an add-on package for R which is an interface for downloading a list of tweets directly from Twitter into R.

Takes a vector and returns the most frequent value (mode). > myData myMode myMode > [1] 9 > Will return multiple modes. > myData myMode myMode > [1] 7 9