similar to: Please help -- Converting a 2D matrix to 3 columns for graphical representation

Displaying 20 results from an estimated 300 matches similar to: "Please help -- Converting a 2D matrix to 3 columns for graphical representation"

2011 Feb 01
1
using SNOW and clusterApplyLB to run jobs parallel
I have this function and want to run it parallel with different sets of data. Using SNOW and clusterApplyLB. system.time(out <- mclapply(cData, plotGraph)) #each cData contains 100X6000 doubles system.time(out <- mclapply(cData2, plotGraph)) system.time(out <- mclapply(cData3, plotGraph)) system.time(out <- mclapply(cData4, plotGraph)) system.time(out <- mclapply(cData5,
2012 May 31
0
ignore NA column in a DF (for calculation) without removing them
Dear users, I have for the moment a function which looks for the best correlation for each file I have in my correlation matrix. I'm working on a list.files. Here's the function: get.max.cor <- function(station, mat){ mat[row(mat) == col(mat)] <- -Inf which( mat[station, ] == max(mat[station, ],na.rm=TRUE) ) } If I have a correlation matrix like this
2010 Aug 25
1
SEM : Warning : Could not compute QR decomposition of Hessian
Hi useRs, I'm trying for the first time to use a sem. The model finally runs, but gives a warning saying : "In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. " I found in R-help some posts on this warning, but my attemps to modify the code didn't change
2023 Nov 15
1
Cannot calculate confidence intervals NULL
I believe the problem is here: cor1 <- cor(x1, y1, method="spearman") cor2 <- cor(x2, y2, method="spearman") The x's and y's are not looked for in data (i.e. NSE) but in the environment where the function was defined, which is standard evaluation. Change the above to: cor1 <- with(d, cor(x1, y1, method="spearman")) cor2 <- with(d, cor(x2, y2,
2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order correlations---however I'd like to modify it so that it can generate a fifth vector with specific partial
2011 Mar 22
1
Characteristic Path length calculation
Hi, I wish to calculate the characteristic path length of a graph. Is average.path.length(g) in 'igraph' the same as calculating the characteristic path length of the graph? Thanks, Kumar -- View this message in context: http://r.789695.n4.nabble.com/Characteristic-Path-length-calculation-tp3398048p3398048.html Sent from the R help mailing list archive at Nabble.com.
2011 Feb 14
1
Selecting particular rows in a table
Hi, I have a huge table with 134,000 entries. I want to choose only rows 60,000 to 90,000. Please help me on how to do this. V1 V2 V3 V4 1 31.10267 168.3204 41 0.4 2 31.19941 168.1488 41 0.4 3 31.29580 167.9764 41 0.4 4 31.39183 167.8034 41 0.4 5 31.48750 167.6297 41 0.4 6 31.58280 167.4553 41 0.4 7 31.67774 167.2803 41 0.4 8 31.77229 167.1045 41 0.4 9 31.86648 166.9281
2011 Apr 11
1
plot - kamada.kawai layout without arrows
Hi, I am plotting a graph with kamada.kawai layout. But I am getting direction arrows in the graphs. Please let me know how to avoid this. g <- watts.strogatz.game(1, 2000, 5, 0.4) comps <- clusters(g)$membership colbar <- rainbow(max(comps)+1) V(g)$color <- colbar[comps+1] png(filename) plot(g, layout=layout.kamada.kawai, vertex.size=2, vertex.label=NA) dev.off() Please find
2011 Apr 26
1
Barplot for degree distribution
In barplot for degree distribution x-axis is not seen. See the example below > g = barabasi.game(500, 0.4) > dd1 = degree.distribution(g) > plot(dd1, xlab="degree", ylab = "frequency") whereas barplot doesnot have any x-axis > barplot(dd1, xlab = "degree", ylab = "frequency") Please see the figures attached.
2009 Apr 21
4
search through a matrix
Hi. I have a 925 by 925 correlation matrix corM. I want to identify all variables that have correlation greater than 0.9. Can anyone suggest an "R way" of doing this? Thank you. -- View this message in context: http://www.nabble.com/search-through-a-matrix-tp23153538p23153538.html Sent from the R help mailing list archive at Nabble.com.
2011 Mar 03
2
Plotting Mean in plotting degree distribution
Hi, I am plotting degree distribution of a graph using the function, library(igraph) dd1 = degree.distribution(G) plot(dd1, xlab = "degree", ylab="frequency") I would like to plot the mean of the distribution as a vertical line in the attached plot. Please let me know how to do this. Thanks, Kumar http://r.789695.n4.nabble.com/file/n3334375/cdata3_dd.png cdata3_dd.png --
2009 Nov 16
1
extracting values from correlation matrix
Hi! All, I have 2 correlation matrices of 4000x4000 both with same row names and column names say cor1 and cor2. I have extracted some information from 1st matrix cor1 which is something like this: rowname colname cor1_value a b 0.8 b a 0.8 c f 0.62 d k 0.59 - - -- -
2010 May 03
1
Comparing the correlations coefficient of two (very) dependent samples
Hello all, I believe this can be done using bootstrap, but I am wondering if there is some other way that might be used to tackle this. #Let's say I have two pairs of samples: set.seed(100) s1 <- rnorm(100) s2 <- s1 + rnorm(100) x1 <- s1[1:99] y1 <- s2[1:99] x2 <- x1 y2 <- s2[2:100] #And both yield the following two correlations: cor(x1,y1) # 0.7568969 (cor1) cor(x2,y2)
2023 Nov 15
2
Cannot calculate confidence intervals NULL
R-Experts, Here below my R code working without error message but I don't get the results I am expecting. Here is the result I get: [1] "All values of t are equal to 0.28611928397257 \n Cannot calculate confidence intervals" NULL If someone knows how to solve my problem, really appreciate. Best, S ######################################################### # Difference in Spearman
2003 Nov 09
2
How to create unique factor from two factors? + Boostrap Q
This might be easy but I'm very new to R and this question doesn't seem to have any nice keywords that bring up relevant search results when I search the CRAN search engine. Therefore, I'll plead (as I have in the recent past) Newbie status. I have a data frame with two factors (Factor 1 and 2) which together specify another unique level. I want to create a third factor in the
2003 Feb 19
1
getting/storing the name of an object passed to a function
Hi I have a couple of functions that work on the object created by another R command and then print out or summarise the results of this work. The main function is defined as: hotelling.t <- function(obj) { #internal commands } I then have print.hotelling.t() that takes the list returned by hotelling.t and prints it with some extra significance calculations, formatting, etc. I want to
2005 Nov 25
1
read.table without sep
Hello all, I have a data file table.txt which i have attached. I am trying to pass the columns as arguments to a function "totnorm" where i am displaying a total normalization plot. The function is given below: totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6, col.lab=4);}
2005 Nov 25
1
read.table without sep
Hello all, I have a data file table.txt which i have attached. I am trying to pass the columns as arguments to a function "totnorm" where i am displaying a total normalization plot. The function is given below: totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6, col.lab=4);}
2006 Apr 27
7
RJS & Ajax question...
Hi, I''m trying to convert an older Rails application to use Ajax. I''ve already moved my edit and show actions so that, instead of displaying as separate pages, they appear in a <div> on my list view. However, I have two problems: 1) When the user saves the changes, I want to put all the ajax changes in an RJS template. However, form_remote_tag :url =>{:action =>
2006 Apr 08
0
[LLVMdev] line number information
I get it now, I can't believe I didn't understand that before. Thank you all for your help! - John On 4/8/06, Chris Lattner <sabre at nondot.org> wrote: > > On Sat, 8 Apr 2006, Jim Laskey wrote: > > If you look at the stoppoint calls you'll see that you can find the line > > number and if you follow the compile unit argument on the call you will > find >