[R] Creating matrix from long table in database (pivoting)

2010-03-02 Thread Jan Hornych
Hi all, I have a table in database that is very long and when simplified it has only two columns in it (id, text). id is the row, and text is the column. Technically the text is a term and and id is the document. If simplifying this and assuming there is only one occurrence of the term per the doc

[R] SpatialPolygon with the max value gets no color assigned in spplot function when using "at" parameter

2013-01-04 Thread Jan Hornych
Hi, I would like to do coloring of map regions based on the region values "weight". The approach I am taking is first to break regions into equal intervals, classIntervals(spdf$weight,4)$brks #4 intervals in this case and coloring all regions within the interval with the same color col = brewer

[R] Sorting groups in bwplot chart

2010-08-27 Thread Jan Hornych
Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example: d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10)); colnames(d) <- c("Month", "Value"); bwplot(d$Month ~ d$Value); as you can see Months are not sorted alphabetically. Does a

[R] How to reference a package in academical paper

2011-03-07 Thread Jan Hornych
Dear, I am now writing more formal "academical" paper, and would like to reference an R package. Do you have any recommendation how to do it? Taking for instance the RODBC package as an example, how would the reference look like? http://cran.r-project.org/web/packages/RODBC/index.html Thank you

[R] Web analytics / Customer Analytics book recommendation

2012-01-03 Thread Jan Hornych
Hi, I am curious if you know about any book that is dealing with the web analytics / customer analytics subject and is referencing R as the main statistical tool. I am particularly interested into using R in the real production environment and not only as the analytical tool. Thank you Jan