Hi,
I know that according to plot theory, one should not have two y-axis. It is
just that in my field, we are often depending on plots where water depth is
plotted in one y-axis and other parameters such as salinity on the other y-axis
to see where the halocline (the depth where the two layers
I am a new user of the R spatstat package and am having problems creating a
polygonal observation window with owin(). Code follows:
library("maps")
library ("sp")`
library("spatstat")
mass.map <- map("state", "massachusetts:main", fill=T) # This returns
a data frame includding x and y components t
I am a new user of the R spatstat package and am having problems creating a
polygonal observation window with owin(). Code follows:
library("maps")
library ("sp")`
library("spatstat")
mass.map <- map("state", "massachusetts:main", fill=T) # This returns
a data frame includding x and y components t
Dear All
I have fitted the following glmm:
cmai ~ time.f * intrv.f + (1 | nhome.f/Res_Code.f)
with poisson distribution, using both glmer and glmmadmb.
But the estimation for the fixed and random effects were different, i.e.
> summary(lmer.AGGREG.cmai.out3)
Call:
glmmadmb(formula = c
Hello,
Asking help for homework is prohibited on this list.
Regards,
Pascal
2013/9/19 Guy Wachsman
> Hi Pascal,
>
> The first reason is that it was a homework assignment, the second it
> that this function is based on the algebraic equation for correlation
> matrix (given to us by the instr
Thank you for all your help. I'm still not able to figure out how automate
downloads from online websites.
This is a daily function to download the needed data. I would also like to
be able to do this on other websites such as:
http://ets.aeso.ca/ets_web/docroot/Market/Reports/HistoricalReportsS
Ok,many thanks for your detailed answer.
At 2013-09-18 19:20:26,"Duncan Murdoch" wrote:
>On 13-09-18 1:38 AM, meng wrote:
>> Oh,yes, I found out this according to your reply.Thanks.
>>
>> As to time series analysis, in order to show the effect of smoothing or
>> filtering,the common comman
Hello -
I am looking for a function that would allow me to replace specific columns
in one data frame with columns in another data frame using a grouping
variable.
df <- read.csv("data.csv", header=T)
df1 <- aggregate(df[, c(8,9,10,11,12,27,28)], by=list(df$ID),
FUN=function(x) sub("(.*):", "\\1.
Hello,
This function doesn't exist in any package. I found it using a web search
engine (estimated time, 30sec):
http://stackoverflow.com/questions/7971513/using-one-data-frame-to-update-another
Regards,
Pascal
2013/9/19 Alecia M Moser
> Hello -
>
> I have read about a function, replace.df()
Hello -
I have read about a function, replace.df(), that is available in base R. It
seems ideal since it would allow me to replace specific columns in one data
frame with columns in another data frame, while keeping all other columns
intact. The problem is that replace.df() does not seem to exist
I've developed a new graphics library, BDGraphs, designed for "big"
data, meaning any data large enough to cause major screen clutter and
overplotting if the points are plotted individually.
The library includes a novel approach to parallel coordinates, and some
methods I introduced in my JSM talk
Hi,
Try:
rbindlist(list(list(a=NA_integer_,b=NA),list(a=20,b=FALSE)))
# a b
#1: NA NA
#2: 20 FALSE
A.K.
- Original Message -
From: Saptarshi Guha
To: "R-help@r-project.org"
Cc:
Sent: Wednesday, September 18, 2013 6:56 PM
Subject: [R] rbinlist for data.table and specifying t
Hello,
You can use the function "circlefit" from "pracma". The example is adapted
from the help page to fit your data.
#---
require(pracma)
xp <- c(113, 143, 184, 229, 290, 342, 393, 456, 540, 618)
yp <-
I would stay away from learning about 'while' and 'if' until you
understand using '[' to select subsets. Subsetting is in chapter 2
of "An Introduction to R" and 'while' and 'if' are in chapter 9 for
good reason.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message
Hello,
I am just wondering why to reinvent the wheel?
Regards,
Pascal
2013/9/19 wacguy
> Ok, Thanks foe the answer, Ken:
>
> *1L, 2L etc are integers. (That is, identical to as.integer(1) ,
> as.integer(2) etc)
>
> Using integers (instead of "numeric" type) is more efficient as here
> they're
I'd suggest you ask this question on r-sig-geo
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 9/18/13 9:44 AM, "jas" wrote:
>
>
>Hello all,
>
>I am trying to do a one-to-many Spatial Join with PolyLines and Polygons.
>
hello,
This
rbindlist(list(list(a=NA,b=NA),list(a=20,b=FALSE)))
returns
a b
1: NANA
2: TRUE FALSE
as per the documentation ?rbindlist
is there a way to specify the column class of 'a' to be numeric?
In actual usage, i wont be able to re-order the 2nd list entry to be the
firs
Thanks a lot to you both.
Both solutions work great, and thanks to will for explaining how this
works. I will have a look into while and if statements in R tomorrow...
2013/9/18 William Dunlap [via R]
> > If I have this:
> >
> > "names" <- c("John", "Jim", "Mary", "Susan")
> > "age" <- c(16, 25
> If I have this:
>
> "names" <- c("John", "Jim", "Mary", "Susan")
> "age" <- c(16, 25, 32, 56)
> "income" <- c(2000, 3000, 2500, 1500)
> "all"<- data.frame(names, age, income)
First, things will be easier for you if you make that dataset as
all <- data.frame(
names = c(
Hi everyone
I'm new to R, so this is probably a stupid question, but I looked around for
quite a while an couldn't find an answer. Basically I'm trying to print
values that correspond to a found maximum.
If I have this:
"names" <- c("John", "Jim", "Mary", "Susan")
"age" <- c(16, 25, 32, 56)
"inco
Ok, Thanks foe the answer, Ken:
*1L, 2L etc are integers. (That is, identical to as.integer(1) ,
as.integer(2) etc)
Using integers (instead of "numeric" type) is more efficient as here they're
used as indexes and would be converted to integer anyway.
Compare
> is(1)
... and
> is(1L)
1L:p is
I am currently working a meta-analysis that is exploring the effect of a drug
on plasma lipid levels. However, I am primarily interested in assessing the
overall dose-response relationship with mean change in lipids. I have used the
metafor package to conduct a meta-regression but is there a way
Hello all,
I am trying to do a one-to-many Spatial Join with PolyLines and Polygons. I
have about a couple of thousands of PolyLines (streets) and I want to assign
them all the Polyogons (regions) they cross or touch.
I know this is possible in ArcGIS, do you have any idea how this is possible
Hi there,
I have recently installed the latest R version 3.0.1, replacing the previous
version 2.15.2.
Just as I am running R I get a few warnings about packages that I have
previously used.
Below I attach the session info a long with the warnings I am getting.
What does these warnings mean?
Hi there,
I want to know the radius of curvature for a set of points, but cannot
figure out how to perform the fit in R.
I have a set of points P_i for which I want to calculate the radius of
curvature. The coordinates (x_i|y_i) of the points in a data.frame:
p <- data.frame(
x = c(113, 143,
Hi,
Try:
all[which.max(all$income),c('names','age')]
# names age
#2 Jim 25
A.K.
Hi everyone
I'm new to R, so this is probably a stupid question, but I looked
around for quite a while an couldn't find an answer. Basically I'm
trying to print values that correspond to a found maximum.
I
The code below uses ggplot with stat_smooth(method="glm",
family=binomial, ...)
to plot the data on survival of passengers on the Titanic, with the
logistic regression
curves for each sex on the scale of Pr(survived). This works (quite
nicely!) because
I've explicitly transformed the factor su
On possible way, if I understand the question correctly, is to use the
findInterval() function.
Otherwise, solutions depend on details you haven't included.
Here's an example from ?findInterval
x <- 2:18
v <- c(5, 10, 15) # create two bins [5,10) and [10,15)
cbind(x, findInterval(x, v))
T
You need to tell us what the objects are. Are they vectors of some
type of data? If so, what type, etc..
At least provide a subset of the data using 'dput' so we know what we
are looking at.
The 'if' statement will work fine is the objects are single valued;
you will need a different syntax
Hi,
You could try:
strsplit(c("a,b;c","d;e,f"),",|;")
#[[1]]
#[1] "a" "b" "c"
#
#[[2]]
#[1] "d" "e" "f"
A.K.
- Original Message -
From: Sam Steingold
To: r-help@r-project.org
Cc:
Sent: Wednesday, September 18, 2013 11:42 AM
Subject: [R] strsplit with a vector split argument
Hi,
I fin
Hi,
It is not clear whether it is a data frame or vector. Please use ?dput() to
show the example dataset.
vec1<- 5:7
mat1<- matrix(0,3,3,dimnames=list(letters[1:3],letters[1:3]))
mat2<- mat1
nm1<- c("ab","bc","ac")
vec2<-paste0(colnames(mat1)[col(mat1)],rownames(mat1)[row(mat1)])
mat1[matc
On 09/18/2013 09:04 AM, arun wrote:
Hi,
You could try:
strsplit(c("a,b;c","d;e,f"),",|;")
He did it with "[,;]" which is equivalent but slightly faster. The more
characters you have inside the square brackets, the more beneficial it
is to use [abcde] over a|b|c|d|e. It's also more compact and
What do you get with:
sample$x * coef(s_model)[-1]
On Tue, Sep 17, 2013 at 3:09 AM, å²³èµ wrote:
> hello all
>
> I am really confusing that how predict(,type = "terms",) gets the desired
> result. For example,
>
> sample <- matrix(nrow = 10, ncol = 2)
>
> colnames(sample) <- c("y","x")
>
On Sep 18, 2013, at 10:42 AM, Sam Steingold wrote:
> Hi,
> I find this behavior unexpected:
> --8<---cut here---start->8---
>> strsplit(c("a,b;c","d;e,f"),c(",",";"))
> [[1]]
> [1] "a" "b;c"
>
> [[2]]
> [1] "d" "e,f"
> --8<---cut here--
Hi,
I have another question related to the same problem. I have a text file
with about 350 matrices each separated by a blank row. My question is how
to make R believe each matrix is separate and has a specific name m1,
m2,m350. Below is an example:
aa5 aa10 b253 b254 aa5 0 1 1 1 aa10 1 0
I am trying to build R-3.0.1 on our SPARC Solaris 10 system, but it
fails part way through with g77 errors. Has anyone run into this? Any
suggestions? For what it's worth, R-2.15.1 is the last one to build
error free for us.
===
Jon Prigot
R is now configured for sparc-sun-solaris2.10
Source di
Hi,
I find this behavior unexpected:
--8<---cut here---start->8---
> strsplit(c("a,b;c","d;e,f"),c(",",";"))
[[1]]
[1] "a" "b;c"
[[2]]
[1] "d" "e,f"
--8<---cut here---end--->8---
I thought that it should be identical to th
Hi,
I have a pair-wise distance vector. FOr objects: a,b,c, it is: (a,b) :5,
(b,c) :6, (a,c) : 7. I want to convert it into a symmetric matrix. I
used cast function but the function does not fill the matrix like a
triangular matrix. How do I get a symmetric matrix?
--
--Taraka
_
On my systems Linux Scientific and Mac OS X I use as well for the F77 the
gfortran compiler and this works. You could give it a trial.
Best
Simon
On Sep 18, 2013, at 3:14 PM, "Prigot, Jonathan" wrote:
> I am trying to build R-3.0.1 on our SPARC Solaris 10 system, but it
> fails part way throu
Hi,
Try: set.seed(49)
t(sapply(seq_len(ncol(pro)),function(i) {ids<- runif(1);
x1<-cut(ids,breaks=pro[,i]); c(ids=ids,bin_location=x1)}))
# ids bin_location
#[1,] 0.3656991 1
#[2,] 0.4878542 2
A.K.
- Original Message -
From: ioanna ioannou
To: r-help@
Hi,
Try:
lapply(paste0("m",1:2),function(x) {png(file=paste0("plot",x,".png"));
plot(get(x),pages=1,shade=TRUE);dev.off()})
#change 1:2 accordingly
A.K.
I wanted to plot a gam object output and save the plots in a folder. I have
several such objects in the workspace and wanted to automate t
Hi Elio,
Try this:
Assuming that there is a single blank row separating the matrices:
lines1<- readLines(textConnection("aa5 aa10 b253 b254
aa5 0 1 1 1
aa10 1 0 1 1
b253 1 1 0 1
b254 1 1 1 0
aa5 aa9 b27
Hi Anna,
See in line below.
On Wed, Sep 18, 2013 at 7:29 AM, Anna Zakrisson Braeunlich
wrote:
> Hi,
>
> Dummy data script and scripts are attached below.
>
> I would like to change the plot to look like this:
> https://www.google.se/search?q=facet_grid&bav=on.2,or.r_qf.&bvm=bv.52288139,d.Yms&biw
Hi Anna,
It's not clear to me what you are trying to do. If you want different
shapes for different organisms then you should map organism to shape,
e.g.,
geom_point(data = Summisodata11, aes(y = mean, shape=organism))
Is that what you are looking for? If not please restate the question.
Be
On 18-09-2013, at 14:43, ioanna ioannou wrote:
> Hello all,
>
> A very simple problem.
>
> Lets assume I have an interval [0,1] and I split it in 6 bins having
> thresholds:
> pro= cbind(0, 0.3675509, 0.8618615, 0.9814291, 0.9975283, 0.9997789,
> 1.000,
> 0, 0.3662881, 0.86097
On 09/18/2013 10:43 PM, ioanna ioannou wrote:
Hello all,
A very simple problem.
Lets assume I have an interval [0,1] and I split it in 6 bins having
thresholds:
pro= cbind(0, 0.3675509, 0.8618615, 0.9814291, 0.9975283, 0.9997789,
1.000,
0, 0.3662881, 0.8609743, 0.9812032, 0.997
Check here: http://cran.r-project.org/web/views/MedicalImaging.html
Bryan
On Sep 18, 2013, at 7:56 AM, wwreith wrote:
> Does anyone know of a package that would allow data from a CT scan to be
> loaded into R?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabb
Hello all,
A very simple problem.
Lets assume I have an interval [0,1] and I split it in 6 bins having
thresholds:
pro= cbind(0, 0.3675509, 0.8618615, 0.9814291, 0.9975283, 0.9997789,
1.000,
0, 0.3662881, 0.8609743, 0.9812032, 0.9974822, 0.9997738,
1.000)
dim(pro)<-c(7,2)
HI,
May be this helps:
vec1<-as.POSIXlt(strptime(gsub("^\\w+ ","",dates),"%b %d %Y %H:%M:%S"))
dat1<- data.frame(date= gsub("-",".",as.Date(vec1)), time=
strftime(vec1,format="%H:%M:%S")
,stringsAsFactors=FALSE)
dat1
# date time
#1 2013.09.17 16:25:17
#2 2013.09.18 16:35:17
#3 2013.0
Thanks Murdoch. I tried PHI but not Phi.
Arnaud
2013/9/17 Duncan Murdoch
> On 17/09/2013 3:26 PM, Arnaud Mosnier wrote:
>
>> Hi all,
>>
>> I want to present a figure including the uppercase and lowercase version
>> of
>> the greek letter phi.
>>
>> I know that I can use "expression" to have th
You're right! QFMFT!
:-)
Thanks
2013/9/17 Rolf Turner
> On 09/18/13 07:26, Arnaud Mosnier wrote:
>
>> Hi all,
>>
>> I want to present a figure including the uppercase and lowercase version
>> of
>> the greek letter phi.
>>
>> I know that I can use "expression" to have the symbol like in:
>>
>>
Hi,
I have a vector that looks like this;
(imported from another file)
dates <- c("Tue Sep 17 2013 16:25:17", "Wed Sep 18 2013 16:35:17", "Thu Sep 19
2013 16:55:17")
now I need a data frame with two columns;
datetime
2013.09.17 16:25:17
2013.09.18
Does anyone know of a package that would allow data from a CT scan to be
loaded into R?
Thanks!
--
View this message in context:
http://r.789695.n4.nabble.com/R-packages-for-CAT-scans-tp4676418.html
Sent from the R help mailing list archive at Nabble.com.
_
I have a data set with 20K variables. I want to apply Boruta feature
selection but I get cannot allocate vector of size error. Hence, I decided
to use bigmemory like below script but it seems that Boruta does not accept
a pointer. How can I apply feature selection to 20K variables?
df <- data with
Hi,
Dummy data script and scripts are attached below.
I would like to change the plot to look like this:
https://www.google.se/search?q=facet_grid&bav=on.2,or.r_qf.&bvm=bv.52288139,d.Yms&biw=1454&bih=704&dpr=1&pdl=300&um=1&ie=UTF-8&hl=sv&tbm=isch&source=og&sa=N&tab=wi&ei=vY05Uu3vD8aHtAawsYDIBw#fa
On 13-09-18 1:38 AM, meng wrote:
Oh,yes, I found out this according to your reply.Thanks.
As to time series analysis, in order to show the effect of smoothing or
filtering,the common command is:
plot(ts0);
lines(fitted(...))
But not "lines(fitted(...) ~ time(ts) )"
How to understand this then?
Does this questions help
http://stackoverflow.com/questions/1478532/changing-shapes-used-for-scale-shape-in-ggplot2
?
It looks like it does but I don't have time at the moment to work it out with
your code.
Good luck
John Kane
Kingston ON Canada
> -Original Message-
> From: anna.zak
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston ON Canada
> -Original Message-
> From: algara...@gmail.com
> Sent: Wed, 18 Sep 2013 10:06:23 +0800
> To: r-help@r-project.org
> Subject: [R] (no subject)
>
> Good morning,
>
> I am
On Sep 18, 2013, at 00:22 , Jeff Newmiller wrote:
> You seem to be applying the syntax for the within function to the with
> function. You should compare the documentation for them and choose your
> approach accordingly.
The syntax is fine, the difference in within() is that you can do assignm
Hello,
It's a function of package "sos", quite useful to find functions in R.
Regards,
Pascal
2013/9/18 Kenn Konstabel
> Hi,
>
>
> > What does every line mean especially the expression
> > [1L], [2L], and
> > (1L:p, 1L:p)
>
> 1L, 2L etc are integers. (That is, identical to as.integer(1) ,
> a
Hello,
Please have a look at:
http://cran.r-project.org/doc/manuals/R-lang.html#Constants
Hope this helps,
Pascal
2013/9/18 Pascal Oettli
> Hello,
>
> Apologies. findFn('cov2cor') did not find it...
>
> Regards,
> Pascal
>
>
>
> 2013/9/18 Pascal Oettli
>
>> Hello,
>>
>> From where this fun
Hi,
> What does every line mean especially the expression
> [1L], [2L], and
> (1L:p, 1L:p)
1L, 2L etc are integers. (That is, identical to as.integer(1) ,
as.integer(2) etc)
Using integers (instead of "numeric" type) is more efficient as here
they're used as indexes and would be converted to int
On Tue, 17 Sep 2013, Carabiniero wrote:
Hi All,
I need to construct a stacked bar plot with two independent (x) variables,
where the stacking is x1 and the x-axis label is x2. Can someone help out
with the code for this or provide a reference/example?
I'm not completely sure what exactly you
Hi All,
I need to construct a stacked bar plot with two independent (x) variables,
where the stacking is x1 and the x-axis label is x2. Can someone help out
with the code for this or provide a reference/example?
Thank you,
J
--
View this message in context:
http://r.789695.n4.nabble.com/S
Hi,
I want to change my geom.point shapes in facet grid. I have tried all sorts of
solutions, but for some reason none seem to work. Something overrides the
"normal" codes. I am stuck.
I have attached the data to the mail.
I want organism to have different shapes and then add a legend to the plo
Oh,yes, I found out this according to your reply.Thanks.
As to time series analysis, in order to show the effect of smoothing or
filtering,the common command is:
plot(ts0);
lines(fitted(...))
But not "lines(fitted(...) ~ time(ts) )"
How to understand this then?
Many thanks.
Best.
At 20
66 matches
Mail list logo