Displaying 20 results from an estimated 200 matches similar to: "post-hoc comparisons in GAMs (mgcv) with parametric terms"
2009 Sep 14
1
ggplot2 legend text....a basic question
Hello fellow R's,
I?ve been learning to use the ggplot2 library, and after a full day of
work I still have a couple of basic questions.
Here is an example:
mydata=data.frame(x=runif(20),y=runif(20),n=runif(20))
mydata2=data.frame(x=c(0.4,0.6,0.5),y=c(0.4,0.4,0.6))
ggplot(mydata, aes(x, y)) + geom_point(aes(size = n)) +
geom_polygon(data=mydata2,aes(x,y,alpha=0.5))
In this plot, the
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
Dear list,
I?m having a little trouble with adding vertical lines to a histogram.
I need to draw a matrix of histograms (using facets), and in each
histogram add a vertical line indicating the mean value of the data in
each facet. According to the last example in the geom_hline help, to
display different lines in each facet I need to provide a data frame.
I modified this example to make a plot
2010 May 20
1
Strange behaviour when using diff with POSIXt and POSIXlt objects
Dear list,
I´m calculating time differences between series of time stamps and I noticed
something odd:
If I do this...
> time1=strptime("2009 05 31 22 57 00",format="%Y %m %d %H %M")
> time2=strptime("2009 05 31 23 07 00",format="%Y %m %d %H %M")
>
> diff(c(time1,time2),units="mins")
Time difference of 10 mins
.. I get the correct
2010 Feb 15
1
GAM for non-integer proportions
Dear list,
I´m using the mgcv package to model the proportion by weight of certain prey
on the stomach content of a predator. This proportion is the ratio of two
weights (prey weight over stomach weight), and ranges between 0 and 1. The
variance is low when proportion is close to 0 and 1, and higher at
intermediate values.
It seems that the best way to go is to model this using the
2009 Sep 21
3
compute differences
Hi,
I have a problem.
I have a data frame looking like:
ID val
A? .3
B? 1.2
C? 3.4
D? 2.2
E? 2.0
I need to CREATE the following TABLE:
CASE?? DIFF
A-A??? 0
A-B??? -0.9
A-C??? -3.1
A-D??? -1.9
A-E??? -1.7
B-A??? ...
B-B??? ...
B-C
B-D
B-E
C-A
C-B
C-C
C-D
C-E
D-A
D-B
D-C
D-D
D-E
E-A
E-B
E-C
E-D
E-E
WHERE CASE IS THE COUPLE OF ELEMENTS CONSIDEREDM AND DIFF IS THE computed DIFFERENCE between
2010 Sep 16
4
help me understand how things work.
Hello I have some strange output from R and I try to understand how R works.
Could you please help me with that?
temp <- rbind (c(10,1),c(99,98))
> temp
[,1] [,2]
[1,] 10 1
[2,] 99 98
> dist(temp)
1
2 131.6435
> sqrt(dist(temp))
1
2 11.47360
so far so good.
until the nex line: when I try to do what i did before but adding the 1/(what I
did
2003 Sep 09
1
Getting a local number abroad - Newbie question
Hello!
I have a staff member abroad and need to provide him with the ability to
make local calls. The features I need are:
* Possibillity to make calls at local (Icelandic) charges from Ireland
office.
* Possibillity to call the local Icelandic number and reach the Ireland
office.
I'm also wondering if there is any isdn based solution since there is a
possibillity of another staff
2014 Apr 15
1
ASCIIfy() - a proposal for package:tools
Hi all,
I would like to propose the attached function ASCIIfy() to be added to the
'tools' package.
Non-ASCII characters in character vectors can be problematic for R
packages, but sometimes they cannot be avoided. To make packages portable
and build without 'R CMD check' warnings, my solution has been to convert
problematic characters in functions and datasets to escaped
2010 Feb 11
1
Rounding multinomial proportions
I present you with a function that solves a problem that has bugged me for
many years. I think the problem may be general enough to at least consider
adding this function, or a revamped version of it, to the 'stats' package,
with the other multinomial functions reside.
I'm using R to export data to text files, which are input data for an
external model written in C++. Parts of the
2003 Dec 01
0
No subject
the files when you attempt to rename it. This is caused by Window's Media
Player loading the file when you click on it.
To work around this I had to go into Windows Explorer and change the folder
options from "Enable Web Contents in Folders" to "Use Windows Classic
Folders". This way, Windows Media player won't load the file when you click
on it.
Just trying to save
2005 Aug 15
4
Vector comparison to matrix
I am looking for a fast way to count the number of rows in a matrix are
identical to a pattern vector. For example, if I am interested in counting
the number of row vectors in a matrix that are identical to (1,2,3) what
would I do? I have tried the identical statement in a loop but this is far
too slow. I have a very large matrix and need to avoid loops at all costs.
Thanks for any help.
2007 Jul 20
3
SOS
Dear all, I am a new user of R. I would like to know how to get fund's returns in percentage (%). For example, I use: R <- ts(read.xls("FundData"), frequency = 12, start = c(1996, 1)) Whith this program, the returns are like 0.0152699. But, I would like to have 1.52%. Please advise me about the function. Thanks! Fabrice
2016 Mar 09
2
How to install Avaya 4610SW in Asterisk?
Hi !
I want to install a Telephone IP Avaya 4610SW in my Asterisk 11, but I
cant install.
It asks a TFTP/HTTP Server, but is necessary I install it in mu
Asterisk Server for works my Telephone?
The manual is here https://downloads.avaya.com/css/P8/documents/003880182
Thanks in advanced.
2009 Oct 29
1
weighted.mean uses zero when na.rm=TRUE (PR#14032)
The weighted.mean() function replaces NA values with 0.0 when the user
specifies na.rm=TRUE:
x <- c(101, 102, NA)
mean(x, na.rm=TRUE) # 101.5, correct
weighted.mean(x, na.rm=TRUE) # 67.66667, wrong
weighted.mean(x, w=c(1,1,1), na.rm=TRUE) # 67.66667, wrong
weighted.mean(x, w=c(1,1,1)/3, na.rm=TRUE) # 67.66667, wrong
The weights are
2006 Oct 20
2
Recursive decreasing sequences
Hello fellow R's,
I'm sure there must be an easy way to do this. But after digging in the
documentation and thinking about it for a while I couldn't figure it
out. I need to get a decreasing recursive vector in. I mean something
like this: if starting at 2, and ending at 6, the vector should be
2 3 4 5 6 3 4 5 6 4 5 6 5 6 6
An easy way would be to do this
x <-
2011 May 26
1
Statistical mode
One descriptive statistic that is conspicuously missing from core R is the
statistical mode - the most frequent value in a discrete distribution.
I would like to propose adding the attached 'statmode' (or a similar
function) to the 'stats' package.
Currently, it can be quite cumbersome to calculate the mode of a
distribution in R, both for experts and beginners. The lack of a
2007 Oct 24
3
jEdit for R
Hi,
I just installed jEdit but have no clue, whether I can run my code a'la
"ctrl-R" directly from jEdit script, or should source it from R command
line, after saving it first in jEdit.
thanks for any help,
rob
--
View this message in context: http://www.nabble.com/jEdit-for-R-tf4684065.html#a13384782
Sent from the R help mailing list archive at Nabble.com.
2010 Jan 19
1
Model frame when LHS is cbind (PR#14189)
The model frame shows the response and predictors in a data frame with
nicely labelled columns:
fm <- lm(wt~qsec+log(hp)+sqrt(disp), data=mtcars)
model.frame(fm) # ok
When the left hand side consists of more than one response, those response
variables still look good, inside a matrix:
fm <- lm(cbind(qsec,hp,disp)~wt, data=mtcars)
model.frame(fm)[[1]] # ok
A problem arises when
2007 Nov 14
3
How to get row numbers of a subset of rows
Hello list,
I read in a txt file using
<B<-read.table(file="data.snp",header=TRUE,row.names=NULL)
by specifying the row.names=NULL so that the rows are numbered.
Below is an example after how the table looks like using
<B[1:10,1:3]
SNP Chromosome PhysicalPosition
1 SNP_A-1909444 1 7924293
2 SNP_A-2237149 1 8173763
2011 Mar 16
1
Autocorrelation in linear models
I have been reading about autocorrelation in linear models over the last
couple of days, and I have to say the more I read, the more confused I
get. Beyond confusion lies enlightenment, so I'm tempted to ask R-Help for
guidance.
Most authors are mainly worried about autocorrelation in the residuals,
but some authors are also worried about autocorrelation within Y and
within X vectors