Displaying 20 results from an estimated 100 matches similar to: "How to save heatmap as image or pdf"
2010 Jun 08
3
Matrix to "database" -- best practices/efficiency?
I have a matrix of, say, M and N dimensions:
my_matrix=matrix(c(1:60),nrow=6,ncol=10)
I have two "id" vectors corresponding to the rows and columns, e.g.:
id_m=seq(10,60,by=10)
id_n=seq(100,1000,by=100)
I would like to create a "proper" database (let's say a data.frame for
this example -- i'm going to be loading these into an SQLite database,
but we'll leave
2010 Sep 27
3
name ONLY one column
Hi R-users
I can not change the name of one column only of my matrix.
my_matrix <- matrix (1:12,ncol=3)
colnames(my_matrix)[1] <- 'myname'
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
thank you for your help
Lorenzo
[[alternative HTML version deleted]]
2009 May 15
2
Printing to screen a matrix or data.frame in one chunk (not splitting columns)
Hello,
I saw this nice trick I want to replicate but I lost the source and I hope
one of you can point me to the solution. My problem is that I don't know
the correct words to query this.
When I print to screen a matrix or data.frame the columns are split and
printed below the previous ones; even though I have plenty of screen left.
E.g.,
> my_matrix = matrix(runif(30),nrow=3,ncol=10)
2012 Sep 11
1
lapply with different size lists?
Hello,
I have 2 functions (a and b)
a = function(n) { matrix (runif(n*2,0.0,1), n) }
>
>
> b = function (m, matrix) {
> n=nrow (matrix)
> p=ceiling (n/m)
> lapply (1:p, function (l,n,m) {
> inf = ((l-1)*m)+1
> if (l<p) sup=((l-1)*m)+m
> else sup=n
>
2011 Nov 28
2
Principal componet plot from lower triangular matrix file
Hi,
I have a comma separated file with element names in first column like shown
below :
Name_1,0
Name_2,0.8878,0
Name_3,0.6777,0.7643,0
Name_4,0.9844,0.1234,0.1414,0
Original data is a 10000x10000 symmetric matrix (600 MB). To reduce file
size, I have minimized matrix to only lower triangle. Is there a (memory)
efficient way to 1) read file 2) compute first and second principal
components and
2010 Jul 14
2
send out put to file in R
Hi
I am using igraph package in R.
My goal is to read a network (in "pajek" format) and decompose the network
into components.
In addition, I am also interested in sending this output to to a file.
I am having problem in while writing to a file!
my code looks like this
g <- read.graph ("F://test.net", "pajek")
compo <- decompose.graph(g,
2005 Oct 15
1
solve() versus ginv()
Dear All,
While inverting a matrix the following error appears on my console:
Error in solve.default(my_matrix) : Lapack routine dgesv: system is exactly singular
With this respect, I have been replacing the solve() function with ginv(): the Moore-Penrose generalized inverse of a matrix.
These are the questions I would like to ask you:
1. Would you also replace solve() with ginv() in
2012 Sep 28
1
Heatmap Colors
Hello R-Users!
I'm using a heatmap to visualize a matrix of values between -1 and 3.
How can I set the colors so that white is zero, below zero is blue of
increasing intensity towards -1 and above zero is red of increasing
intensity towards red?
I tried like this (using the marray and gplots packages from bioconductor):
mcol <- maPalette(low="blue", mid="white",
2008 Jan 31
1
decrease amount of ticks on y axis in lattice levelplot
Hi all,
How can I decrease the number of ticks on the y-axis in a lattice
levelplot()? I have as many ticks displayed on the y-axis as I have
columns of data (1000 columns), how can I decrease this amount of ticks,
while still properly displaying all the data?
Note that I get my data from a matrix object, in which the z-values of
the levelplot are the actual values in the matrix, whereas the
2005 Apr 18
1
Storing vectors as vectors and iterating through them
Hi all,
I have a bunch of int vectors. Each vector holds a bunch of ints that
correspond to row numbers of an existing matrix. I use the int vectors to
pull out rows of data from a matrix, i.e.
data <- my_matrix[int_vector,]
I would like to store these int vectors in some sort of data structure that
will preserve them as-is and allow iteration. I guess what I'm looking for
would be
2011 May 21
1
'apply' with additional class variable
Dear R gurus,
I'm trying to solve what I assume is a fairly simple problem, but I'm having trouble finding the proper approach. I have a matrix where each column is some object (e.g. a car) and each row is a numeric measurement of a feature of said object (e.g. horse power, top speed, etc.). Let's also suppose that I know what make the car is (e.g. toyota, ford, etc.), stored in a
2019 Jan 24
3
[Bug 1319] New: Exporting a map with many elements to JSON will fail
https://bugzilla.netfilter.org/show_bug.cgi?id=1319
Bug ID: 1319
Summary: Exporting a map with many elements to JSON will fail
Product: nftables
Version: unspecified
Hardware: x86_64
OS: RedHat Linux
Status: NEW
Severity: normal
Priority: P5
Component: nft
Assignee: pablo at
2011 Nov 13
0
[LLVMdev] setSection not working?
I created a GlobalVariable from a ConstantArray. I then used to the
setSection() method on my GlobalVariable. Looking at the ELF file it
does not look like it is where I specified. I gave "new
StringRef("my_map")" to the method.
Is there more that needs to be done? In case it matters this is ToT on Linux.
Thank you
2008 Sep 21
1
Calculating interval for conditional/unconditional correlation matrix
Hi there,
Could anyone please help me to understand what should be done in order not to get this error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Here is my code:
determinant<-
function(x){det(matrix(c(1.0,0.2,0.5,0.8,0.2,1.0,0.5,0.6,0.5,0.5,0.5,1.0,x,0.8,0.6,x,1.0),ncol=4,byrow=T))}
matrix<-
2011 Nov 28
2
problem in reading file
Hi,
I have a file that looks like this :
one,0
two,0.591,0
three,0.356,0.350,0
four,-0.098,0.072,0.380,0
five,0.573,0.408,0.382,0.062,0
six,0.156,0.232,0.517,0.424,0.303,0
seven,0.400,0.414,0.611,0.320,0.401,0.479,0
eight,0.282,0.375,0.512,0.346,0.308,0.463,0.605,0
nine,0.519,0.484,0.467,0.167,0.455,0.311,0.574,0.557,0
I want to create a data matrix out of it, so I tried this :
2008 Sep 23
3
Outgoing service always on a certain external address
Hi,
Shorewall version -4.0.12-2 (EL5 rpm version)
OS : Centos 5.2
I have shorewall successfully running on Linux with multi ISP.
Trying to make services such as "rsync, ftp" go through my secondary
ISP. For which I did the following
eth0 : Internal LAN
eth4 : DSL (Second ISP) => x.x
eth5 : T1 (First ISP) => y.y
Created the following entries in
2009 Jan 29
1
failover for shorewall
I am using shorewall-4.2.5-1 on RHEL-5.2 for a MultiISP connection.
Everything works great. I run vpn, proxy, mail relay on the firewall.
Hence I do the application level management.
So far I was using third party script "gwping" for my failover
mechanism. Just wondering if shorewall has any native programs to handle
fail over ?
Thank you
Chakri
2010 Jul 05
0
Execute commands in 'R' within PERL Program
Hi,
I wrote a program in PERL which creates a file with .net extension (..
xyz.net). I want to call R from within my PERL program, execute 3-line
command in 'R', store the output and get back to PERL program.
RSPerl is of omegahat is a good software which creates interface between R
and PERL, but unfortunately it doesn't work on my Windows XP.
I used the following command in PERL to
2010 Jul 17
0
installing and loading packages
I don't think there"most". It is normal to have to call the "library" function for each package you need devices to during an R session.
"chakri_amateur" <chakri2sai at yahoo.co.in> wrote:
>
>In my Windows XP, I just have to load package every time I open R, but not
>Install !!
>
>There must be some problem during installation !
>
2008 Oct 24
6
routing packet from/to source/destination
Hi all and specially Mr. Tom....
(Please, do not be acid with me please! I am only a newbie, trying learn
more about shorewall)
I get involved with a Firewall Project in a customer here in my city...
In this customer, he has two Internet Providers.
So, he ask me how make certain connection following one routing path (like
RT_1) and others connections type, following the other routing path