Skip to content
Prev 54 / 117 Next

General Insurance Data

Dear Edward,

To my knowledge, there is no single package doing data manipulation in the insurance context.

There are package for manipulating from database manager and other proprietary softwares : see http://cran.r-project.org/doc/manuals/r-release/R-data.html

Maintaining the CASdatasets package, I face to some of your problem to read SAS or excel files. Typically the case, where there is a separator for thousand. I did write some R functions :
- readfunc(filelist, yearlist, sheetname, pattern, nrow, ncol, colname, col2conv, echo=FALSE, row2rm=NULL) : read a list of excel file to extract the same sheet and concatenate the whole
- str2num(x) : convert a character string to a numeric dealing with thousand separator
- concatmultcol(df, nbinfo, nbblock, col2foot, col2conv, col2rmpre, cm2rmpost, cname2trunc=NULL, echo=FALSE) : concatenate blockwise data into a rowwise dataframe
etc...
In such function, I read excel files with gdata package.

As you say, for manipulating triangles, there are functions in ChainLadder. By the way, I propose cum2incr and incr2cum to M. Gesmann. Another function shrinkTriangle was not kept in this package: this function computes an annual triangle from a monthly or quarterly basis.

For manipulating string, there is a good book by Gaston Sanchez, see http://gastonsanchez.com/work/

At the last R in insurance conf, there was a good presentation of data manipulation (see http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance-2014/r-in-insurance,-conference-programme and ask for presentation file).

Do you have a detailed list of what type of data you want to manipulate? for which purpose? (is it only for reserving purpose?)
If you are willing to create a package, I will be happy to contribute. 

Regards, Christophe
?
Christophe Dutang
LMM, UdM, Le Mans, France
web: http://dutangc.free.fr

Le 27 sept. 2014 ? 01:16, Edward Roche <ed.roche at yahoo.co.uk> a ?crit :