igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Mapping Strings to Integers


From: Gábor Csárdi
Subject: Re: [igraph] Mapping Strings to Integers
Date: Sun, 28 Aug 2011 12:27:25 +0200

Ali,

read about factors, I think they are exactly what you want. See
http://cran.r-project.org/doc/manuals/R-intro.html#Factors

Best,
Gabor

On Tue, Aug 23, 2011 at 4:33 PM, S.M. Ali Abbas <address@hidden> wrote:
> Dear All,
> I am quite a newbie to R. Trying to learn it these days. Sorry for asking
> such a basic question, but could you kindly tell me how to map unique string
> values to integers in a data frame? I have a graph which has, most of its,
> vertices' attributes in a string format. I would like to replace them with
> ascending integers. For example, first unique value in column 1 changes to
> "0". I'd like to have it so that I could use my computer's resources
> efficiently and also could easily perform statistical measures on it. I am
> looking for a two way mapping, so that, after analysis, I could see
> meaningful results in terms of the same but in reverse order mappings. Hope
> I was clear in my question.
>
> Thanks!
>
> Cheers,
> Ali
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

[Prev in Thread] Current Thread [Next in Thread]