Dear R-users,
I've written a script that produces a frequency table for a group of
texts. The table has a total frequency for each word type and
individual frequency counts for each of the files. (I have not
included the code for creating the column headers.) Below is a sample:
Word Total 01
In regard to my question
Prof. Warren (Victoria University of Wellington, NZ) suggested the line:
assign(paste("freq.list",i,sep="."),freq.list)
instead of the lines:
filename<-paste("freq.list", i, "txt", sep=".")
write(freq.list, file=filename[[1]], sep="", append=FALSE)
ot;.") #creates a unique
file name for each iteration of this loop
write(freq.list, file=filename[[1]], sep="", append=FALSE) #writes
the current frequency list to file
}
Many thanks!
Joseph Sorell
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Using R, I plotted a log-log plot of the frequencies in the Brown Corpus
using
plot(sort(file.tfl$f, decreasing=TRUE), xlab="rank", ylab="frequency",
log="x,y")
However, I would also like to add lines showing the curves for a Zipfian
distribution and for Zipf-Mandelbrot.
I have seen these in many a
4 matches
Mail list logo