This is a problem of using R. I have traded-off speed with memory usage (large objects vs loops). If you are using the clustering_tm-function, then there is a c++ version that is much faster and memory efficient. Email me if you need these files.

Best,

Tore

I am using your tnet package in R. I’d like to calculate two mode data which has about 1,700 vertices in the primary data and about 1,800 vertices in the secondary data. But when i tried using your tnet package in R, i got an error message, often. Such as below.

Do you have any solutions on these problems? pleas teach me your methods.

from jung sung hoon in S. KOREA

Error: cannot allocate vector of size 1.8 Gb

In addition: Warning messages:

1: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 8053Mb: see help(memory.size)

2: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 8053Mb: see help(memory.size)

3: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 8053Mb: see help(memory.size)

4: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 8053Mb: see help(memory.size)

The local clustering coefficient is undefined (or NaN in R) for isolates and nodes with only one connection. This is similar to the one-mode version as the denominator (in the one-mode coefficient) is n(n-1) where n is the number of connections. If n=1, the denominator is equal to 0, and it is not possible to divide a numerator with 0.

Hope this helps,

Tore

I was using the clustering_local_tm(net) for my two-mode-network with 700 vertices in the primery node set and 24 in the secondary node set. The resulting table contains a lot of values that are “Not a number” i.e.

Node lc

696 696 NaN

697 697 NaN

698 698 NaN

699 699 NaN

700 700 0.008620690

701 701 NaN

Is there any explanation for this?

Thanks!

]]>You are running out of memory.. The R-functions were written to be faster than memory efficient due to loops being really really slow in R. For larger networks, I have c++ functions that are very fast and very memory efficient; however, they require some knowledge to work. Email me and I will send them to you.

Best,

Tore

I am using the clustering_local_tm function for my two mode data which has 6029 vertices in the primary node set and 9313 vertices in the secondary node set with 57912 edges connecting them.When i tried using the function, i got an error message stating:

Error: cannot allocate vector of size 1.4 Gb

In addition: Warning messages:

1: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 4043Mb: see help(memory.size)

2: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 4043Mb: see help(memory.size)

3: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 4043Mb: see help(memory.size)

4: In `[.data.frame`(x, c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)[-by.x]), :

Reached total allocation of 4043Mb: see help(memory.size)

can u please help me out with the problem.

Thanks

Yaseswini

Yaseswini

]]>You can swap the columns to get local clustering scores for the secondary nodes. For example, if you network is in an object called net which has two columns, you can simply type `net <- net[,2:1]`

to reverse the columns.

Best,

Tore

I am using the tnet package for bipartite graph analysis. Iam particularly interested in calculating the clustering coefficient of all the vertices of the network. But the documentation says that the clustering coefficient function “clustering_local_tm(net)” returns the values for the primary node set.How do i calculate the clustering coefficient of the second set? could you please explain

Thanks

Yaseswini

Thanks for spotting a missing piece of the documentation. The second column called lc is simply the binary local clustering coefficient for two-mode networks.

Let me know if there is anything else – I will incorporate this in the upcoming version of tnet!

Best,

Tore

node lc lc.am lc.gm lc.ma lc.mi

1 1 0.5789474 0.5756300 0.5568930 0.5759220 0.4851772

2 2 0.3787879 0.4117520 0.4336639 0.3799618 0.5025974

3 3 0.2736781 0.2912917 0.2849269 0.2914947 0.2684981

4 4 0.3240741 0.3355950 0.3482124 0.3313095 0.3813559

5 5 NaN NaN NaN NaN NaN

6 6 NaN NaN NaN NaN NaN

I assume that the columns with suffixes am, gm, ma, and mi are calculated with the arithmetic and geometric mean and the maximum and minimum value for the 4-paths, but how is the first lc column calculated? I could not find an explanation in the manual or online.

Thanks, John

]]>