My problem is not in PERL, I am seeking for wisdom of PERL Monks to solve a problem in igraph package of R software. Any PERL MONK with knowledge of other languages such as R, can help me out. You can even suggest me links, where I could find a solution
My problem is..
I want to plot a power law fit for my data (in .net format --- pajek format)
syntax for that in R is
g <- read.graph("filename.net", "pajek")
d <- degree (g, mode="in")
power.law.fit (d+1, 2)
it gives me desired out put if my if input a single file
but I want to use a variable file name ( such as $name1,
$name2 in PERL) so that I can read all my 100 files at a
single stretch if I put this entire code in a loop like..
names = "name1" "name2" "name3".....
while (i <= 100)
g <- read.graph("namesi", "pajek")
d <- degree (g, mode="in")
power.law.fit (d+1, 2)
i <- i + 1
}
but namesi doesn't seem to work in R. Is there any alternative ?
I want to know how to use a variable file name in this syntax
Any help is greatly appreciated
barabasi

In reply to Need Wisdom of Perlmonks to solve my problem in R software by barabasi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.