Hi,

> I need a column 'b', which is just the addition of column 'a' with 5.
> How do I do it? And, entries in column 'a' are with commas, always.
> Also, class(v$a)=factor.

You must convert your factor with commas into a numeric variable,
first replacing commas with dots.

A very dirty way to do it could be the following, but there may be a
better one :

v$a <- as.numeric(gsub(",",".",as.character(v$a)))

HTH,

Julien

-- 
Julien Barnier
Groupe de recherche sur la socialisation
ENS-LSH - Lyon, France

______________________________________________
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.

Reply via email to