Displaying 20 results from an estimated 200 matches similar to: "Coerce rectangular matrix to symmetrical square matrix"
2009 Mar 27
2
adding matrices with common column names
folks,
if i have three matrices, a, b, cc with some colnames in common, and i
want to create a matrix which consists of the common columns added up,
and the other columns tacked on, what's a good way to do it? i've got
the following roundabout code for two matrices, but if the number of
matrices increases, then i'm a bit stymied.
> a <- matrix(1:20,ncol=4); colnames(a) <-
2017 Jul 16
2
About doing figures
Hi R users,
I still have the problem about plotting. I wanted to put the datasets on
one figure, x-axis represents values B, y-axis represents values C, while
different colors label column A. Each record uses a circle on the figure,
while hollow circles represent DF=1 and solid circles represent DF=2. I put
my code below, but the A labels do not correspond to the true record, so I
don't know
2017 Jul 16
2
About doing figures
Hi Jim,
For true color, I meant that the points in the figure do not correspond to
the values from the dataframe. Also, why to use rainbow(9) here? And the
legend is straight in the middle, is it possible to reformat it to the very
bottom? Thanks again.
On Sun, Jul 16, 2017 at 2:50 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi lily,
> As I have no idea of what the "true
2017 Jul 16
0
About doing figures
Hi lily,
As I have no idea of what the "true record" is, I can only guess.
Maybe this will help:
# get some fairly distinct colors
rainbow_colors<-rainbow(9)
# this should sort the numbers in dfm$A
dfm$Acolor<-factor(dfm$A)
plot(dfm$B,dfm$C,pch=ifelse(dfm$DF==1,1,19),
col=rainbow_colors[as.numeric(dfm$Acolor)])
legend("bottom",legend=sort(unique(dfm$A)),
2017 Jul 16
0
About doing figures
For more than 10 records, how to reformat the colors? Also, how to show the
first legend only, but at the bottom, while the second legend in your code
is not necessary? In all, the same A values have the same color, but
different symbols in DF==1 and DF==2.
Thanks for your help.
On Sun, Jul 16, 2017 at 9:28 AM, lily li <chocold12 at gmail.com> wrote:
> Hi Jim,
>
> For true color,
2012 Feb 13
1
comment lines sometimes removed from a function on exit from internal R editor
Dear All -
The problem: comment lines in an R function (lines beginning with # ) are *sometimes* removed on leaving the R default editor (same with notepad).
I'm working on a Windows machine with R version 2.14.1.
An example is below. Couldn't find anything that seemed to relate to this in the Changelog. I don't recall encountering this behavior with previous versions of R. Any
2008 Mar 04
1
Sampling letters
I have a binary matrix of size N x 300. I then create the following:
> set.seed(1234)
> (key_file <- sample(letters[1:4], 300, replace=TRUE))
[1] "a" "c" "c" "c" "d" "c" "a" "a" "c" "c" "c" "c" "b" "d" "b" "d"
"b"
2007 Apr 24
5
intersect more than two sets
Hi,
I searched the archives and did not find a good solution to that.
assume I have 10 sets and I want to have the common character elements of them.
how could i do that?
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
2004 Dec 16
8
counting numbers without replicates in a vector
Hi,
I am just wondering if there is an easy way to count
in a numeric vector how many numbers don't have
replicates.
For example,
a=c(1,1,2,2,3,4,5), how can I know there are three
numbers (3, 4 and 5) without replicates?
Thank you!
Jun
=====
2003 Mar 07
1
column name changes based on substrings
Hi peoples,
I'm trying to work out a function which will allow me to relace column names
on the basis of substrings within the existing names. e.g.
I'd like:
blah.Na blah2.Na blah3.Mg blah4.Mg blah5.K blah6.K
R1 x x x x x x
R2 x x x x x x
...
to become:
Na (%) Na (%) Mg (%) Mg
2006 Nov 30
1
Looking for nice implementations of rectangular scatterplot matrices
... finding myself doing this by hand one too many times ... maybe someone else has found a nice general solution ...
I have a data frame containing n rows on p+q variables which I will call p.1, p2, ..., pp and q1, q2, ... qq. For simplicity all of these variables are continuous numeric. I want to create the following arrangement of plots:
A scatterplot matrix which contains p times q panels
2003 Jun 16
2
Isocontour-lines of spatial data on a rectangular grid (not plots!)
Dear R-Listers,
I have spatial data on an equidistant rectangular grid, similar to
topographic data. I know that there are quite a few R-packages or base
functions that provide nice iso-contours plot, but I don't want a plot, just
the smoothed isocontour line of ONE level (e.g. 10 mm).
Data sets are large, so it would be preferable if the availability of
regular grid data could be exploited,
2004 Jan 20
0
Is libpri symmetrical?
My client would like to add new functionality, such as call queuing, to
their PBX. They presently have a Telrad PBX; it has a T1/PRI circuit
from the CLEC and a few POTS lines. They use DID for some incoming
calls and an attendant for calls on the main number.
The client's commitment to customer service will not allow us to
outright replace their PBX with a new system--we could never
2011 Apr 30
3
Copying to R a rectangular array from a Java class
Bare test code: My simple Java test class source and R test code follow:
public class RJavTest {
public static void main(String[]args) { RJavTest rJavTest=new RJavTest();
}
public final static String conStg="testString";
public final static double con0dbl=10000001;
public final static double[]con1Arr=new double[] {
10001,10002,10003,10004,10005,10006 };
public final static
2013 Oct 09
2
[PATCH 0/1] Porting klibc to arm64
On Wed, 9 Oct 2013 10:44:27 +0000 (UTC)
Thorsten Glaser <tg at mirbsd.de> wrote:
> Anil Singhar dixit:
>
> >Manual testing as provided within the package has been done with all
> >tests passing. This includes the units tests available under
> >usr/klibc/tests, usr/utils, usr/dash and usr/gzip. For dash and
> >gzip, only sanity testing has been done.
>
>
2006 Dec 08
3
how to create data.frame with dynamic count of values
Hello R-Group
I found how to fill the data.frame ->
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/70843.html
N1 <- rnorm(4)
N2 <- rnorm(4)
N3 <- rnorm(4)
N4 <- rnorm(4)
X1 <- LETTERS[1:4]
###################
nams <- c(paste("N", 1:4, sep = ""), "X1")
dat <- data.frame(lapply(nams, get))
names(dat) <- nams
dat
But I need also to create
2006 Jan 12
1
KSH tab completion
does anyone know how to get ksh to use tab completion?
--
Andrew Rice Jr
Systems Analyst
Carrier Management Systems, Inc.
500 Chestnut Street, Suite 500
Abilene, TX 79602 USA
support: (325) 672-0975
office: (325) 677-5900
fax: (325) 676-0529
http://www.nams.net
NAMS III, NAMS 2000 Centralized, NAMS BMX
2012 May 20
5
removeing only rows/columns with "na" value from square ( symmetrical ) matrix.
I have some square matrices with na values in corresponding rows and
columns.
M<-matrix(1:2,10,10)
M[6,1:2]<-NA
M[10,9]<-NA
M<-as.matrix(as.dist(M))
print (M)
1 2 3 4 5 6 7 8 9 10
1 0 2 1 2 1 NA 1 2 1 2
2 2 0 1 2 1 NA 1 2 1 2
3 1 1 0 2 1 2 1 2 1 2
4 2 2 2 0 1 2 1 2 1 2
5 1 1 1 1 0 2 1 2 1 2
6 NA NA 2 2 2 0 1 2 1 2
7 1 1 1 1 1 1 0 2 1 2
8
2006 Feb 02
3
ftp access directory
using vsftpd, I know its possible to specify what directory you want a user to be dropped into when he ftps
in...but I dont remember where to go to change that.
any suggestions?
--
Andrew Rice Jr
2010 Oct 24
6
Contour Plot on a non Rectangular Grid
Dear All,
I would like to plot a scalar (e.g. a temperature) on a non-rectangular
domain (or even better: I would simply like to be able to draw a contour
plot on an arbitrary 2D domain). I wonder if there is any tool to
achieve that with R. I did some online search in particular on the list
archives, found several queries similar to this one but was not able to
find any conclusive answer.
I