Displaying 20 results from an estimated 100 matches similar to: "axes start at end of plot"
2011 Jul 29
2
problems with image.plot()
Hi all,
I used image.plot() to create a heat map of a matrix:
as.matrix(read.table("Matrix.txt", sep="\t"))->x
HeatBrk<-seq(5,25,2.5)
MyCol= gray((7:0)/7)
library(fields)
image.plot(x, col=MyCol, breaks=HeatBrk, legend.shrink=0.3)
dev.copy(device=pdf, file="HEAT4!.pdf", height=8, width=8)
dev.off()
There are a few things that I would like to do that I
2011 Aug 20
0
axis does not show up
Hello everyone,
Using the following script I generated a heatmap for my matrix with
image.plot from the fields package:
library(fields)
as.matrix(read.table("Matrix.txt", sep="\t"))->x
#on left: labels are:
Side<-as.character(x[1,2:ncol(x)])
length(Side)->nS
#on bottom, labels are:
Bot<-as.character(x[2:nrow(x),1])
#remove first row and column
2012 May 21
1
problem with data frame to numeric transformation
http://r.789695.n4.nabble.com/file/n4630788/GOF_CGIK.R GOF_CGIK.R
http://r.789695.n4.nabble.com/file/n4630788/RESIDSNEWr.csv RESIDSNEWr.csv
In order to save place, I attach the data and the R code, for which I have 2
questions.
1/ I cannot convert successfully the data frames with names "first" and
"second" in numeric format. They participate here:
2011 Jul 19
1
Assigning colors to cells
Hi everyone,
I was wondering if there was a simple way to assign a color to a cell
based on value in a data frame and return the cell as an image? For
example, if the value is >1, then blue, if between 1 and 2, green, if
between 2 and 3, yellow, etc.
I tried using a heatmap function but I was hoping there was an easier
way to do this.
Thanks,
Sumukh
2011 Dec 06
1
Unable to collate and parse R files with R CMD check
Hi all,
I'm trying to build a package on Windows 7 (64 bit) and although R cmd
build worked fine and I got pkg.tar.gz with no errors, but when I tried
doing R CMD check everything turns out ok except for the warning:
"checking whether package 'pkg' can be installed ... ERROR.
Installation failed."
It then refers me to the error file "00install.out" which reads as
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to
do this weekend to understand every bit but your code will prove very
useful.
Cheers,
Aziz
-----Original Message-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
2010 Jul 15
2
replace negative numbers by smallest positive value in matrix
Hi Group,
I have a matrix, and I would like to replace numbers less than 0 by
the smallest minimum number. Below is an
small matrix, and the loop I used. I would like to get suggestions on
the "R way" to do this.
Thanks,
Juliet
# example data set
mymat <- structure(c(-0.503183609420937, 0.179063475173256, 0.130473004669938,
-1.80825226960127, -0.794910626384209, 1.03857280868547,
2012 Jul 29
1
Zoo panel function
I would really like some help with understanding the panel function, in
zoo. Thank you.
R 15.1 and zoo 1.7-7.
library(zoo)
x = seq(0,3*pi,length.out=100)
y = sin(x)
zobj = zoo(y, x)
###########################################################
## EXAMPLE 1 - GLOBAL ARGUMENT
## This panel function works
## But, it relies on mycol, which is a global variable
2017 Jan 21
2
problema con grafico lattice ....
Hola,
Por si lo quieres con colores rellenando cada punto:
#----------------
library(data.table)
library(lattice)
dat <- read.table("pba.csv", header=TRUE, dec=",", as.is=TRUE)
row.names(dat) <- NULL
dat <- as.data.table(dat)
dat$mycol <- ifelse(dat$sol =="ControlAE", "red", dat$sol)
dat$mycol <- ifelse(dat$mycol
2007 Feb 04
3
Reference to dataframe and contents
This is probably easy for experienced users but I could not find a solution.
I have several R scripts that process several columns of a dataframe
(several dataframes and columns actually, but simplified for my question).
References such as:
myDF$myCol
are all over. I like to automate this for other dataframes and columns by
defining a reference only once in the beginning of the script.
One
2011 Feb 28
0
Fwd: Re: speed up process
Dear Jim,
Here is again exactly what I did and with the output of Rprof (with this
reduced dataset and with a simpler function, it is here much faster than
in real life).
Thanks you again for your help!
## CODE ##
mydata1<- structure(list(species = structure(1:8, .Label =
c("alsen","gogor", "loalb", "mafas", "pacyn", "patro",
2011 Dec 05
2
barplot ignoring col parameter
Hi All,
I'm having a problem with barplot:
mydata
[1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1
mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9))
barplot(mydata, col = mycol)
gives me an uniformly yellow barplot. How do I solve this?
bw
Federico
2011 Feb 25
1
speed up process
Dear users,
I have a double for loop that does exactly what I want, but is quite
slow. It is not so much with this simplified example, but IRL it is slow.
Can anyone help me improve it?
The data and code for foo_reg() are available at the end of the email; I
preferred going directly into the problematic part.
Here is the code (I tried to simplify it but I cannot do it too much or
else it
2006 Aug 01
2
rgb and col2rgb color conversion/modification/shading
I want to get a lighter shade of a color...I have a lot of colored objects and
want each one printed as a foreground against a slightly lighter background.
I thought I could try something like changing the alpha channel by first
converting it to rgb.
But prior to trying that, I'm stuck with how to get the color after converting
using col2rgb() to be interpreted again as a color, rather than
2010 Aug 21
1
lattice::xyplot() with one factor for points and another for lines
Hi:
In lattice, how does one handle separate graphical behavior for two
different factors? In the xyplot below, the objective is to use the levels
of one factor to distinguish corresponding shapes and colors, and the levels
of the other factor to perform level-wise loess smooths.
# Illustrative data:
d <- data.frame(time = rep(1:8, each = 6), val = rnorm(48),
gp1 =
2007 Aug 06
3
Error in using nlevels in apply function
Dear R users,
I am currently trying to create my first personnal function and use it
with the apply function. The purpose of this function is to create a
vector summarizing the number of levels in a given selection of
data.frame columns.
I tried to transpose the indexation method used by the nlevels function
but it doesn't seem to work. I did not find anything uesful in the
archives so
2013 Jan 12
3
heatmap.2 problem
Dear List,
I'm trying to generate a simple heatmap that has each row and column
separated by a black line. However, for some reason this only happens
for the first and last color. The middle color in my colorpanel()
command has an addition horizontal and vertical line that I would like
to get rid off. Any suggestions?
#my code below
my.matrix <- cbind(func.1 =
2005 Jul 27
3
Asymmetric colors for heatmap
> Dear expeRts,
>
> Currently, my colors are as follows:
> mycol <-
> c("blue1","blue2","blue3","blue4","black","yellow4","yellow3","yellow2","y
> ellow1")
> heatmap(snp, Rowv=NA, Colv=NA, col=mycol)
>
> However, I would like to have the following colors:
> bright blue ->
2010 May 17
1
suggestions/improvements for recoding strategy
I am recoding some data. Many values that should be 1.5 are recorded
as 1-2. Some example data and my solution is below. I am curious about
better approaches or any other suggestions. Thanks!
# example input data
myData <- read.table(textConnection("id, v1, v2, v3
a,1,2,3
b,1-2,,3-4
c,,3,4"),header=TRUE,sep=",")
closeAllConnections()
# the first column is IDs so remove
2010 Dec 12
4
legend not appearing in Word document
I need help with using graphics in Word 2007 that will later be converted into a
pdf document.? I have tried several formats and found that?I get the best
quality of graphics using .wmf, .eps format, but when I convert it to .pdf I get
a bunch of lines across the figures.? I also tried .tiff and .png but they give
me much lower quality.? The best quality that converts to pdf appears to be