Re: [R] Zipf fitting using R

2009-01-10 Thread Stefan Evert
Hi there, I haven't seen any answers to your question on the list, so here's a rather late response. I'm not familiar with the VGAM package, but if you just want to fit Zipf's law (did you mean Zipf's law or an actual probability distribution?) to some data, why not do this directly with nl

[R] Zipf fitting using R

2008-12-27 Thread Epithemeus
Dear R-users, I am new to R and would like to use it for fitting the zipf distribution to some numeric data that I have. Here's the snippet that I use: library(VGAM) X <- read.table(file("~\\mydata.txt", encoding="latin1")) w <- as.vector(t((X[2]))) w <- w/sum(w) y <- (1:length(w)) fit