Displaying 20 results from an estimated 500 matches similar to: "function which saves an image of a dgtMatrix as png"
2010 Aug 10
1
[Fwd: Re: optimization subject to constraints]
-------------- next part --------------
An embedded message was scrubbed...
From: Gildas Mazo <gildas.mazo at curie.fr>
Subject: Re: [R] optimization subject to constraints
Date: Tue, 10 Aug 2010 15:49:19 +0200
Size: 4924
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100810/78862894/attachment.eml>
2012 Mar 06
2
Numerical Inversion of Cumulative Distribution Function
Dear R users,
Given a user-defined cumulative distribution function F, I want to compute F^{-1}(x). How is that possible with R?
Best Regards,
--
Gildas Mazo
PhD student
MISTIS team at INRIA
Grenoble, France
[[alternative HTML version deleted]]
2010 Jul 22
4
SQL/R
Dear R users,
I want to aggregate data in the following way:
###
X <- data.frame(u = c("T1","T1","T1","T2"), v=c("a","a","b","a"))
X
library(sqldf)
sqlOut <- sqldf("select count(distinct(v)) from X group by u")
sqlOut
###
Now I want to get the same result without using SQL. How can I achieve
that ?
2010 Jun 04
2
Build Design Matrix with avoiding loops
Dear R users,
I'd like to build a simple design matrix in a efficient way. I naively
wrote the code below.
####
n = 15
k = 3
nbPerGrp = c(5,5,5)
xT <- list()
for (i in 1:k){
xT[[i]] <- rep(0, k)
xT[[i]][i] <- 1
}
X <- matrix(nrow = n, ncol = k) #design matrix
for (i in 1:nbPerGrp[1]){
X[i,] <- xT[[1]]
}
for (i in 1:k-1){
for (j
2010 Aug 09
2
optimization subject to constraints
Dear R users,
I'm looking for tools to perform optimization subject to constraints,
both linear and non-linear. I don't mind which algorithm may be used, my
primary aim is to get something general and easy-to-use to study simples
examples.
Thanks for helping,
Gildas
2012 Sep 20
1
optim and "the function should not" advice
Dear R users,
I'm using optim to optimize a pretty complicated function. This function takes the parameter vector "theta" and within its body I use instructions like
sigma<-theta[a:b]; computations with sigma...
out<-c()
for (i in 1:d){
a<-theta[(3*d+i):c]
out[i]<-evaluation of an expression involving 'a' (I use symbolic differentiation)
}
Unfortunately
2012 Mar 22
4
Plotting patient drug timelines using ggplot2 (or some other means) -- Help!!!
Hello All,
Want very much to learn how to plot patient drug timelines. Trouble is I need to figure out how to do this today. So not much time for me to struggle with it. Hoping someone can just help me out a bit.
Below are some sample data and code that produces what I think is the beginning of a very nice graph.
Need to alter the code to:
1. Get the lines for the drugs to appear on the
2011 Dec 20
1
column permutation of sparse matrix
Hi,
I'm very new to working with sparse matrices and would like to know how I
can column permute a sparse matrix. Here is a small example:
> M1 <-
> spMatrix(nrow=5,ncol=6,i=sample(5,15,replace=TRUE),j=sample(6,15,replace=TRUE),x=round_any(rnorm(15,2),0.001))
> M1
5 x 6 sparse Matrix of class "dgTMatrix"
[1,] 2.983 . 1.656 5.003 . .
[2,] .
2006 Oct 30
2
file_column uppercase extension problem
i''m using file_column 0.3.1 with rails 1.1.6, ruby 1.8.4, on winXP, and
i have this problem:
when I try to upload in my web application an image using file_column
plugin, if the extension of the image contains at least 1 uppercase
(e.g. myImage.jpG), I get this error:
No such file or directory -
./public/model/picture/tmp/1162229227.753000.516/myImage.JPG or
2016 Mar 04
2
Why are virsh vol-upload/vol-download so slow?
I was interested in using 'virsh vol-upload' and 'virsh vol-download',
rather than mucking about directly with the filesystem. But while
simply copying the image is relatively quick:
# ls -l /var/lib/libvirt/images/centos-7-cloud.qcow2
-rw-r--r--. 1 qemu qemu 1004994560 Apr 15 2015 centos-7-cloud.qcow2
# time cp /var/lib/libvirt/images/centos-7-cloud.qcow2
2007 May 03
1
Issue with the Matrix package
Hi all,
I am wondering if this is a bug in the Matrix package or if it something
that I am just getting wrong...here is an example:
> m = matrix(0,4,4)
> dimnames(m) = list(letters[1:4], letters[5:8])
> r = c("a","b","a","d")
> m[r,2] = 1
> m
e f g h
a 0 1 0 0
b 0 1 0 0
c 0 0 0 0
d 0 1 0 0
> M = Matrix(0,4,4)
> dimnames(M) =
2008 Nov 01
2
Patching your own boot-disk from first principles
Hi,
I'm trying to build a bootable MSDOS disk and put it on a ISO with floppy and hard disk emulation. I want to use commonly available Linux tools like dd, losetup, mkdosfs, memdisk etc.
I have done the following:
1. dd if=/dev/zero of=myImage bs=1M count=50 [ Builds a 52MB image ]
2. losetup /dev/loop0 myImage [Links /dev/loop0 to myImage file ]
3. vi /grub/stage1; %!xxd; [ NULL the partion
2010 Mar 25
3
Absolutely No idea how to plot my Spatial Data
Hi,
I have a data set of points which are represented by 3 variables x,y,z where
x is the position of the point on the x-absciss and y on the y-absciss. Each
of my points has a value z, which I want to be displayed as follows: the
more z is high, the more the color on the map is dark.
How can I achieve this ?
Thanks for your help
--
View this message in context:
2009 Aug 26
1
Problem with standard generic methods in Matrix package
I have posted this message on r-lang, but it is perhaps more appropriate
on r-devel:
---
Hello,
I'm puzzled by a problem with call to diag(), rowSums(), rownames() on
objects of class "dgtMatrix", created by sparseMatrix() or spMatrix().
I use Matrix 0.999375-30.
The weird thing is that I don't encounter any problem when I use this
functions on the R prompt, or
2012 Oct 09
4
Convert COLON separated format
I have a bunch of data sets that were created for the libsvm tool. They are in "colon separated sparse format".
i.e.
1 5:1 27:3 345:10
Is a row with the label of "1" and only has values in columns 5, 27, and 345.
I want to read these into a data.frame in R.
Is there a simple way to do this?
--
Noah Silverman, M.S.
UCLA Department of Statistics
8117 Math Sciences
2014 Apr 29
2
Issues with syslinux_run_command(str) and parameters
>
> Thanks Ady, you were spot on, and I should have tested that scenario!
> I narrowed the issue down to a line in my config:
>
>
> ALLOWEDOPTIONS 0
>
>
> The comment next to it in my config indicates this was added to
> disallow users dropping to the console with Escape or Tab, a
> restriction I would like to keep. BUT, when this is set whichsys
>
2006 Jul 14
2
watermark with file_colum
Is this possible?
I see rmajick allows for a image.stenago( watermark=>''myimage.gif'')
Anyone have any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060714/6e9af7a6/attachment.html
2009 Dec 03
2
adding bmp/jpg/gif to an existing plot
Hi, all.
I searched a lot at mailing list, installed EBImage and gtk packages, but I
couldn't make this simple work:
How to add a image file (jpg or bmp ou gif) to an existing plot window (not
plot over the image), like the code below (pseudo function add.image):
plot(1:10,1:10,main="test")
image = read.X("myimage.jpg")
add.image(image, x.left=2, y.bottom=4,
2009 Oct 22
0
dgTMatrix --- [, , drop=F] strange behavior, Matrix 0.999375-20
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have something strange here...
I want to subset a large sparse matrix, with the subset being still in
sparse form. Easily achievable with mm[i,,drop=F] , right? Well, it
doesn't work on the matrix I'm working on.
This is a very large wikipedia Matrix (now I can play with it as I just
got 16Gb of memory):
> mm at Dim
[1] 793251
2007 May 16
3
Reshape a sparse matrix
Hi,
I'd like to reshape a sparse matrix generated from the Matrix package. I can't seem to do it with the command
dim(A) <- c(6,9)
which works perfectly with the base package matrices, but with the sparse matrices it errors with
Error in dim(A) = c(6, 9) : dim<- : invalid first argument
Manipulating the Dim attribute of the sparse Matrix does not produce the desired effect. A