Hi,
 
my problem is the following:
 
I have a large database of insurance-damage data and want to model the
frequency of these events. So to fit a distribution on my frequency-data I
want to count the number of events in each month via the date of occurrence.
Therefor I use this command which works very well:
 
count_table <- table(months(date_occ),years(date_occ)) 
 
But there is another column in my database called "weight". So I don't want
to count EACH event by "1", some are e.g. only counted by "half an event".
How could I modify my table function, that the output is not a simple
counting but a counting of the weights?
 
And - another question how can I directly access the columns of my table? I
tried e.g. count_table$2004 (because one column is named 2004), or
count_table[2004] ... nothing worked. The access via column - number
(count_table[,9]) woks, but will be to unflexible for the future.
 
Thanks a lot for your help!

	[[alternative HTML version deleted]]


