Re: [R] how to download Journal Citation Reports with R

2013-07-23 Thread Wet Bell Diver
thank you for bringing it to my attention. --Peter Op 21-7-2013 0:58, Ben Bolker schreef: Wet Bell Diver gmail.com> writes: R-3.0.1, Rstudio, Win7 x64 Dear list, I would like to download all the webpages of the Journal Citations Report (science edition), for a given year. I can do so

[R] how to download Journal Citation Reports with R

2013-07-20 Thread Wet Bell Diver
R-3.0.1, Rstudio, Win7 x64 Dear list, I would like to download all the webpages of the Journal Citations Report (science edition), for a given year. I can do so manually, but that it very time intensive, so I would like to use R for that. I have tried many things, including: download.file(url

Re: [R] cut into groups of equal nr of elements...

2013-07-20 Thread Wet Bell Diver
Witold, Here's one way: Vec <- rnorm(30) Vec.cut <- cut(Vec, breaks=c(quantile(Vec, probs = seq(0, 1, by = 0.20))), labels=c("0-20","20-40","40-60","60-80","80-100"), include.lowest=TRUE) table(Vec.cut) or determine the breaks automatically: cut.size <- function(x, size) { cut.prob <

Re: [R] cut into groups of equal nr of elements...

2013-07-18 Thread Wet Bell Diver
Here's one way: Vec <- rnorm(30) Vec.cut <- cut(Vec, breaks=c(quantile(Vec, probs = seq(0, 1, by = 0.20))), labels=c("0-20","20-40","40-60","60-80","80-100"), include.lowest=TRUE) table(Vec.cut) or determine the breaks automatically: cut.size <- function(x, size) { cut.prob <- size/leng

Re: [R] understanding the FUNCTION function

2012-04-26 Thread Wet Bell Diver
In addition: the object MyNumberIs *is* created, but inside the environment "attached" to the function as you evaluate it. And this environment is gone when the function is done. (there is more to it, but this is basically how it works). This is what Michael refers to in his answer. So, when

[R] rm(list=ls())

2012-03-05 Thread Wet Bell Diver
R-2.14.2, Win7 x64 Dear list, I have the habit of including rm(list=ls()) at the top of most of my scripts. However, I wonder whether rm(list=ls()) gives the exact same result as closing R and starting again fresh. In other words, is it possible that there will be differences on how a script

Re: [R] updating one's own package

2012-02-12 Thread Wet Bell Diver
Thanks Uwe, that is really helpful. -Peter Op 11-2-2012 19:20, Uwe Ligges schreef: On 11.02.2012 13:49, Wet Bell Diver wrote: Win7 x64, R2.14.1 Dear list, I would like to get into the habbit of creating a package for each project. That way I can package my project-specific functions and

[R] updating one's own package

2012-02-11 Thread Wet Bell Diver
Win7 x64, R2.14.1 Dear list, I would like to get into the habbit of creating a package for each project. That way I can package my project-specific functions and data together and load or unload that at will. Also, it will allow easy navigation through all the functions I will have available

Re: [R] Executable expressions

2012-01-18 Thread Wet Bell Diver
for my info, why is this rarely a good idea? Is that the case for this particular example , or is eval(paste()) generally rarely a good idea? --Peter Op 18-1-2012 22:22, R. Michael Weylandt schreef: eval(parse(text = a)) But this is rarely a good ideaperhaps you could say a little more

Re: [R] Hinton Diagram for a matrix of weights

2011-12-09 Thread Wet Bell Diver
Xavier, Perhaps this would be of help, you could use it as a starting point: http://www.cs.princeton.edu/~mimno/factor-analysis.R This page provides a function for Hinton diagrams. -Peter Op 7-12-2011 17:45, Xavier Fernández i Marín schreef: Hello, Although I have used a general search eng

[R] finding row duplicates, regardless of element order

2011-10-30 Thread Wet Bell Diver
Dear list, Suppose I have the following matrix: > M <- matrix(c("1","2","3","2","4","5","5","3","2","1","3","2","4","4"), ncol=2) > M [,1] [,2] [1,] "1" "3" [2,] "2" "2" [3,] "3" "1" [4,] "2" "3" [5,] "4" "2" [6,] "5" "4" [7,] "5" "4" In this matrix, row 1 contains elements "1" an

Re: [R] cycling through a long list of files and names

2011-10-24 Thread Wet Bell Diver
lines: city1997<- dataCleaning(read.csv2("C:\\city\\year1997.txt")) city1997<- wasteCalculations(city1997, year = 1997) if (city1997[1,1] == "Time") {city1997<- timeCalculations(city1997)} and then pass in the appropriate parameters. On Mon, Oct 24, 2011 at 12:09 PM, W

Re: [R] cycling through a long list of files and names

2011-10-24 Thread Wet Bell Diver
to put all your dataframes into a list and then run lappy(cityList, dataCleaning) # for example To get them into a list in the first place try this n = 1997:2011 cityList<- vector(length(n), 'list') for (i in n){ cityList[[i]]<- get(paste("city", i, sep=""

[R] cycling through a long list of files and names

2011-10-22 Thread Wet Bell Diver
R2.13.2, W7x64 Dear list, Excuse my ignorance, but I have gone through the R help (?parse, ?eval, etc.) and still really don't know how to do the following. I have the general following structure that I would like to automate [edited to make it shorter]: >>> city1997 <- dataCleaning(read.cs