Hi Ivan,
Thanks for pointing this out. It now matches.
Thanks and regards,
On Thu, 21 Sept 2023 at 13:04, Ivan Krylov wrote:
>
> On Tue, 19 Sep 2023 23:09:18 +0530
> Brian Smith wrote:
>
> > C = rep(0, length(D))
> > N = length(D)
>
> In the VaRDurTest fun
Hi,
** In may earlier post there were some typo, so reposting the same
after correction**
I am trying to replicate a function from rugarch package manually.
Below is the calculation based on the function,
library(rugarch)
data(dji30ret)
spec = ugarchspec(mean.model = list(armaOrder = c(1,1),
Hi,
I have trying to replicate a function from rugarch package manually.
Below is the calculation based on the function,
library(rugarch)
data(dji30ret)
spec = ugarchspec(mean.model = list(armaOrder = c(1,1), include.mean = TRUE),
variance.model = list(model = "gjrGARCH"), distribution.model =
Hi,
I was trying to make a network plot of this data:
library(igraph)
library(network)
df1 <- data.frame(from="A",to=c("B","C","D","E","F","G"),value=1)
df2 <- data.frame(from="K",to=c("L","M","N"),value=1)
df3 <- data.frame(from="A",to="K",value=3)
my.df <- rbind(df1,df2,df3)
Hi,
I am wondering if there is some references on how R can be used to
analyse legal/court documents. I searched a bit in internet but unable
to get anything meaningful.
Any reference will be very appreciated.
Thanks for your time.
Thanks and regards,
Hi,
I was trying to find a pattern ("ABHD14A") in a character string ('xgen' in
example below) using grepl. Note that the individual members may be
separated by a semi-colon.
The correct answer should return:
"ABHD-ACY1 ; ABHD14A" "ABHD14A ; YYY"
I have tried three approaches, but still seem a
Hi,
I am a little bit perplexed at why I am getting some values as FALSE:
> cpgbins <- seq(0,1,0.05)
> cpgbins
[1] 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65
0.70 0.75 0.80 0.85 0.90 0.95 1.00
> cpgbins[1] == 0.00
[1] TRUE
> cpgbins[2] == 0.05
[1] TRUE
> cpgbins[3]
Hi,
I was trying to use par(mfrow) to put 4 heatmaps on a single page. However,
I get one plot per page and not one page with 4 plots. What should I
modify? Test code is given below:
test = matrix(rnorm(60), 20, 3)
pdf(file='test.pdf',width=10,height=8)
par(mfrow=c(2,2))
heatmap(test)
ta.frame(Lab,valuex)
>
> # set the factor levels to the same order as observed in the data frame
> df$Lab <- factor(df$Lab, levels=unique(df$Lab))
>
> px <- ggplot(df,aes(Lab,valuex,label=Lab)) +
> geom_text(aes(y=0)) +
> geom_bar(stat = "identity")
> p
Hi,
I was trying to make a horizontal bar plot. The barplot works when the text
labels are of reasonable length, but not if some of them are slightly long.
I think the long ones get 'squeezed' by default before the plot is flipped
and keep the skew after the flip. Is there a way I can get around
Hi,
I was trying to draw a geom_bar plot. However, by default, the bars are
arranged according to the label, which I don't want. I want the bars to
appear exactly as they appear in the data frame. For example in the code:
Lab=c(letters[4:6],letters[1:3])
valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4)
uess most ROCs that I've seen are somewhere in between, i.e. they have a
little jaggedness, but not as much as in plot #1 above"
thanks!
On Mon, Jun 26, 2017 at 12:59 PM, Marc Schwartz <marc_schwa...@me.com>
wrote:
>
> > On Jun 26, 2017, at 11:40 AM, Brian Smith <bsmith030...@gmail.co
Hi,
I was trying to draw some ROC curves (prediction of case/control status),
but seem to be getting a somewhat jagged plot. Can I do something that
would 'smooth' it somewhat? Most roc curves seem to have many incremental
changes (in x and y directions), but my plot only has 4 or 5 steps even
77 36 89
> ivan.calan...@univ-reims.fr
> --
> https://www.researchgate.net/profile/Ivan_Calandra
> https://publons.com/author/705639/
>
>
> Le 19/05/2016 à 15:40, Brian Smith a écrit :
>
>> Hi,
>>
>> I have a plot with log scale on the axes. How do I add ticks and
Hi,
I have a plot with log scale on the axes. How do I add ticks and labels in
addition to the ones provided by default? Can I specify where I want the
ticks and labels?
For example:
set.seed(12345)
x <- sample(1:1,10)
y <- sample(1:1,10)
plot(x,y,log="xy")
For me, this plot has tick
Hi,
I was trying to remove the axis tick marks and their values using theme()
but haven't had much success. Here is sample code:
rx <- sample(1:100,10)
ry <- sample(1:100,10)
rz <- sample(letters[1:3],10,replace=T)
rdf <- data.frame(rx,ry,rz)
p <- ggplot(rdf,aes(x=rx,y=ry))
p1 <- p +
Hi,
I was trying to run COMBAT on methylation data, but keep on getting an
error:
Error in while (change > conv) { : missing value where TRUE/FALSE needed
The error occurs irrespective of whether I give the entire or reduced
(variation filter keeps only about 140k CpGs) datasets.
Is there any
Hi,
I was trying to increase the size of certain lines in my plot (samples 'B'
and 'D' in example below). However, when I try to modify the line size, I
seem to screw up the linetypes. Also, is there a way to reflect the line
size in the legend?
Here is some sample code for illustration:
Hi,
I wanted the rug (in plot) to have different colors. For example:
vals1 - sample(1:100,5)
vals2 - sample(1:100,5)
rugcols - c(red,blue,brown,red,yellow)
plot(vals1,vals2)
rug(vals1,col=rugcols,lwd=2)
However, with this code I only get 'red' for all the ticks. Is there a way
I can get the
Thanks Duncan! That works!
On Sun, May 24, 2015 at 8:09 AM, Duncan Murdoch murdoch.dun...@gmail.com
wrote:
On 24/05/2015 7:47 AM, Brian Smith wrote:
Hi,
I wanted the rug (in plot) to have different colors. For example:
vals1 - sample(1:100,5)
vals2 - sample(1:100,5)
rugcols - c
Hi,
I am trying to connect points, but not in a different order than the
default value in ggplot. For example:
xx - sample(1:100,5)
yy - sample(1:100,5)
mydat - data.frame(xx,yy)
print(mydat)
ggplot(mydat,aes(xx,yy)) + geom_point() + geom_line()
I want to connect the points as they
--
|
http://billyam.com || http://use-r.com || http://shinyserver.com (BETA)
SAS Certified Base Programmer for SAS 9
Oracle SQL Expert(11g)
On Sun, Apr 5, 2015 at 9:03 PM, Brian Smith bsmith030...@gmail.com
wrote:
Hi,
I am trying to connect points
] hash_3.0.1
loaded via a namespace (and not attached):
[1] tools_3.1.2
On Sat, Mar 28, 2015 at 5:02 AM, Uwe Ligges lig...@statistik.tu-dortmund.de
wrote:
Try to reinstall hash. Sounds like a broken installation.
Best,
Uwe Ligges
On 28.03.2015 07:03, Brian Smith wrote:
Exactly. Used
in the hash table and keys(yourhash)
will return the 26 lowercase letters. Is that what you want?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sat, Mar 28, 2015 at 2:56 PM, Brian Smith bsmith030...@gmail.com
wrote:
I deleted the 'hash' directory and re-installed (several times
:
Works for me :
library(hash)
hash-2.2.6 provided by Decision Patterns
hx - hash( c('a','b','c'), 1:3 )
class(hx)
[1] hash
attr(,package)
[1] hash
hx$a
[1] 1
keys(hx)
[1] a b c
Maybe restart your session? Clear your workspace? Upgrade?
B.
On Mar 27, 2015, at 7:39 PM, Brian
Hi,
I was trying to use hash, but can't seem to get the keys from the hash.
According to the hash documentation ('hash' package pdf, the following
should work:
hx - hash( c('a','b','c'), 1:3 )
class(hx)
[1] hash
attr(,package)
[1] hash
hx$a
[1] 1
keys(hx)
Error in (function (classes, fdef,
Hi,
I am trying to create a boxplot (with geom_jitter) such that the points
from one set of values are shown as circles, and the second set of points
also as circles, but with no fill. In other words, how can I control the
shape and color for the points appearing in this boxplot?
===
Thanks!!
On Mon, Jan 26, 2015 at 5:23 PM, peter dalgaard pda...@gmail.com wrote:
On 26 Jan 2015, at 23:10 , Duncan Murdoch murdoch.dun...@gmail.com
wrote:
read.table(other args as before, colClasses = character)
(You might want factor instead of character.)
Or maybe not. I'd expect
Hi,
I had a table with 'T's in it. When I try to read the table, it replaces
all the 'T's with TRUE. Is there a way that I can retain the Ts?
thanks!
Sample table (test.txt):
xx1 xx2 0 0 2 2 A A G G A G A A C C G G G G G G A G A A A G A G A A G G A A
A G G G A G A G G G A G A G G G G G A G G
Hi,
I use multicore package quite a lot. However, I want to find a way to check
on the progress of my job. For example:
ftest - function(x){
if(x %% 100 == 0) print(x)
y - 2x
return(y)
}
res - mclapply(1:1000,ftest)
This would print the value of x in a for loop, but doesn't produce anything
Hi,
I wanted to plot two different density profiles. My code looks like:
x1 - rnorm(100,mean=0,sd=1)
x2 - rnorm(100,mean=1,sd=1)
plot(density(x1),xlab=,col=red,main=)
par(new=T)
plot(density(x2),xlab=,col=blue,main=)
However, the x-axis values don't match up for the two plots. Is there a way
function or tools in the lattice and
ggplot2 packages.
On Wed, Jun 18, 2014 at 8:48 AM, Brian Smith bsmith030...@gmail.com
wrote:
Hi,
I wanted to plot two different density profiles. My code looks like:
x1 - rnorm(100,mean=0,sd=1)
x2 - rnorm(100,mean=1,sd=1)
plot(density(x1
Hi,
I wanted to have a different font for my x-axis and y-axis. How can I use
the par function to specify different font sizes for x and y axis? For
example:
x - matrix(rnorm(2000),200,10)
colnames(x) - letters[1:10]
par(cex.axis=0.5)
boxplot(x,cex=0.2)
But this sets the font size to 0.5 for
Hi,
I was trying to get at some values from 'data' using the get function. Here
is my code:
class(data)
[1] data.frame
class(data$gender.factor)
[1] factor
head(data$gender.factor)
[1] Male Female Male Female Male Female
Levels: Male Female
xx - get(data$gender.factor)
Error in
Hi,
I was trying to use lapply to create a matrix from a list:
uu - list()
uu[[1]] - c(1,2,3)
uu[[2]] - c(3,4,5)
The output I desire is a matrix with 2 rows and 3 columns, so I try:
xx - lapply(uu,rbind)
Obviously, I'm not doing something right, but what!?
[[alternative HTML version
Thanks all! So many ways
On Thu, Nov 14, 2013 at 10:35 AM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
You are applying rbind to each element of the list, not rbinding it with
the others. Try instead
do.call(rbind, uu)
Hope this helps,
Rui Barradas
Em 14-11-2013 15:20, Brian
Thanks for the article, Jose! It looks very interesting.
On Mon, Jul 22, 2013 at 7:12 AM, Jose Iparraguirre
jose.iparragui...@ageuk.org.uk wrote:
Dear Cheng,
This question exceeds the topics of this group. However, you may benefit
from this recent (and excellent) paper along with the
Hmm...I think it used to work before, but it gives an error now. Here is
some sample code:
=
library(ggplot2)
Sample - rep(c('A','B'),rep(10,2))
Vals - sample(1:1000,20)
dataf - as.data.frame(cbind(Sample,Vals))
myplot - ggplot(dataf,aes(x=Vals,colour=Sample)) + geom_density()
myplot
: int 96 712 765 121 154 78 821 258 812 51 ...
ggplot(dataf,aes(x=Vals,colour=Sample))+geom_density() #no error
A.K.
- Original Message -
From: Brian Smith bsmith030...@gmail.com
To: r-help Help r-help@r-project.org
Cc:
Sent: Tuesday, June 11, 2013 1:44 PM
Subject: [R] ggplot2
Hi,
I was trying to make a density plot with 13 samples. To distinguish each
sample, it would be good if each color is as different as possible from the
other colors. I could use the built in function, but that does not do more
than 8 colors and then goes back to recycling the cols. If I use a
Hi,
I was trying to make a 3D plot using densCols. The documentation for
densCols doesn't look like it'll work for 3D. For example:
-
library(scatterplot3d)
v1 - rnorm(1)
v2 - rnorm(1)
v3 - rnorm(1)
## 2D with denscols
mat1 - cbind(v1,v2)
', not 'col'.
scatterplot3d(mat,color=mcols,**pch=16)
HTH,
Pascal
On 28/03/13 19:41, Brian Smith wrote:
Hi,
I was trying to make a 3D plot using densCols. The documentation for
densCols doesn't look like it'll work for 3D. For example:
--**---
library
that excel recognizes it
as hyperlinked text.
Does that make sense?
thanks!
On Sat, Mar 16, 2013 at 4:16 AM, Marc Girondot marc_...@yahoo.fr wrote:
Le 15/03/13 12:53, Brian Smith a écrit :
Hi,
I was wondering if it is possible to create a hyperlink in a csv file
using
R code and some
Hi,
I was wondering if it is possible to create a hyperlink in a csv file using
R code and some package. For example, in the following code:
links - cbind(rep('Click for Google',3),http://www.google.com;)
write.table(links,'test.csv',sep=',',row.names=F,col.names=F)
the web address should be
Hi,
I was wondering if it is possible to create a hyperlink in a csv file using
R code and some package. For example, in the following code:
links - cbind(rep('Click for Google',3),google search address goes here)
## R Mailing list blocks if I put the actual web address here
Hi,
My apologies for the naive question!
I have three overlapping sets and I want to find the probability of finding
a larger/greater intersection for 'A intersect B intersect C' (in the
example below, I want to find the probability of finding more than 135
elements that are common in sets A, B
Hi,
I wanted to change the order of how the plots appear in a multiplot
scenario. For example, in the code below:
#
pdf('test.pdf',width=8,height=8)
par(mfrow = c(2,2))
for(i in 1:2){
v1 - sample(1:1000,50)
v2 - sample(1:1000,50)
mat - cbind(v1,v2)
plot(v1,v2)
boxplot(mat)
}
Thanks Rui! That worked.
On Sat, Mar 9, 2013 at 4:22 PM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
Instead of mfrow use mfcol and the order becomes col by col.
Hope this helps,
Rui Barradas
Em 09-03-2013 20:55, Brian Smith escreveu:
Hi,
I wanted to change the order of how
Hi,
I am trying to append tables on file with this sample code:
for(i in 1:2){
mat - data.frame(sample(1:30,9),3,3)
colnames(mat) - letters[1:3]
ifelse(i ==
1,write.table(mat,paste('test.txt',sep=''),row.names=F),
,col.names=F,append=TRUE)
}
}
Hope that helps,
Louis
On Fri, Feb 8, 2013 at 2:40 PM, Brian Smith bsmith030...@gmail.com
wrote:
Hi,
I am trying to append tables on file with this sample code:
for(i in 1:2){
mat - data.frame(sample(1:30,9),3,3
Ah, I didn't know this! Thanks Ben.
On Fri, Feb 8, 2013 at 10:18 AM, Ben Tupper btup...@bigelow.org wrote:
Hi,
On Feb 8, 2013, at 9:40 AM, Brian Smith wrote:
Hi,
I am trying to append tables on file with this sample code:
for(i in 1:2){
mat - data.frame(sample(1
Hi,
I was using Gviz package to create a boxplot. I understand that Gviz uses
panel.bwplot to create the boxplot.
Is there any way that I can remove the dashed line surrounding each pair of
boxplots?
Here is some sample code:
#
library(Gviz)
thisdata -
Hi,
I was trying to make another legend for the rug plot. Sample code:
library(ggplo2)
ids - paste('id_',1:3,sep='')
before - sample(9)
after - sample(1:10,9)
dat - as.matrix(cbind(before,after))
rownames(dat) - rep(ids,3)
position - c(rep(10,3),rep(13,3),rep(19,3))
mdat -
Hi,
I was trying to create a dendrogram using ggplot2. Everything seems to be
looking ok except that the text labels are too close to the dendrogram (in
the example below, 'a','b', ..). Is there a way that I can put a little gap
between where the dendrogram ends and the label begins?
thanks!!
Hi,
I was trying to change some code in an existing package. I downloaded the
source package (say 'package_xx') from CRAN, and changed the R code
provided in the /package_xx/R/xx.R. I then saved the changes and did the R
CMD INSTALL -l /path to modified package/.
Do I need to do something else
)
=
thanks!
On Mon, Apr 16, 2012 at 3:09 PM, Brian Diggs dig...@ohsu.edu wrote:
On 4/16/2012 7:31 AM, Brian Smith wrote:
Hi,
I was trying to replicate one of the graphs given on the ggplot2 website.
I
have given a sample code below. I would like to combine the legends, since
each color
Hi,
I was trying to replicate one of the graphs given on the ggplot2 website. I
have given a sample code below. I would like to combine the legends, since
each color is uniquely mapped to a shape.
###
library(ggplot2)
leaves - letters[1:8]
mat -
Hi,
I was trying to get an image/pdf of a sequence of colors in the order given.
For example:
myCols - c('#BF','#BF','#FF','#FF','#BF','#FF')
I'd like to make a strip of colors as they appear in the order above and
save it as a pdf file. Is there a function in the base
/2011 10:32 AM, Brian Smith wrote:
Hi,
I was trying to get an image/pdf of a sequence of colors in the order
given.
For example:
myCols- c('#BF','#BF','#**FF','#FF','#BF','#**
FF')
I'd like to make a strip of colors as they appear in the order above and
save
Hi,
I had a large file for which I require a subset of rows. Instead of reading
it all into memory, I use the awk command to get the relevant rows. However,
I'm doing it pretty inefficiently as I write the subset to disk, before
reading it into R. Is there a way that I can read it into an R
Got it. Thanks!
On Mon, Oct 17, 2011 at 9:40 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote:
On Mon, 17 Oct 2011, Brian Smith wrote:
Hi,
I had a large file for which I require a subset of rows. Instead of
reading
it all into memory, I use the awk command to get the relevant rows
Hi,
I wanted to change the default colors appearing in boxplot. For example, the
following code (from the package/documentation):
===
library(ggplot2)
p - ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot(aes(fill = factor(am)))
===
Gives the default colors. What do I
Hi,
I was trying to overlay/combine two freqpoly plots. The sample code below
illustrates the problem. Essentially, I want to do is:
1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2').
Currently, all the lines in Plot 1 have different colours and all the lines
in Plot 2 have
colour for the
second set of distributions. Does that make sense?
thanks!
On Thu, Sep 8, 2011 at 11:26 AM, Ista Zahn iz...@psych.rochester.eduwrote:
Hi Brian
On Thu, Sep 8, 2011 at 10:30 AM, Brian Smith bsmith030...@gmail.com
wrote:
Hi,
I was trying to overlay/combine two freqpoly
Hi,
I was trying to install the package Rmpi on a hpc cluster running SGE. The
command, and the sessionInfo() is as follows:
===
install.packages(Rmpi,dependencies=TRUE)
also installing the dependency rsprng
trying URL '
Hi,
Sorry for the naive question, but what exactly does the 'Adjusted R-squared'
coefficient in the summary of linear model adjust for?
Sample code:
x - rnorm(15)
y - rnorm(15)
lmr - lm(y~x)
summary(lmr)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-1.7828
Hi,
I wanted to check the difference in results (using lme4) , if I treated a
particular variable (beadchip) as a random effect vs if I treated it as a
fixed effect.
For the first case, my formula is:
lmer.result - lmer(expression ~ cancerClass + (1|beadchip))
For the second case, I want
67 matches
Mail list logo