Hi,
I'd like to use R to produce the following plot:
dotplot.jpeg http://r.789695.n4.nabble.com/file/n4672628/dotplot.jpeg
This was constructed using StatKey at:
http://www.lock5stat.com/statkey/bootstrap_1_quant/bootstrap_1_quant.html
On 07/30/2013 04:21 PM, David Arnold wrote:
Hi,
I'd like to use R to produce the following plot:
dotplot.jpeghttp://r.789695.n4.nabble.com/file/n4672628/dotplot.jpeg
This was constructed using StatKey at:
http://www.lock5stat.com/statkey/bootstrap_1_quant/bootstrap_1_quant.html
Dear Cecilla!
On 22 July 2013 14:08, Cecilia Carmo cecilia.ca...@ua.pt wrote:
I have the following model:
Cost of debt = intercept + information quality + control variable1
+ control variable2 + … + error term
I want to perform 2sls because I think I could have two situations:
First: maybe
I have an xyf object from the kohonen package, and wish to plot a
lattice or grid or multiplot of a set of attributes of this object.
I've included the structure of the object below for reference, and
here is the set of plots I wish to produce, given in long-hand. I
don't know enough R to
Hello,
Maybe the following does it.
op - par(mfrow=c(2, 3))
for(i in 1:6){
plot(somdata.xyf,
type=property,
property=somdata.xyf$codes$X[, i],
main=colnames(somdata.xyf$codes$X)[i])
}
par(op)
Hope this helps,
Rui Barradas
Em 30-07-2013 10:33,
Dear All
please provide your insigths on the following:
I have:
a -c(1/1/13,15,20)
b -c(1/5/13,15,25)
c -c(1/9/13,15,28)
d -c(2/1/13,18,30)
e -c(2/5/13,18,35)
f -c(2/9/13,18,38)
x -matrix(c(a,b,c,d,e,f),ncol=3,byrow=TRUE)
What I would like to do is to eliminate certain rows of this matrix
Hi,
If the rows are already ordered:
x1- as.data.frame(x)
x[with(x1,ave(seq_along(V2),V2,FUN=function(x) !x%in%min(x)))==1,]
# [,1] [,2] [,3]
#[1,] 1/5/13 15 25
#[2,] 1/9/13 15 28
#[3,] 2/5/13 18 35
#[4,] 2/9/13 18 38
#otherwise
On Jul 30, 2013, at 7:13 AM, Andras Farkas wrote:
Dear All
please provide your insigths on the following:
I have:
a -c(1/1/13,15,20)
b -c(1/5/13,15,25)
c -c(1/9/13,15,28)
d -c(2/1/13,18,30)
e -c(2/5/13,18,35)
f -c(2/9/13,18,38)
x -matrix(c(a,b,c,d,e,f),ncol=3,byrow=TRUE)
I'd like to use R to produce the following plot:
dotplot.jpeg
http://r.789695.n4.nabble.com/file/n4672628/dotplot.jpeg
x-rnorm(500)
xr - round(x, 1)
stripchart(xr, method=stack, pch=19)
will do this if the data are rounded appropriately. You may have some fun with
'appropriately'.
Hello,
Try the following.
idx - which(c(TRUE, diff(as.integer(x[,2])) != 0))
x[-idx,]
Also, note that in constructs such as
a -c(1/1/13,15,20)
both 15 and 20 are coerced to character. So your matrix is a matrix of
chars. For different types of data, use data.frames
Hope this helps,
Rui
Just a note:
If the dataset is not ordered, this could result in:
set.seed(24)
xNew-x[sample(1:nrow(x),6,replace=FALSE),]
idxN-which(c(TRUE,diff(as.integer(xNew[,2]))!=0))
xNew[-idxN,]
#[1] 2/1/13 18 30
xNew1-xNew[order(xNew[,2],xNew[,1]),]
Hello!
I have a data frame:
x-data.frame(a=c(-1,1,2,3,4),b=c(1,-1,3,4,5),c=1:5,d=2:6,e=c(1,2,3,-1,4))
x
How can I grab only those rows that don't contain any -1s (no matter in
what columns? Without writing a loop.
In other words, I want my output to contain only rows 3 and 5 of x.
Thank you
Thanks a a lot, Jose!
On Tue, Jul 30, 2013 at 10:19 AM, José María Mateos jmmat...@mce.hggm.eswrote:
2013/7/30 Dimitri Liakhovitski dimitri.liakhovit...@gmail.com:
How can I grab only those rows that don't contain any -1s (no matter in
what columns? Without writing a loop.
In other
x[rowSums(!x0)==ncol(x),] #if you don't want x0
# a b c d e
#3 2 3 3 4 3
#5 4 5 5 6 4
#or
x[rowSums(!x==-1)==ncol(x),]
# a b c d e
#3 2 3 3 4 3
#5 4 5 5 6 4
A.K.
- Original Message -
From: Dimitri Liakhovitski dimitri.liakhovit...@gmail.com
To: r-help r-help@r-project.org
Cc:
You could also use:
indx-with(x,(1+2*(a!=-1)+4*(b!=-1)+8*(c!=-1)+16*(d!=-1)+32*(e!=-1)))
x[indx==max(indx),]
# a b c d e
#3 2 3 3 4 3
#5 4 5 5 6 4
#Speed comparisons:
set.seed(548)
x1- as.data.frame(matrix(sample(c(-1,1:10),5*1e6,replace=TRUE),ncol=5))
system.time({
index - apply(x1, 1,
or
x[ !rowSums(x == -1), ]
if you are willing to tolerate the coercions and equality testing.
-- Bert
On Tue, Jul 30, 2013 at 7:30 AM, arun smartpink...@yahoo.com wrote:
x[rowSums(!x0)==ncol(x),] #if you don't want x0
# a b c d e
#3 2 3 3 4 3
#5 4 5 5 6 4
#or
I'm still a novice at R, so this may be a bit convoluted but it works:
colnames(x) = c(date, id, value)
do.call(rbind, (dlply(as.data.frame(x), .(id), function (y)
y[-c(which(as.Date(y$date, %m/%d/%y) == min(as.Date(y$date,
%m/%d/%y)), arr.ind=T)),])))
- FA
-- Original Message --
I have some irregularly spaced data points I want to interpolate (and ideally
extrapolate marginally beyond). I have been using Akima and predict surface
but this interpolates through the whole convex hull region. As this space
includes a large region where there are actually no data points I
Hi,
When we plot a Time Series object with a annual frequency, in the X axes
usually appears mark ticks with an interval of 5 years. How can customize the
X axes putting a tick for every year?
Regards
Lívio Cipriano
__
R-help@r-project.org mailing
Hi,
I am creating a list of 2 lists, one containing filenames
and the other file descriptors. When I retrieve them I am unable to close
the file descriptor.
I am getting this error when I try to call close(filedescriptors
[[2]][[1]]).
Error in UseMethod(close) :
no applicable
Hi,
I tried to use the ts function to create a Time Series object with daily
frequency but I couldn't. It's not possible or I'm not using the right
parameters?
Regards
Lívio Cipriano
__
R-help@r-project.org mailing list
Hello,
I try out to create a new form from the below data.frame.
I would like to have this form:
V3 Santiago Ourense VigoFerrol
2013-07-04 2013-07-04 07:01:04 ..
How can i get this?
str(sunrise)
'data.frame': 24
Hi all,
I am trying to build reclassification table, net reclassification
improvement ...using PredictAbel in R version 2.15.1 or 3. However when I try
to obtain reclassification table I get an error. A sample session is reproduced
below.
str(nrii)
'data.frame': 213 obs.
x[!apply(x, 1, function (y) any(y==-1)),]
-- Original Message --
From: Dimitri Liakhovitski dimitri.liakhovit...@gmail.com
To: r-help r-help@r-project.org
Sent: 7/30/2013 10:06:02 AM
Subject: [R] Select only rows that don't contain one number
Hello!
I have a data frame:
Hi David, Rui and Arun,
Thank you very much for your response, your email much help me to solve my
problem. I installed library(Epi) into my R, I can use stat.table function in R
now.
As a Biostatistician and researcher, I did some projects using R, but I used
basic R. Even though I like R
2013/7/30 Dimitri Liakhovitski dimitri.liakhovit...@gmail.com:
How can I grab only those rows that don't contain any -1s (no matter in
what columns? Without writing a loop.
In other words, I want my output to contain only rows 3 and 5 of x.
index - apply(x, 1, function (x) { !(c(-1) %in% x)})
https://github.com/hadley/devtools/wiki/Reproducibility
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston ON Canada
-Original Message-
From: dominic.r...@gmail.com
Sent: Tue, 30 Jul 2013 15:41:46 +0200
To: r-help@r-project.org
Who knows? You have not told us what you are actually doing.
https://github.com/hadley/devtools/wiki/Reproducibility
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston ON Canada
-Original Message-
From: lcmail4li...@gmail.com
geom_dotplot() in the ggplot2 package perhaps?
ggplot(mtcars, aes(x = mpg)) + geom_dotplot()
John Kane
Kingston ON Canada
-Original Message-
From: dwarnol...@suddenlink.net
Sent: Mon, 29 Jul 2013 23:21:26 -0700 (PDT)
To: r-help@r-project.org
Subject: [R] Dot plot similar to StatKey
We need to know what you actually are doing before we can suggest anything.
Have a look at these links :
https://github.com/hadley/devtools/wiki/Reproducibility
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston ON Canada
-Original
Hi,
Please use ?dput() for the example data
sunrise- structure(list(day_frac = c(Santiago, Ourense, Vigo, Ferrol,
Santiago, Ourense, Vigo, Ferrol, Santiago, Ourense,
Vigo, Ferrol), time = structure(c(1372935664, 1372935605,
1372935846, 1372935458, 1373022101, 1373022041, 1373022282,
This will appear on CRAN mirrors soon. It's my update for Spring, 2013. I keep
track of R problems that arise in the regression course and try to facilitate
them. There are functions for describing data, presenting regression plots and
tables, some regression diagnostics.
Most of the usages are
Hello,
I'm trying to convert dates in the format dd-mmm-yy using as.Date.
I have two columns like this, and it works on one but not on the other.
options(stringsAsFactors=FALSE)
ortho - read.csv(test1.csv, header=TRUE, nrows=10)
ortho
DogID BirthDate xray.date
1 11877 23-Aug-87 15-Feb-88
Dear list,
Here is a simple example in which the behaviour of 'format' does not make
sense to me. I have read the documentation and searched the archives, but
nothing pointed me in the right direction to understand this behaviour.
Let's start with a simple data frame:
df1 - data.frame(x =
Hi,
Did you checked after removing e from formate?
ortho$test.dat - as.Date(ortho$xray.date, formate=%d-%b-%y)
A.K.
- Original Message -
From: Liz Hare dogg...@earthlink.net
To: r-help@r-project.org
Cc:
Sent: Tuesday, July 30, 2013 12:00 PM
Subject: [R] as.Date with characters error
Oh! Thank you so much! Sorry to have bothered everyone with this!
Liz
On 7/30/2013 12:16 PM, arun wrote:
Hi,
Did you checked after removing e from formate?
ortho$test.dat - as.Date(ortho$xray.date, formate=%d-%b-%y)
A.K.
- Original Message -
From: Liz Hare dogg...@earthlink.net
Thanks a lot.
Still looking for some super fast and memory efficient solution, as the
matrix I have in real world has billions of rows.
On Mon, Jul 29, 2013 at 6:24 PM, William Dunlap wdun...@tibco.com wrote:
I haven't looked at the size-time relationship, but im2 (below) is faster
than your
Hello,
You should show us an example of what you're doing.
Anyway, there's an agument frequency to ?ts. Maybe you could set it
frequency = 365.
Also, see packages zoo and xts for the creation of time series objects
with real time stamps.
Hope this helps,
Rui Barradas
Em 30-07-2013 13:33,
Hello,
The standard way of customizing the x axis is
plot(..., xaxt = n)
axis(1, at = where you want the ticks)
Hope this helps,
Rui Barradas
Em 30-07-2013 13:31, Lívio Cipriano escreveu:
Hi,
When we plot a Time Series object with a annual frequency, in the X axes
usually appears mark
In that case, you should be looking at a relational inner join, perhaps with
SQLite (see package sqldf).
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
On Monday, July 29, 2013 07:47:34 AM MacQueen, Don wrote:
A recent version of the R extension manual says,
For maximal portability, the ‘DESCRIPTION’ file should be written
entirely in ASCII — if this is not possible it must contain an ‘Encoding’
field (see below).
It also says, regarding
On Jul 30, 2013, at 9:01 AM, Mathieu Basille wrote:
Dear list,
Here is a simple example in which the behaviour of 'format' does not make
sense to me. I have read the documentation and searched the archives, but
nothing pointed me in the right direction to understand this behaviour. Let's
I am not familiar with R's sort and sql libs. appreciate if you can post a
code snippet when you got time. Thanks a lot!
On Tue, Jul 30, 2013 at 10:36 AM, Jeff Newmiller
jdnew...@dcn.davis.ca.uswrote:
In that case, you should be looking at a relational inner join, perhaps
with SQLite (see
Thanks David for your interest. I have to admit that your answer puzzles me
even more than before. It seems that the underlying problem is way beyond
my R skills...
The generation of id2 is indeed quite demanding, especially compared to a
simple 'as.character' call. Anyway, since it seems to
I said:
stripchart(xr, method=stack, pch=19)
will do this if the data are rounded appropriately. You may
have some fun with 'appropriately'.
A bit of tinkering gives something that gets close to 'appropriate' (below);
you may want to tinker with the tuning factor (or, of course, write
I have a modest-size XML file (52MB) in a format suited to xmlToDataFrame
(package XML).
I have successfully read it into R by splitting the file 10 ways then
running xmlToDataFrame on each part, then rbind.fill (package plyr) on the
result. This takes about 530 s total, and results in a
Hi,
Try using trim=TRUE, in ?format()
options(digits=4)
df2 - data.frame(x = rnorm(11), y = rnorm(11), id = 1:11)
df2$id2 - apply(df2, 1, function(dfi) format(dfi[id], trim=TRUE,scientific
= FALSE))
df2$id2[0:100010]
# [1] 0 1 2 3 4 5 6
Hi:
Could anyone please let me know where I can find [R] code for implementing
MCMC with cumulative link models (i.e. for analysis of ordinal probit or
ordinal logistic models).
Thanks in advance,
Regards,
Keramat Nourijelyani, PhD
Associate Professorof
Thanks Arun for your answer. 'trim = TRUE' does indeed solve the symptoms
of the problem, and this is the solution I'm currently using. However, it
does not help to understand what the problem is, and what is the cause of it.
Can you confirm that the original problem also occurs on your
Hi Mathieu
yes, the original problem occurs in my system too. I am using R 3.0.1 on linux
mint 15. I guess the default case would be trim=FALSE, but still it looks very
strange especially in ?apply(), as it starts from 5 onwards.
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform:
I would use panel.dotplot.tb from the HH package.
It is based on lattice, hence will plot multiple groups on the same scale.
continuing with S Ellison's example
## install.packages(HH) ## if necessary
library(HH)
rpx - round.pch(x)
dotplot( ~ rpx, panel=panel.dotplot.tb, ylim=c(.98, 1.15))
On 30 July 2013 17:50:08 Rui Barradas wrote:
Maybe you could set it
frequency = 365.
No. It didn't worked. Was my first trial.
Also, see packages zoo and xts for the creation of time series objects
with real time stamps.
I'll look in to them.
Regards
Lívio Cipriano
Greetings,
Is it possible to see the source code for the acf and ccf functions? I
want to understand the exact formula used.
It may be in this book, but I am hoping I can find it elsewhere, as the
book is quite expensive.
Venables, W. N. and Ripley, B. D. (2002) *Modern Applied Statistics with
Just type
acf
ccf
on R prompt
A.K.
- Original Message -
From: Cathy Lee Gierke leegi...@umn.edu
To: r-help@r-project.org; r-core-ow...@r-project.org
Cc:
Sent: Tuesday, July 30, 2013 4:02 PM
Subject: [R] acf and ccf
Greetings,
Is it possible to see the source code for the acf and
On 07/30/2013 11:41 PM, Dominic Roye wrote:
Hello,
I try out to create a new form from the below data.frame.
I would like to have this form:
V3 Santiago Ourense VigoFerrol
2013-07-04 2013-07-04 07:01:04 ..
How
I use R 3.0.1.
#I do have that line after ` lag[lower.tri(lag)] - -1`
acf - .Call(C_acf, x, lag.max, type == correlation)
lag - outer(0:lag.max, lag/x.freq)
acf.out - structure(list(acf = acf, type = type, n.used = sampleT,
lag = lag, series = series, snames = colnames(x)),
On 07/30/2013 10:05 PM, mohan.radhakrish...@polarisft.com wrote:
Hi,
I am creating a list of 2 lists, one containing filenames
and the other file descriptors. When I retrieve them I am unable to close
the file descriptor.
I am getting this error when I try to call
Hi,
It is not clear which OS you are using. Most probably, the Directory column
would be factor.
table1- read.table(text=
ID Directory
1 /home/arunksa111/Documents
2 /home/arunksa111/Trial
3 ~/Trial1
4 ~Trial2
,sep=,header=TRUE,stringsAsFactors=FALSE)
setwd(table1$Directory[2])
getwd()
#[1]
On 30 July 2013 21:35, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
Maybe the following does it.
op - par(mfrow=c(2, 3))
for(i in 1:6){
plot(somdata.xyf,
type=property,
property=somdata.xyf$codes$X[, i],
Dear R People:
I am trying to install rJava on an Ubuntu 13.04 64 bit system. But the
Java part is causing me fits. Here is the code:
install.packages(rJava,depen=TRUE)
Installing package into /home/erin/R/x86_64-pc-linux-gnu-library/3.0
(as lib is unspecified)
--- Please select a CRAN
It is really strange what I see on this output. Your machine is 64 bit
(i386) and the libjvm is being compiled to 32 bit (I do not know what could
elicit such behavior).
Can you try and JDK 6 version?
I am on a ubuntu 12.04 64 bit and I have rJava:
orvaquim@orvaquimcism:~$ R CMD javareconf -e
You can install it from Michael Rutter's PPA:
sudo apt-add-repository -y ppa:marutter/c2d4u
sudo apt-get update
sudo apt-get install r-cran-rjava
The last time I tried the official Ubuntu repository, rJava still did
not work under R 3.0.x (because R 3.0.x requires recompiling all R
packages).
62 matches
Mail list logo