Hello David,
Thank you for the response.
I changed the e-mail format to text via gmail setting.
1. the butterfly names
You are right that the butterfly names are stored in the original data.
However, in your code, it is necessary to input the names for the
command structure.
The method I used
On Dec 17, 2012, at 7:30 PM, Frank Harrell wrote:
> In http://biostat.mc.vanderbilt.edu/RmS see the section marked "R Code". The
> zip file there doesn't contain code for all of the book yet; I will be
> adding code for the rest of the chapters in the next few months.
Are you working on a sec
In http://biostat.mc.vanderbilt.edu/RmS see the section marked "R Code". The
zip file there doesn't contain code for all of the book yet; I will be
adding code for the rest of the chapters in the next few months.
Frank
stephenb wrote
> I have used the errata from there, but have not found whe
You should change your email format to text (you keep sending messages in
html format).
Where are the butterfly names? Are they not in your original data? Create
your data.frame from the original data (which presumably has the butterfly
names in it already). Then use dput() if you need to email th
Dear all,
I'm trying to run a Wald Test for the Penalized Fixed Effects using the
rqpd package. Actually, I'd like to test if the coefficients associated to
the same variable are statistically different among the quantiles. The
usual wald.test, waldtest or anova.rq don't work for rqpd.
I would app
Hello,
You could have attached the output of dput(), it's much, much better.
I have tried the following and it works.
sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ])
sp <- lapply(sp, function(x) data.frame(year = x$year + x$month/12,
Population = x$Population))
# Plot i
Ask on the ggplot mailing list?
Normally you use melted data (see the reshape2 package) and let the scales
feature build the legend for you.
---
Jeff NewmillerThe . . Go Live...
DCN:
Map year to an aesthetic and let ggplot do it for you:
df2010$year <- 2010
df2011$year <- 2011
df2012$year <- 2012
dfAll <- rbind(df2010, df2011, df2010)
ggplot(dfAll, aes(x=Price, y=percenCapacity, color=year) +
scale_x_log10()
Best,
Ista
On Mon, Dec 17, 2012 at 6:03 PM, jcrosbie wrote:
>
> H
Thank you, David.
Now I know how to use dput.
Two more questions conjured up when running the code:
1. If there are about 500 species of butterflies,
please kindly advise if it is possible to input the butterfly names
(for .Label) using code,
instead of keying in them one by one.
2. Aggr
How to I go about adding a legend to the following plot?
ggplot() + geom_line(aes(x=df2010$Price,y=df2010$percentCapacity), colour =
"red")
+ geom_line(aes(x=df2011$Price,y=df2011$percentCapacity), colour = "green")
+geom_line(aes(x=df2012$Price,y=df2012$percentCapacity), colour = "blue")
+sc
Hi Jean,
Just to clarify whether it is a 'typo' or not.
data2 <- data.frame(
id = rep(data1$ID, 3),
visit = rep(1:3, rep(dim(data1)[1], 3)),
date = as.Date(c(data1$V1Date, data1$V2date, data1$V3date), "%m/%d/%y"),
dva = c(data1$V1a, data1$V2a, data1$V3a),
dvb = c(data1$V1a, data1$V2a, data1$V3a),#
Hi Mick --
On 12/17/2012 02:01 PM, WATSON Mick wrote:
Hi
I'm missing something here but I cannot figure out what. What I can see is
that the same code works when I load it via source(...) yet fails when I
execute it after loading the package I have built (which includes the code.
Below is a
Dear Rui and UseRs,[a text file has also been attached, in case the format of
my email is difficult to get]I am extremely sorry that I am bothering you once
again, but I’ll have to get to the bottom of it. The following command
sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$mont
Hi,
This could be read using the first method I suggested. The ?substr() method
was suggested as I thought that there will be square brackets in each line.
dat1<-read.table("preila.txt",sep="",header=FALSE,fill=TRUE,dec=",",stringsAsFactors=FALSE)
dat2<-na.omit(dat1)
dat2$Date<-as.POSIXct(paste
Hi
I'm missing something here but I cannot figure out what. What I can see is
that the same code works when I load it via source(...) yet fails when I
execute it after loading the package I have built (which includes the code.
Below is a transcript of my R session. First I load the code from
I had some difficulty getting the data read in using the code you included
in your email, although I'm not sure why. I'm pasting in the code that
worked for me, below.
I think that the calculations that you want to make would be easier if you
rearranged your data first. I used your example data
Hello,
Better yet, with 'agg' as given in my first post:
sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ])
plot(agg$year, agg$population, type = "n")
lapply(seq_along(sp), function(i) lines(sp[[i]]$year,
sp[[i]]$population, col = i))
Hope this helps,
Rui Barradas
Em
On Mon, Dec 17, 2012 at 4:43 PM, Simonas Kecorius wrote:
> Hey Sarah,
> thanks for quick response and your kind help. I appreciate it a lot.
> You are completely right. When I input data as Arun suggested, there is no
> problems. But when I try to read it from txr file - something wrong happens.
>
diff(x) will returns the diff's of each column when x is a matrix, so there is
no need for the apply call.
E.g.,
> d <- ts(cbind(SQRE=(1:7)^2, CUBE=(1:7)^3), start=2012.25, deltat=1/4)
> d
SQRE CUBE
2012 Q211
2012 Q348
2012 Q49 27
2013 Q1 16 64
2013 Q2 25 125
Hello,
You want to draw 2 + 67 lines in the same graph? The result should be
confusing...
As for the graph itself, you can use ?matplot, it's meant for that sort
of problem.
Hope this helps,
Rui Barradas
Em 17-12-2012 20:54, eliza botto escreveu:
Dear Arun and Rui,thanks indeed. it really
I think this is what you are looking for.
> tmp <- matrix(sample(20), 5, 4)
> tmp
[,1] [,2] [,3] [,4]
[1,]6 15 18 20
[2,]45 10 19
[3,]7913
[4,]8 14 11 13
[5,] 17 12 162
> t(apply(tmp, 1, diff))
[,1] [,2] [,3]
[1,]932
[
To combine the date/time fields into one and
rename the variables, use this:
> dta
V1 V2 V3V4 V5
1 2010.12.26 00:00:52 688.88 11.69 43
2 2010.12.26 00:01:52 696.19 11.69 43
> dta <- data.frame(date=strptime(paste(dta$V1,
dta$V2), "%Y.%m.%d %H:%M:%S"), V2=dta$V3,
V3=d
I have used the errata from there, but have not found where to download working
R code from.
Stephen
-Original Message-
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Monday, December 17, 2012 4:22 PM
To: Bond, Stephen
Cc: r-help@r-project.org
Subject: Re: [R] rms R code
Did
Did you try the website for the book?
http://biostat.mc.vanderbilt.edu/wiki/Main/RmS
On Mon, Dec 17, 2012 at 4:06 PM, Bond, Stephen wrote:
> Greetings, useRs.
>
> Does anybody have replication of the examples from the RMS book by Harrell
> coded in R? I find that most the code does not work a
Greetings, useRs.
Does anybody have replication of the examples from the RMS book by Harrell
coded in R? I find that most the code does not work and it takes too much time
to debug.
For example from p.276
> age.t <- w[,"age"]
> f.full <-
> lrm(cvd~scored(rx)+rcs(dtime,5)+age.t+wt.t+pf.t+hx+sbp
Use either
> gsub(" ", " ", "one two three") # double space after 'two'
[1] "one\\ two\\ \\ three"
or
> gsub(" ", "\\ ", "one two three", fixed=TRUE)
[1] "one\\ two\\ \\ three"
When 'fixed' is not TRUE then a backslash gives a special meaning to
the next character in the replacement
On Dec 17, 2012, at 8:03 AM, Vasilchenko Aleksander wrote:
> Hello.
> I have for example 4 or more dataframe which like such this example:
> date value
> 2006-11 0.4577647
> 2006-12 NaN
> 2006-10 0.1577647
> 2006-11 0.3577647
> 2006-12 NaN
> 2007-01 NaN
> 2007-02 NaN
I found one:
sum(is.element(c(1,4,2),c(1,2,3)))==length(c(1,4,2))
Are there others and perhaps more elegant ways?
Atte Tenkanen, FT, MuM
http://users.utu.fi/attenka/
Lähettäjä: Atte Tenkanen
Lähetetty: 17. joulukuuta 2012 22:24
Vastaanottaja: r-help@r-pro
Hi,
This could also work:
max(nchar(txt))
#[1] 58
res<-read.table(text=substr(txt[nchar(txt)>20],5,58),sep="",dec=",",header=FALSE,stringsAsFactors=FALSE)
res
# V1 V2 V3 V4 V5
#1 2010.12.26 00:00:52 688.88 11.69 43
#2 2010.12.26 00:01:52 696.19 11.69 43
A.K.
- Origin
On Dec 17, 2012, at 9:44 AM, Nathan Skene wrote:
> I have a path:
>
> path = "/nfs/users/nfs_n/ns9/
> Phenotype Analysis/Results/Run_AmplRatio_neg
> BinaryAll trained without akapn+tnik.csv"
>
> I wish to replace the spaces with "\ " so that it can be read by a system
> call to unix.
>
> Using
Dear Arun and Rui,thanks indeed. it really worked out.
i was wondering that can i draw the curve of stations "Sa" , "Ta" and remaining
67 stations on the same axis, for comparison? more precisely, taking years on
axis, starting from the least year in my data and ending at latest, while
taking
On Dec 17, 2012, at 9:38 AM, KoopaTrooper wrote:
> I'm using Kernel Utilization distributions to estimate overlap in animal
> territories. There are various ways to calculate this overlap and one of the
> equations is : V.I. = ∫∫∫ min (f1 (x,y,z), f2 (x,y,z)) dxdy where f1 =
> utilization distr
?all
On Mon, Dec 17, 2012 at 12:24 PM, Atte Tenkanen wrote:
> Hi,
>
> How can I test, whether all the values that is.element() -function returns
> are TRUE's
>
> Eg.
> > (is.element(c(1,4,2),c(1,2,3)))
> [1] TRUE FALSE TRUE
>
> This doesn't work:
>
> > (is.element(c(1,4,2),c(1,2,3)))==TRUE
> [
With all().
> all(is.element(c(1,4,2),c(1,2,3)))
[1] FALSE
Sarah
On Mon, Dec 17, 2012 at 3:24 PM, Atte Tenkanen wrote:
> Hi,
>
> How can I test, whether all the values that is.element() -function returns
> are TRUE's
>
> Eg.
>> (is.element(c(1,4,2),c(1,2,3)))
> [1] TRUE FALSE TRUE
>
> This d
On 17-12-2012, at 21:03, Asis Hallab wrote:
> Dear R experts,
>
> please accept my apologies for the missing information.
>
> You need to call sumRows in the following manner:
>
> sumRows(t, sort( unique( t[,"Domain.Architecture.Distance"] ) ) )
>
> Thank you Berend and David for pointing ou
Hi,
How can I test, whether all the values that is.element() -function returns are
TRUE's
Eg.
> (is.element(c(1,4,2),c(1,2,3)))
[1] TRUE FALSE TRUE
This doesn't work:
> (is.element(c(1,4,2),c(1,2,3)))==TRUE
[1] TRUE FALSE TRUE
Best,
Atte Tenkanen, FT, MuM
http://users.utu.fi/attenka/
___
Hi,
You could use either:
Reduce(function(...) merge(...,by="date"),list(dat1,dat2,dat3,dat4))
#or
library(reshape)
merge_recurse(list(dat1,dat2,dat3,dat4), by="date")
A.K.
- Original Message -
From: Vasilchenko Aleksander
To: r-help@r-project.org
Cc:
Sent: Monday, December 17
I'm using Kernel Utilization distributions to estimate overlap in animal
territories. There are various ways to calculate this overlap and one of the
equations is : V.I. = ∫∫∫ min (f1 (x,y,z), f2 (x,y,z)) dxdy where f1 =
utilization distribution for bird 1 in 3 spatial dimensions (x,y,z). I can
p
Hi, I have an n x m matrix of numerical observations. ie. stock prices
I wish to convert the matrix of observations to a matrix of simple returns
(by taking the differences between (column) observations.)
Can any good soul suggest a function for this?
--
View this message in context:
http://
HI,
May be this helps:
dat1<-read.table("Eliza.txt",sep="",header=TRUE,stringsAsFactors=FALSE)
library(reshape2)
res<-lapply(split(dat1,dat1$st.),function(x)
dcast(x,month~year,mean,value.var="population_in_million"))
res
$Sa
# month 1955 1956 1957 1958
#1 1 2.40 NaN NaN
I have a path:
path = "/nfs/users/nfs_n/ns9/
Phenotype Analysis/Results/Run_AmplRatio_neg
BinaryAll trained without akapn+tnik.csv"
I wish to replace the spaces with "\ " so that it can be read by a system
call to unix.
Using gsub I try:
> gsub(" ","\\ ",path)
[1] "/nfs/users/nfs_n/ns9/Phenotyp
On Dec 17, 2012, at 4:04 AM, Simonas Kecorius wrote:
> Hey R users,
>
> suppose we have data:
>
txt <- readLines(textConnection("[1] 2010.12.26 00:00:52688,88
11,69 43,00
[2] 11,69 43,00
[3] 11,69 43,00
[4] 11,69 43,00
[5] 11,69 43,00
[6] 11,69 43,00
Dear R experts,
please accept my apologies for the missing information.
You need to call sumRows in the following manner:
sumRows(t, sort( unique( t[,"Domain.Architecture.Distance"] ) ) )
Thank you Berend and David for pointing out my mistake.
Kind regards and again:
Your help is very much app
On Dec 17, 2012, at 11:22 AM, Asis Hallab wrote:
> Dear R community,
>
> I have a medium sized matrix stored in variable "t" and a simple function "
> countRows" (see below) to count the number of rows in which a selected
> column "C" matches a given value. If I count all rows matching all pairw
On 17-12-2012, at 20:22, Asis Hallab wrote:
> Dear R community,
>
> I have a medium sized matrix stored in variable "t" and a simple function "
> countRows" (see below) to count the number of rows in which a selected
> column "C" matches a given value. If I count all rows matching all pairwise
>
Dear R community,
I have a medium sized matrix stored in variable "t" and a simple function "
countRows" (see below) to count the number of rows in which a selected
column "C" matches a given value. If I count all rows matching all pairwise
distinct values in the column "C" and sum these counts up
Fortunately for you and your embarrassment, the members of this list are a
nurturing and supportive group that truly cares first and foremost about
submitters' success.
On 12/17/12 12:16 PM, "soon yi" wrote:
>Thank you.
>
>Rather embarrassed. Its fair to say i had rather over comlicated my
>atte
A slight modification to Rui's answer would give you a list containing
separate matrices for each station:
> aggwide <- reshape(agg, direction = "wide", idvar = c("st", "month"),
+ timevar = "year", v.names = "population")
> aggsplit <- split(aggwide[,colnames(aggwide)!="st"], aggwide$st)
> a
>
>
> Thanks for the answer. I have already read the gstat manual and I had
> constructed the empirical and theoretical variogram like this:
g <- gstat(id="tec", formula=TEC ~ 1, data=data)v <-
variogram(g)mod<-vgm(sill=var(data$TEC),model="Sph",range=200,nugget=10)v.fit
<- fit.variogram(v,
Hello,
Something like this?
dat <-
structure(list(st = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1
Try something along these lines:
> library(ggplot2)
> cbPalette <- c("#99", "#E69F00")
> df<-data.frame(y=rnorm(100,30,10),x=rnorm(100,20,5),treat=factor(rbinom(100,1,0.5)))
> p1<-ggplot(df, aes(x=x, y=y,group=treat)) + theme_bw() +
+ geom_smooth(aes(linetype=treat, colour="black"),method
Thanks for the answer. I have already read the gstat manual and I had
constructed the empirical and theoretical variogram like this:
g <- gstat(id="tec", formula=TEC ~ 1, data=data)v <-
variogram(g)mod<-vgm(sill=var(data$TEC),model="Sph",range=200,nugget=10)v.fit
<- fit.variogram(v,
model=mod
One option is to put all the data frames into a list then use the Reduce
function.
On Mon, Dec 17, 2012 at 9:03 AM, Vasilchenko Aleksander <
vasilchenko@gmail.com> wrote:
> Hello.
> I have for example 4 or more dataframe which like such this example:
> date value
> 2006-11 0.4577647
> -Original Message-
> My problem is that instead of Ordinary kriging, when I run
> the algorithm I get: Inverse distance weighted interpolation.
> Why is that? What am I missing or doing wrong?
The gstat manual at http://www.gstat.org/gstat.pdf says on p16 that "When no
variograms ar
On 17/12/2012 12:04 PM, Uwe Ligges wrote:
On 17.12.2012 17:31, Laura Skylaki wrote:
> Hello all,
>
> I'm trying to build R 32bit from source in a Windows 64 machine. I have
> followed the steps in "R Installation and Adiministration" (
> http://cran.r-project.org/doc/manuals/R-admin.html#Getting
Thank you.
Rather embarrassed. Its fair to say i had rather over comlicated my attempts
to do this.
sy
soon yi wrote
> Hi
>
> I am using geom_smooth to fit linear regression lines over a scatterplot
> for two treatment groups. The default colour for the two lines are blue. I
> have been unable t
Dear R users,
[in case the format of email is changed or you dont finf it easy to understand,
i have attached a text file of my question]
i have the data in the following format and i want to convert it in the
format given at the end.
Ta ans Sa are the names of certain cities. there are 69 citie
On 17.12.2012 17:31, Laura Skylaki wrote:
Hello all,
I'm trying to build R 32bit from source in a Windows 64 machine. I have
followed the steps in "R Installation and Adiministration" (
http://cran.r-project.org/doc/manuals/R-admin.html#Getting-the-source-files)
or at least I think I did every
Look at the tapply function. Possibly using round or cut if needed. Other
tools that may be useful (but probably overkill for the simple problem)
include aggregate, ave, and the plyr package.
On Sat, Dec 15, 2012 at 9:12 PM, Elaine Kuo wrote:
> Hello
>
>
>
> I have a table describing butterfl
It is best to reply to the whole list, you are likely to get answers
quicker and possibly better that way and if other people have your same
question and search the archives they will see the whole conversation.
It looks like the plot method for hexbin objects does not honor the ylim
argument. In
Hello,
Something like this?
d <- myframe2$distance
n <- length(d)
mu <- rep(NA, n - 1)
mu[n - 1] <- m <- mean(d[(n - 1):n])
s <- sd(d[(n - 1):n])
ex <- 0
for(i in rev(seq_len(n))[-(1:2)]){
if(d[i] < m + s){
ex <- 0
mu[i] <- m
}else{
ex <- ex + 1
if(ex >=
I actually got it to do what I want running my R routine through a batch file.
It saves to a file everything on the console. Thanks for
your suggestions.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
http://www.fws.gov/redb
Hello,
Inline.
Em 17-12-2012 15:44, soon yi escreveu:
Hi
Yes i had look at this but it doesnt quite do what i am wanting. I do not
want the smoothed line to be coloured, or dependant on a factor or the
default blue.
An example,
library(ggplot2)
df<-data.frame(y=rnorm(100,30,10),x=rnorm(100,2
Hi,
I am new in R and trying to implement an algorithm which makes ordinary kriging
by using gstat library and the predict method.
I use the predict method as following:
First, I create an object g:
g <- gstat(id="tec", formula=TEC ~ 1, data=data) ## Create gstat object called
g
And then
Hi,
Just to add:
dat1<-read.table(text="
2010.12.26 00:00:52 688,88 11,69 43,00
11,69 43,00
11,69 43,00
11,69 43,00
11,69 43,00
2010.12.26 00:01:52 696,19 11,69 43,00
",sep="",header=FALSE,fill=TRUE,dec=",",stringsAsFactors=FALSE)
dat2<-na.omit(dat1)
dat2$
Hello all,
I'm trying to build R 32bit from source in a Windows 64 machine. I have
followed the steps in "R Installation and Adiministration" (
http://cran.r-project.org/doc/manuals/R-admin.html#Getting-the-source-files)
or at least I think I did everything described. I am not sure if I have
insta
Hi,
It would be helpful if you dput() the data.
If I read your data like this:
dat1<-read.table(text="
2010.12.26 00:00:52 688,88 11,69 43,00
11,69 43,00
11,69 43,00
11,69 43,00
11,69 43,00
2010.12.26 00:01:52 696,19 11,69 43,00
",sep="",header=FALSE,fill=TR
Hello.
I have for example 4 or more dataframe which like such this example:
date value
2006-11 0.4577647
2006-12 NaN
2006-10 0.1577647
2006-11 0.3577647
2006-12 NaN
2007-01 NaN
2007-02 NaN
2007-03 0.2956429
2007-01 0.3677647
2007-02 NaN
They have the
Now I played around in Excel for the last two hours or so and solved my
problem there. I know it is not really liked here but it worked.
So I do not really need your help on this problem. If anyone knows on how to
do it anyway I'd be very happy though!!!
Nobody taught me more about R than this m
You are only using dput to create a version of your data that you can post
in your email along with your question. You do not use it in your analysis.
You originally posted a table of your data that requires extra steps for us
to convert into a useable form so I suggested you use dput in the future
Certainly.
But you'd be better advised to use dput(head(yourdata, 20)) to provide
data, since we don't actually know what's in your data after it has
passed through print, copy, and email. How you got it into R may also
be relevant.
Also, I don't see how you get from the given data to the desired
If you don't need the "P" element in the output, then I think the answers
you've already received are good.
But if you do want to retain the "P" element, then I think it's better to
simply add the missing elements back in after using lapply. The code will
be easier to understand a year from now. H
On Dec 17, 2012, at 5:15 AM, Rui Barradas wrote:
Hello,
Try the following.
cp <- sapply(1:4, function(n) output0*exp(-0.3*TIME1[n]))
plot(TIME1, cp)
That appears to be more complex than necessary. Even R-newbs should
use vectorized approaches if they are easily available:
cp <- outpu
Hi
Yes i had look at this but it doesnt quite do what i am wanting. I do not
want the smoothed line to be coloured, or dependant on a factor or the
default blue.
An example,
library(ggplot2)
df<-data.frame(y=rnorm(100,30,10),x=rnorm(100,20,5),treat=factor(rbinom(100,1,0.5)))
p1
> -Original Message-
> Superposing a finite set of semi-transparent dots will never
> give an opaque one (and that is true of physical dots too).
Indeed not; this is an ideal case of the Beer-Lambert law.
Nice to know that basic chemistry has applications in computational graphics ...
HI Elaine,
You only provided an object "datam" and the dput(dta). I don't know what is
inside "datam". Your question "how to use the object "datam" in connection
with the code ..." is very confusing. Do you want to find if datam is a subset
of dta or something else?
Regarding your other q
Hi,
You could also use ?colwise() from library(plyr)
set.seed(50)
dat1<-data.frame(Col1=sample(1:20,10,replace=TRUE),Col2=sample(LETTERS[1:10],10,replace=TRUE),Col3=sample(LETTERS[11:20],10,replace=TRUE),Col4=sample(40:60,10,replace=TRUE))
dat1[unlist(colwise(is.factor)(dat1))]
# Col2 Col3
#1
Hey R users,
suppose we have data:
[1] 2010.12.26 00:00:52688,88 11,69 43,00
[2] 11,69 43,00
[3] 11,69 43,00
[4] 11,69 43,00
[5] 11,69 43,00
[6] 11,69 43,00
[7] 11,69 43,00
[8] 11,69 43,00
[9] 11,69 43,00
[10] 11,69 43,00
[11]
Dear all,
We are using lme function to estimate a mixed effect model.
The data are obtained from the following experience:
15 subjects were required to press maximally ledges with four fingers
and magnitudes of the 4 fingers are measured simultaneously for three
different positions.
Three repe
Thank you for your help!
i'm still wondering if it's possible to transfer the results of the log
regression into a plot with the nonlog values.
--
View this message in context:
http://r.789695.n4.nabble.com/plotting-log-regression-tp4653087p4653279.html
Sent from the R help mailing list ar
Hi,
Following Anthony's reply I am attaching two of the POI shapefiles and the code
for creating the spatial grid. I am not being able to read the list of these
shapefiles and then perform the points in spatial grid function. If someone can
help, I will be very grateful.
Here is my code for crea
Hello everyone,
I have a data frame somewhat like this one:
myframe <- data.frame (Timestamp=c( "24.09.2012 06:00", "24.09.2012 07:00",
"24.09.2012 08:00",
"24.09.2012 09:00", "24.09.2012 10:00",
"24.09.2012 11:00",
"24.0
"... A search online has not suggested any solution / work around."
Really?
Have a look at this: http://docs.ggplot2.org/current/geom_smooth.html
Regards,
José Iparraguirre
Chief Economist
Age UK
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Hi
I am using geom_smooth to fit linear regression lines over a scatterplot for
two treatment groups. The default colour for the two lines are blue. I have
been unable to change this with the usual options. A search online has not
suggested any solution / work around.
Is there a solution to this?
Your example seems strange because a line fits on the x-y scale; not on the
log(x)-log(y) scale. Anyway, here is my example. You can build on it for more
general data.
x <- exp(1:10)
y <- exp(10:1 + rnorm(10))
logmod <- lm(log(y)~log(x))
logypred <- predict(logmod)
plot(y~x)
lines(exp(logy
Hello,
Try the following.
cp <- sapply(1:4, function(n) output0*exp(-0.3*TIME1[n]))
plot(TIME1, cp)
Hope this helps,
Rui Barradas
Em 17-12-2012 13:04, Andras Farkas escreveu:
> Dear All,
>
> I was wondering if you could help me with the following:
> I have the code:
>
> tin <-0.5
> tau <
Hello Andras,
what about: plot(TIME1, output0*exp(-0.3*TIME1))
Best,
Gergely
On Mon, Dec 17, 2012 at 2:04 PM, Andras Farkas wrote:
> Dear All,
>
> I was wondering if you could help me with the following:
> I have the code:
>
> tin <-0.5
> tau <-24
> output0 <-10
> TIMELOW <-tin
> TIMEHIGH <-1*
does anybody can help me on this?
From: metal_lical...@live.com
To: r-help@r-project.org
Subject: How to import the large dataset into R
Date: Fri, 14 Dec 2012 11:01:03 +0300
HI, R Users,
I met the following problem:
I was trying to import data of one table in .accdb database into my ODBC
Dear All,
I was wondering if you could help me with the following:
I have the code:
tin <-0.5
tau <-24
output0 <-10
TIMELOW <-tin
TIMEHIGH <-1*tau
TIME1 <-c(seq(TIMELOW,TIMEHIGH, by = sign(TIMEHIGH-TIMELOW)*(tau-tin)/3))
then I would like to calculate:
cp1 <-output0*exp(-0.3*TIME1[1])
cp2 <
Look up 'alpha-blending' to see how this works. And remember that the
sRGB colorspace used has non-linear transformations too.
Superposing a finite set of semi-transparent dots will never give an
opaque one (and that is true of physical dots too).
On 17/12/2012 08:55, Andrew Crane-Droesch wr
Hello,
Try the following.
dat <- data.frame(X = rnorm(10), Y = factor(sample(letters, 10)), Z = 1:10)
num <- sapply(dat, is.numeric)
dat[num]
# or
dat[, num]
Hope this helps,
Rui Barradas
Em 17-12-2012 10:02, Martin Spindler escreveu:
Dear R users,
I have a dataframe which consists of var
Sample data?
Please supply some sample data and code.
The easiest way to supply data is to use the dput() function. Example with
your file named "testfile":
dput(testfile)
Then copy the output and paste into your email. For large data sets, you can
just supply a representative sample.
Another question (I am sure it is the last one tentatively):
After creating a text.file using dput (let's name the created file
"datam"),
please kindly advise how to use the text file in writing the code using
"structure" like below.
Thank you.
code
dta <- structure(list(Species = structure(1:11
One more question:
Please kindly explain
why it is written as "row.names = c(NA, -11L))."
(in the code below)
I am unsure why it is "negative" 11.
Thank you .
Elaine
code
dta <- structure(list(Species = structure(1:11, .Label = c("Butterfly A1",
+ "Butterfly A2", "Butterfly A3", "Butterfly A4
Thank you, Berend.
I tried
1. dput (datam, "datam")
2. dput (datam)
both worked
Elaine
On Mon, Dec 17, 2012 at 7:30 PM, Berend Hasselman wrote:
>
> On 17-12-2012, at 12:06, Elaine Kuo wrote:
>
> > Hello,
> >
> > Thank you again, David.
> >
> > I tried with the first step of the command "depu
On 17-12-2012, at 12:06, Elaine Kuo wrote:
> Hello,
>
> Thank you again, David.
>
> I tried with the first step of the command "deput" as followed
>
It's "dput" not "deput".
> datam <-read.csv ('H:/Butterfly_RS_20121217.csv',header=T, row.names=1)
> dput(datam, Migrant_RS_L_txt)
>
> However
Hello,
Thank you again, David.
I tried with the first step of the command "deput" as followed
datam <-read.csv ('H:/Butterfly_RS_20121217.csv',header=T, row.names=1)
dput(datam, Migrant_RS_L_txt)
However, there is a error message that
"the object Migrant_RS_L_txt is not found."
I read the exam
f<-factor(c(1,1,2,3))
n<-c(1,1,2,3)
df<-data.frame(f,n)
sapply(df,is.factor)
f n
TRUE FALSE
df[sapply(df,is.factor)]
f
1 1
2 1
3 2
4 3
df[sapply(df,is.numeric)]
n
1 1
2 1
3 2
4 3
something like that?
On 17.12.2012, at 11:02, Martin Spindler wrote:
> Dear R users,
>
> I have a dataf
most likely the 'split' function, but exactly how would depend on the data
which you did not provide.
Sent from my iPad
On Dec 17, 2012, at 5:02, "Martin Spindler" wrote:
> Dear R users,
>
> I have a dataframe which consists of variables of type numeric and factor.
> What is the easiest way t
Dear R users,
I have a dataframe which consists of variables of type numeric and factor.
What is the easiest way to split up the dataframe to two dataframe which
contain all variables of the type numeric resp. factors?
Thank you very much for your efforts in advance!
Best,
Martin
1 - 100 of 103 matches
Mail list logo