Displaying 20 results from an estimated 30000 matches similar to: "Create Matrix with Float32 values"
2011 Mar 08
1
Replacing values in a data.frame/matrix
Hi all,
Suppose we have the following matrix
m <- matrix(c(1,2,3,2,1,3,3,1,2), ncol = 3, byrow=T)
where in each row each number occurs only once.
I'd like to define a permutation, e.g. 1 -> 2, 2 -> 1, 3 -> 3 and apply
it to the matrix. Thus, the following matrix should result:
m.perm <- matrix(c(2,1,3,1,2,3,3,2,1), ncol = 3, byrow=T)
i.e. each 1 should map to 2 and vice
2011 Aug 01
2
How to make a nomogam and Calibration plot
Dear R users,
I am a new R user and something stops me when I try to write a academic
article. I want to make a nomogram to predict the risk of prostate cancer
(PCa) using several factors which have been selected from the Logistic
regression run under the SPSS. Always, a calibration plot is needed to
validate the prediction accuracy of the nomogram.
However, I tried many times and read a lot of
2009 Nov 05
2
Error in nls Error in if(any(start < low || start > upp)) {: missing value when TRUE/FALSE needed
Hi,
I got this error every time when I put upper and lower bound on my
parameters in nls. I'm not quite sure what this error is about. I also
wanted to find the content of nls_port_fit. But typing this directly
into R doesn't seem to give any result out.
I also tried to see the content of If anybody could shed some light
I'd greatly appreciate. Thank you.
rc
2009 Feb 05
0
[LLVMdev] 16 bit floats
----- Original Message -----
From: Villmow, Micah
To: LLVM Developers Mailing List
Sent: Friday, February 06, 2009 5:47 AM
Subject: [LLVMdev] 16 bit floats
I need to support 16 bit floats for some operations, outside of datatypes.td and the constants class, is there anything else I will need to modify to add f16 support?
probably also code generation (can't give specifics, no
2009 Feb 05
3
[LLVMdev] 16 bit floats
On Feb 5, 2009, at 12:51 PM, BGB wrote:
>
> ----- Original Message -----
> From: Villmow, Micah
> To: LLVM Developers Mailing List
> Sent: Friday, February 06, 2009 5:47 AM
> Subject: [LLVMdev] 16 bit floats
>
> I need to support 16 bit floats for some operations, outside of
> datatypes.td and the constants class, is there anything else I will
> need to modify to
2012 Jun 11
2
replacing values of matrix with random values of another dataframe
Hello,
I'm having trouble performing a certain function within R and I was hoping
someone might be able to help. I have a matrix (1000x21) that contains
whole-number values ranging from 1-7 and I want to replace all entries
within this matrix that have a value of 1 with a random number contained
within a different dataframe that has 21 rows,1000 columns. I've tried
using the if/else
2009 Jan 20
1
Creating a Sparse Matrix from a Sparse Vector
Hello,
I am working with a sparse matrix that is approx. 13,900 by 14,100. My
goal is to select a row out of the matrix and create a new matrix with that
row repeated 13,900 times without having to do any looping. Example:
Starting Matrix:
exampleMatrix
3 x 4 sparse Matrix of class "dgCMatrix"
[1,] 1 . . .
[2,] . 1 . 0.5
[3,] . . 1 ..
New Matrix:..
newExampleMatrix
3 x 4 sparse
2010 Jan 30
2
convert data frame of values into correlation matrix
Hi Group,
Consider a data frame like this:
mylabel1 <- rep(c("A","B","C"),each=3)
mylabel2 <- rep(c("A","B","C"),3)
corrs <- c(1,.8,.7,.8,1,.7,.7,.7,1)
myData <- data.frame(mylabel1,mylabel2,corrs)
myData
mylabel1 mylabel2 corrs
1 A A 1.0
2 A B 0.8
3 A C 0.7
4 B
2006 Jul 25
5
build problems with current xen unstable cpu.h vl.h:75 vl.c:24 cpu-all.h:122: error: syntax error before "float64"
Hi,
I am having troubles in building xen unstable.
make[3]: Entering directory `/data/xen/build/xen-unstable.hg-3.0-20060725.5/tools''
[ -f ioemu/config-host.h ] || \
(cd ioemu && sh configure --prefix=/usr)
Install prefix /usr
BIOS directory /usr/share/xen/qemu
binary directory /usr/lib/xen/bin
Manual directory /usr/share/man
ELF interp prefix
Source path
2006 Sep 23
2
Create a vector of indices from a matrix of start and end points
I have a very large dataframe and wish to extract a subset of rows. I
have a two column matrix listing the starting and ending indices of
one subset on each row. My idea is to create a vector of indices that
could be applied to the dataframe and I have a solution using a for
loop (below). But surely there is some more elegant way to do this! I
looked thorough the archives without
2006 Apr 09
2
configure error
*I've been trying for several weeks to install R-2.2.1 on a PC with
an AMD Athlon 64 2800*+* processor running Mandriva 2006_64. After
unpacking R-2.2.1.tar.gz I ran ./configure. However, configure stopped
prematurely with the message *"configure:27295: WARNING: gfortran and
gcc disagree on int and double configure:27297: error: Maybe change
CFLAGS or FFLAGS?"* Altough
2005 Nov 23
2
How to plot two different lines with different color with the same "plot" function?
Hi,R_Help!
I have done something like this:
>x<-seq(412,612,1)
>plot(x,dpois(x,512),col="blue",type="l")
>plot(x,dnorm(x,512,sd=sqrt(512)),col="red",type="l")
And now,I want to plot the two lines in the same picture or with the same "plot" action?
What should I do?
And any advises?
Thank you in advance!
仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭伖併佇伹
2008 Feb 01
2
re placing values in a matrix
useR's,
Consider:
y <- c(20, 25, 30)
> m <- matrix(c(0.0,1,NA,0.5,1.25,0.75, 0.5, NA,
> NA),byrow=TRUE,nrow=3,ncol=3)
> m
[,1] [,2] [,3]
[1,] 0.0 1.00 NA
[2,] 0.5 1.25 0.75
[3,] 0.5 NA NA
For each numeric value, I want to replace them with their corresponding
y-value. The result should look like (here, each row represents a variable
rather than the columns):
2014 Dec 24
6
[RFC][FFT][Fixed-Point][NEON] NEON-Optimize Fixed-Point FFT?
Hi,
I am working on DSP module of Ne10. I see there are fixed-point and floating-point FFT inside Opus. Is fixed-point FFT only a fall back for CPU without VFP? On ARMv7-A and ARMv8-A, benchmark result shows that fixed-point (int32) and floating-point (float32) FFT have similar performance. I guess fixed-point version is not often used on these platforms. Is it worth the effort to NEON-optimize
2005 Oct 07
1
Matrix calculations in R--erroneous?
Does anyone know how -log(x) can equal 743 but -log(x+0)=Inf? That's what
the following stream of calculations suggest:
Browse[2]> -log ( 1e-323+yMat2 - yMat1 * logitShape(matrix(parsList$Xs,
nrow = numXs, ncol=numOfCurves), matrix(means, nrow = numXs,
ncol=numOfCurves, byrow=TRUE), matrix(sigmas, nrow = numXs,
ncol=numOfCurves, byrow=TRUE)) )[5,9]
[1] Inf
Yet:
Browse[2]>
2024 May 03
1
Get a copy of a matrix only for TRUE entries of a matching size boolean matrix?
It's exactly what I was looking for, thanks. I'm replying to the whole
list so others can skip this question, to not waste time on it.
Bonne fin de journ?e de Montr?al (nous sommes le matin ici)
On Fri, May 3, 2024 at 10:30?AM Marc Girondot <marc_grt at yahoo.fr> wrote:
> Is it what you want ?
> mat_letters <- matrix(data=c('A', 'B', 'C',
2010 May 22
2
Fast Matrix Computation
Hi,
I have two (large) matrices A and B of dimensions (m,n) and (p,n) respectively.
I'd like to see if the is a fast way to compute a new matrix C with
dimension (m*p,n) in which each row in C is found by applying some
function f to each pair of rows (x,y) where x is a row in A and y is a
row in B.
For example, if
A <- matrix(c(1, 2, 3, 4, 5, 6), byrow=TRUE, ncol=3)
B <- matrix(c(7,
2011 Jul 25
1
Rescaling columns in a multi-plot layout
Dear all,
I am trying to create a 6-plot layout - 3 rows and 2 columns - so that
only the top two plots have variable widths, all else with their default
setting. Using
"layout(matrix(c(1,2,3,4,5,6),3,2,byrow=T),widths=c(5,2))" rescales
column #2 of all three rows, whereas I would like to rescale that of
only row #1. Is there a simple way of doing this?
Thanks,
Manojit
2024 May 03
2
Get a copy of a matrix only for TRUE entries of a matching size boolean matrix?
Is there a way to get a copy of a matrix only for TRUE entries of a
matching size boolean matrix? For *example*:
> mat_letters <- matrix(data=c('A', 'B', 'C', 'D'), ncol=2, byrow=TRUE)
> mat_letters
[,1] [,2]
[1,] "A" "B"
[2,] "C" "D"
> mat_bools <- matrix(data=c(FALSE, TRUE, TRUE, FALSE), ncol=2,
2012 Sep 03
3
Horizontal grid in background of barplot
All,
I have:
x <- matrix(c(22,3,6,69,9,4,7,81,23,4,22,50),nrow=3,byrow=TRUE)
rownames(x) <- c("Cold or flu","Headache","Backache");
colnames(x) <- c("Went to doctor","No response","Did
nothing","Self-medicated")
x <- t(x)
print(x)
barplot(x,beside=TRUE,
ylim=c(0,90),
xlab="Ailment",