library(lattice)
library(latticeExtra)
tmp <- data.frame(a=1:20, b=LETTERS[rep(1:5,c(2,4,3,4,7))],
cc=letters[rep(1:2, c(6,14))])
tmp
bwplot(a ~ b | cc, data=tmp)
bwplot(a ~ b | cc, data=tmp, scales=list(x=list(relation="free")))
resizePanels(bwplot(a ~ b | cc, data=tmp,
scales=list(x=list(relation
Hi David,
Thanks for your answer.
However I was thinking if it would be possible to have the Vertical-scroll
bar, so that user can scroll his screen while still having all the bars on
the plot clearly.
Is there any possibility?
Thanks and regards,
On Tue, Aug 6, 2013 at 2:38 AM, David Carlson
It doesn't seem "messed up." You can't expect to plot two thousand
bars on a graph and really see anything. On my monitor, there are
only about 680 vertical pixels on the plot window, you are trying to
plot 3 bars for each row of dots on the monitor!
Try this (just the first twenty lines of your d
Together with Kate Mullen and Achim Zeileis I am on the board of the Foundation
for Open Access Statistics (FOAS), a nonprofit public benefit corporation
registered in California. We have applied for federal tax-exempt status under
Internal Revenue Section 501(c)(3). FOAS has a worldwide mission
Dear Darrell,
Regarding the Error, I think it is the space issue.
dat1[c(TRUE,(diff(dat1$value)<-100)|(diff(dat1$value)>200)),]
Error in diff(dat1$value) <- 100 : could not find function "diff<-"
res<-dat1[c(TRUE,(diff(dat1$value)< -100) | (diff(dat1$value)>200)),]
... and also have a look at ?dotplot.
-- Bert
On Mon, Aug 5, 2013 at 1:29 PM, Bert Gunter wrote:
> If you insist on bars instead of points, then have a look at the type
> ="h" argument to plot.default().
>
> In general, designing an effective plot typically depends both on the
> nature of the su
If you insist on bars instead of points, then have a look at the type
="h" argument to plot.default().
In general, designing an effective plot typically depends both on the
nature of the subject matter, the data, and the intended audience, so
it is difficult (for me, anyway) to give a useful gener
Try fitdistr in package MASS or fitdist in package
fitdistrplus or goodfit in package vcd.
Also
?shapiro.test
?ad.test
?chisq.test
There is also Vito Ricci's "Fitting Distributions with R" in
the contributed documentation for R at
http://cran.r-project.org/doc/contrib/Ricci-distributions-en.p
Hello again,
Please consider my data-frame:
My_DF <- data.frame(Names = as.character(1:2000), Values = 1:2000)
Now I want to create a Horizontal bar plot for this data:
barplot(My_DF$Values, main="Bar Plot", horiz=TRUE, names.arg=My_DF$Names)
You see the entire plot is messed-up. As I have to
Here's one way to extend the code to groups of 4 as well ...
Jean
# 3
df2 <- df
names(df2) <- paste0("new", 1:2)
df3 <- merge(df2, df, by.x="new2", by.y="V.1")[, c(2, 1, 3)]
names(df3) <- paste0("new", 1:3)
df3
# 4
df4 <- merge(df3, df, by.x="new3", by.y="V.1")[, c(2, 3, 1, 4)]
names(df4) <- pa
On 05 August 2013 11:11:22 Phil Spector wrote:
> but most functions in R
> that provide p-values make it possible to extract the p-value
from the
> result of the function call without using any text
Thanks for your answer. In fact it's the simple way to do it.
Regards
Lívio Cipriano
Hmmm. I'm not sure why you prefer 20-30 lines of looping code over a
simpler 1 line solution, but, as you wish.
merge(df, df, by.x="V.2", by.y="V.1")[, c(2, 1, 3)]
Jean
On Mon, Aug 5, 2013 at 12:37 PM, PQuery wrote:
> Hello Jean,
>
> Thanks for the reply. However, you solution doesn't reprod
If you were to follow the recommendations in the footer of this email, you
might get some better options than using grep.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#
Hi,
I tried to fit a model using a timecox function in R version
3.0.0, using sTRACE data present in survival package.
If I use the 2.9.0 version, I don't have problems, but in
3.0.0 version, I get the following error message:
out <- timecox(Surv(time/365, status==9) ~
age+sex+diabetes+ch
Not sure I understand the problem.
dat1<- read.table(text="
gene ZPT.1 ZPT.0 ZPT.2 ZPT.3 PDGT.1 PDGT.0
XLOC_01 3516 626 1277 770 4309 9030
XLOC_02 342 82 185 72 835 1095
XLOC_03 2000 361 867 438 454 687
XLOC_04 143 30 67 37 90 236
XLOC_05 0 0.21
Hi,
My question is how to auto adjust panel width according to number of box plots
in bwplot. I mean if a panel has 10 box plots and another has only two, I need
to make the later panel thinner than the first. I am familiar with panel.width
and layout.widths params but couldn't work it in my c
Dear Salaam,
In your ARIMA (2,3,0), you are telling R you are saying that the order of
differencing is 3. Have you chequed that you actually differenced the
series with d = 3?
Regards,
2013/8/5 Salaam Batur
> Dear R users,
>
> I picked up ARIMA(2,3,0) model for my time series analysis using
Hello Bert,
Thank you for your comments. I want to actually fit a formal statistical
distribution to my data using the classical methodologies (either Shapiro
Wilk, Anderson Darling, Chi-Square, etc.). Once I have fitted a
distribution then I will start generating random numbers and performing the
Just sample with replacement from your empirical distribution? See:
?sample ## note the "replace" argument
Other than that, I do not understand what you mean by "distribution
fitting analysis."
Cheers,
Bert
On Mon, Aug 5, 2013 at 10:55 AM, Paul Bernal wrote:
> Hello everyone,
>
> Basically, I
try this:
> x <- "p-value = 0.0765"
> sig <- as.numeric(sub(".*=(.*)", "\\1", x))
>
> sig
[1] 0.0765
>
On Mon, Aug 5, 2013 at 10:41 AM, Lívio Cipriano wrote:
> Hi,
>
> I'm writing some R scripts and I would like to grab outputs from R
> functions
> to control if tests. Example, one function o
Hello everyone,
Basically, I want to perform some distribution fitting analysis to a
particular data that I have.
So the data I will be working with is structured as follows:
*Vessel Size* * Number of Vessels*
*Frequency*
1000-2000 TEUS
On Mon, 05 Aug 2013, Qiang Wang writes:
>> On Sat, Aug 3, 2013 at 3:49 PM, Enrico Schumann
>> wrote:
>>
>>> On Fri, 02 Aug 2013, Qiang Wang writes:
>>>
>>> > Hi,
>>> >
>>> > I'm struggling with encode/decode strings in R. Don't know why the second
>>> > example below would fail. Thanks in advan
Hello Jean,
Thanks for the reply. However, you solution doesn't reproduce the output
that I desire.
I updated my post with my solution full of loops.
If there is a more fancy/elegant way, I'll take it.
Best,
--
View this message in context:
http://r.789695.n4.nabble.com/obtain-triplets-fr
I use read.table(file.choose () and that it's work
thanks
Le 5 août 2013 à 19:05, David Carlson a écrit :
> You should copy the exact command you used, but it appears
> that your working directory does not contain the file. Make
> sure you are in the correct directory with
>
> getwd()
>
> t
One could get in the habit of typing
conflicts()
from time to time.
Or perhaps
conflicts(,TRUE)$.GlobalEnv
Various ways of semi-automating this come to mind, such as putting it in
one's .Rprofile file.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Liv
On Aug 5, 2013, at 10:14 AM, John Kane wrote:
> No you don't need another format. read.table is the same on any operating
> system.
>
> What is your actual command and what error messages if any?
>
> It may be a path problem.
>
On a Mac you can click-hold-drag a file from the Finder window
No you don't need another format. read.table is the same on any operating
system.
What is your actual command and what error messages if any?
It may be a path problem.
John Kane
Kingston ON Canada
> -Original Message-
> From: clemence.germa...@gmail.com
> Sent: Mon, 5 Aug 2013 17:31:
You should copy the exact command you used, but it appears
that your working directory does not contain the file. Make
sure you are in the correct directory with
getwd()
then change to the correct directory with
setwd("directory where data1.txt is located")
or select the file interactively wit
Dear R users,
I picked up ARIMA(2,3,0) model for my time series analysis using
auto.arima() function.
>From my understanding, the model should be in this shape:
[Y(hat)(t)-Y(t-1)]-2[Y(t-1)-Y(t-2)]+[Y(t-2)-Y(t-3)]=Theta(1){[(Y(t-1)-Y(t-2)]-2[(Y(t-2)-Y(t-3)]+[Y(t-3)-Y(t-4)]}+Theta(2){[Y(t-2)-Y(t-3
HI,
Please use ?dput() to show a reproducible example.
set.seed(45)
dat1<- data.frame(date=
format(seq(as.Date("01-01-1947",format="%m-%d-%Y"),as.Date("02-01-1947",format="%m-%d-%Y"),by=1),"%m/%d/%Y"),value=sample(1800:2400,32,replace=FALSE))
dat1[c(TRUE,(diff(dat1$value)< -100) | (diff(d
Hi
It's the first time I use R on mac, before I used on Windows, so I can't have
my data when I have the function : read.table, my file is maned : data1.txt
Do I use another format for my file?
And when I trie list.file I have this answer : character(0) but I know where my
file is on my comput
> %in% doesn't generally mean 'nested in' in R. It is a set membership test
In a formula (involving a tilde) given to lm() or glm() %in% generally does
mean nesting.
> attr(terms(y ~ (x1+x2) %in% (x3+x4+x5)), "term.labels")
[1] "x1:x3:x4:x5" "x2:x3:x4:x5"
but the "|" operator stops terms() fr
On Aug 5, 2013, at 4:11 AM, Asis Hallab wrote:
> Dear R experts,
>
> I have a large table saved in a file called "plant_genome.gff". The
> file has 481848 lines in nine columns, which are TAB delimited, and is
> 53 MegaBytes large.
> For anyone who might know the GFF3 format: The table holds a p
In Line
John Kane
Kingston ON Canada
> -Original Message-
> From: i...@software-solutions.nl
> Sent: Mon, 5 Aug 2013 06:57:30 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] Retreiving correct data from combining two datasets
>
> Hi all,
>
> I have two datasets:
>
> Dataset 1 -
I like very much the solution proposed by Paul Murrell to mask the ocean
(in fact, all that is not the country displayed) in a plot. It works
pretty well for Australia. However, when I try to apply the same code
for France, it fails. I search for the reason but I can't find. Here is
the code fo
You might try posting to R-devel to get a response. Looking at
the source for heatmap, it does seem to be a "feature" rather
than a bug since the cluster analysis is performed well before
any scaling is applied. Would heatmap(scale(X)) accomplish
what you want?
---
Hello,
I get a strange compilation error when compiling a cfunction() inline when my C
code functions are compiled in a list with other functions, but not when they
are compiled by themselves. Here is an example:
# begin "test.R"
library(inline)
a.sig <- signature(a1="integer")
a.body <- " i
Please specify a reproducible example, i.e. what you did exactly, all
the way before the error message.
Best,
Uwe Ligges
On 05.08.2013 17:06, Nash, Charles T C wrote:
Using:
R version 3.0.1 (2013-05-16) -- "Good Sport"
Platform: x86_64-w64-mingw32/x64 (64-bit)
OpenBUGS version 3.2.2 rev 1063
Please try with a recent version of R. Yours is 6 major updates behind
Best,
Uwe Ligges
On 05.08.2013 16:11, Kishor Tappita wrote:
Dear R-Users,
I am trying to install RDCOMClient package as it is a dependency for
installing excel.link package. I get the below error while trying to
instal
Using:
R version 3.0.1 (2013-05-16) -- "Good Sport"
Platform: x86_64-w64-mingw32/x64 (64-bit)
OpenBUGS version 3.2.2 rev 1063
BRugs version 0.8-1
Hi there,
When using the modelCompile() function in BRugs package I get the following
error:
Error in handleRes(res) : NA
In addition: Warning mess
Hi all, I am trying to add a new column to each data frame of a list
with the results of adding the first two columns. I am trying to do this
with sqldf, but I have not been successful. I am using SQLite as my
driver.
This is the code that I have:
q10 = paste("ALTER TABLE getratingsmore[[1]] ADD
Dear R-Users,
I am trying to install RDCOMClient package as it is a dependency for
installing excel.link package. I get the below error while trying to
install RDCOMClient on 64-bit Windows 7 operating system.
g++ -I"D:/R-2.10.0/include" -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.
-Wno-deprecated
Hi all,
I have two datasets:
Dataset 1 - List of Users, the layout looks like this:
ID Name C1 C2 C3 C23 C24 C25
Dataset 2 - List of Codes, the layout looks like this:
Code Description Category
The code fields in the user-dataset do not have to contain a value and if
they have
Hi,
You could use this, but it would be slow.
"""
# I know functions like e.g. 'apply' but don't know how to use them for
the solution of the following problem:
"""
lst1<-split(seq_along(b),rep(unlist(a),unlist(a)))
res<-cbind(r,sapply(lst1,function(i)
{x1<-b[,i];sapply(split(as.matrix(r),row(r)
Hi,
I don't see any answers to this, so let me offer a few suggestions.
Do you call dev.off() at the end of your plotting code? That seems
most likely, since you omit it here.
If that doesn't solve your problem:
What OS and version of R are you using?
If you use the default device for your OS d
At first, I would like to plot the survival curves. After that , the main
use will be to calculate conditional probabilities - given that an
individual already survived x days, what will be the chance it survives
till day ,e.g., 100.
I 've already found a solution, though.
Of the - non-subscribed
Hi,
I'm writing some R scripts and I would like to grab outputs from R functions
to control if tests. Example, one function outputs something like "p-vale =
0.0765" and I want to program the following pseudo code in R
sig = grep pvalue
if (sig > 0.05)
a()
else
b()
Should I use
This is a bit simpler. The function quantile() labels the
output whereas fivenum() does not:
aggregate(Age ~ Generation + Zygosity + Sex + Cohort +
ESstatus, data=x,
function(x) c(mean=mean(x), sd=sd(x), quantile(x)))
-
David L Carlson
Associate Professor o
Please do not send in HTML. The list strips out any HTML and as a result your
message is close to unreadable. It will look fine in Nabble but many (most)
R-help readers do not use nabble and some actively dislike it. It is usually
better to send directly to the list.
Also we probably could use
Thomas,
Here's a little bit of code to get you started. You can use the dist()
function to calculate the absolute differences between all pairs of rows,
then divide by 2 (as you requested), then convert the distance matrix to a
vector. Do this for both groups of columns, and use cbind() to combi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 8/5/13 1:00 PM, Anindya Sankar Dey wrote:
> Hi All,
>
> I applied the naiveBayes function in e1071 package with the iris
> data, and here's the list that was created
>
> structure(list(apriori = structure(c(50L, 50L, 50L), .Dim = 3L,
> .Dimnam
Hi Vivek,
dat1<- read.table(text="
gene ZPT.1 ZPT.0 ZPT.2 ZPT.3 PDGT.1 PDGT.0
XLOC_01 3516 626 1277 770 4309 9030
XLOC_02 342 82 185 72 835 1095
XLOC_03 2000 361 867 438 454 687
XLOC_04 143 30 67 37 90 236
XLOC_05 0 0 0 0 0 0
XLOC_06
Hi all!
I have this recurrent problem with SIAR: I am trying to run the model on a 3
isotope - 4 sources set of data that is divided in three groups. When I try
siarplotdata, it only plots 1 group, or rather, it plots all three groups as
one. I have tried using all the arguments in the function as
Dear JM,
creating a data frame did indeed solve my problem. Thank you so much.
Best wishes
Bernd
Von: zelfortin [mailto:jmichel.for...@gmail.com]
Gesendet: Freitag, 2. August 2013 22:10
An: r-help-arch...@googlegroups.com
Cc: r-help@r-project.org; Puschner, Bernd
Betreff: Re: [R] l
Try this:
merge(df, df, by.x="V2", by.y="V1")
Jean
On Mon, Aug 5, 2013 at 1:26 AM, PQuery wrote:
> Hi Guys,
>
> I have a list elements in two columns of a data frame. I want first to
> subselect on V1 and then to form and count all possible and unique triplets
> of V1 with the corresponding
Dear Jim,
2013/8/5 jim holtman :
> Couple of things to try. May have an extra quote, so put:
>
> quote = ''
thank you very much. That did the trick.
Much obliged!
>
> as one of the parameters. Also, might have comments, so try:
>
> comment.char = ""
>
> Take alook at your file and determine
Can you give an example of what your final product would look like? I'm
not exactly sure what you mean by triplets of features.
Assuming your data frame is called "df", the code below subsets those with
a score > 0.6 and then groups the rows by unique Scaff and Cat. This might
help you get start
Couple of things to try. May have an extra quote, so put:
quote = ''
as one of the parameters. Also, might have comments, so try:
comment.char = ""
Take alook at your file and determine what line was the last complete one
and see if there might be a problem in that line, or preceeding ones.
> Code I have used thus far without being able to replicate the
> data includes:
>
> Fm<-lmer(Score~(1|Line%in%Set)+Set+(1|Block))
> (I figured out how to get a p-value, but it didn't yield the
> same results as those obtained in SAS)
%in% doesn't generally mean 'nested in' in R. It is a set m
Dear R experts,
I have a large table saved in a file called "plant_genome.gff". The
file has 481848 lines in nine columns, which are TAB delimited, and is
53 MegaBytes large.
For anyone who might know the GFF3 format: The table holds a plant
genome's annotation.
If I read in the table with
read.t
Hi All,
I applied the naiveBayes function in e1071 package with the iris data, and
here's the list that was created
structure(list(apriori = structure(c(50L, 50L, 50L), .Dim = 3L, .Dimnames =
structure(list(
Y = c("setosa", "versicolor", "virginica")), .Names = "Y"), class =
"table"),
tab
Hi all,I have two datasets:*Dataset 1 - List of Users:*ID Name C1 C2 C3
C23 C24 C25*Dataset 2 - List of Codes*Code Description
CategoryThe code fields in the user-dataset do not have to contain a value
and if they have a value they dont have to correspond with the
Codes-dataset.Now I ne
On 08/05/2013 04:45 PM, Ruth Chan wrote:
I would like to teach my students to do a simple kite diagram with some
simulated data.
...
I would like to use Altitude as a proxy for distance and I have 2 readings
for each altitude: one to the supposed right and one to the supposed left
of the transec
On 05-08-2013, at 10:32, Salaam Batur wrote:
> Dear Berend,
>
> I am using R version 3.0.1 and I loaded code packages below
>
> library(TSA)
> library(lattice)
> library(stats)
> library(utils)
> library(forecast)
>
> I reisntalled R and loaded packages 'steries' and 'forecast' as you
> sugg
-- Forwarded message --
From: Jurgens de Bruin
Date: 2 August 2013 08:51
Subject: Re: [R] Highlight selected bar in barplot
To: Greg Snow <538...@gmail.com>
Hi,
Apologies for the late reply...
Attached is a dataset. Hope this help.
So I draw a barplot based on the dataset. The
When clustering I would do something like
plot(hclust(dist(scale(X
In case of heatmap and heatmap.2 it seems to me that for the dendrograms
plot(hclust(dist(X)))
is done
while for the heatmap
image(scale(X)) is done.
I would say this is a bug however, because this is consistent among
the h
library(vars)
data(Canada)
mod <- VAR(Canada, p = 2, type = "both")
apply(resid(mod), 2, sd)
See also, ?summary and in particular the returned list element 'covres'.
HTH,
Bernhard
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
Auftra
On 05-08-2013, at 07:47, Salaam Batur wrote:
> Dear R users,
>
> I am having a problem using forecast.Arima fuction. Here is the whole code:
>
> d=scan("D:/Data.txt")
> d
> D=ts(data=d, start=1981,end=2012, frequency=1)
> D
> Time Series:
> Start = 1981
> End = 2012
> Frequency = 1
> [1] 384
68 matches
Mail list logo