Hey,
I'm trying to build something like this
http://flowingdata.com/2011/05/11/how-to-map-connections-with-great-circles/
but with my own data in csv files.
The code runs well if I use the same csv files as the author, but with mine
, this is what I get
*Code*
library(maps)
library(geosphere)
Hello,
My boss wants me to do a Duncan's test, which is under the agricolae
package. Unfortunately I am not versed enough in R to run my data. I
have 7 subspecies of deer mouse for which I have 23 measurements which
are my variables of interest. I have run an ANOVA for each of the set
of subspecie
Catriona:
You have already been roundly (and appropriately) chastised for your sins.
So I need not join the chorus.
Instead, let me just briefly focus on the substance of what you are trying
to do, because I continue to believe it's wrong. Here's the leading
question:
Could you just as logicall
BTW that plot is ridiculous. You should be plotting using the
coefficients from the non-offset model, since that is the real data
model.
On Nov 24, 2012, at 6:05 PM, Catriona Hendry wrote:
Hi,
@ Albyn, David.. No, its not homework. Its basic groundwork for
testing
allometric relationshi
Hi Albyn,
Not a problem :)
I had calculated the CI using
>confint(Regression_PhyloContrasts, level=0.95)
Is that adequate? I had been using this as my indicator of significance,
but ultimately I need a P-value for the deviation from a slope of 1. Which
is where I ran into trouble trying to use
I need to map new data to the existing cluster assignments in R. For
clustering was used mclust. I need to find which cluster the new data belong
to.
Asking for a help :)
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-map-new-data-to-the-existing-cluster-assignments-in-R
Hello,
Thank you very much for your help.
I appreciate.
:-)
I want the count of INCUBATION and CONTAGIEUX to be by country.
the count for example of mexique must not be the same as for USA.
Have u an idea?
Thanks you in advance.
anoumou
--
View this message in context:
http://r.789695.n4.nab
Dear Cat
My apologies for presuming...
Here's a "primitive" solution: compute a t-statistic or CI.
t = (beta-hat - 1)/SE(beta-hat), compare to qt(.975, res.df)
Or Better, compute the 95% confidence interval
beta-hat + c(-1,1)*qt(.975, res.df)*SE(beta-hat)
albyn
On 2012-11-24 18:05, Catri
On 11/25/2012 03:04 AM, john55 wrote:
Hi everyone,
i´m trying to graphically display distributions with r and i´m working with
makrodata from the WVS.
the command i´m using is
plot (Makrodata$v11, Makrodata$v12, xlab="Democracy Score Economist",
ylab= share religious people")
i´m having an
I tried to use mlogit.R in the package Bayes Logit and got this error
message
Error in .C("rpg_devroye", x, as.integer(n), z, as.integer(num), PACKAGE =
"BayesLogit") :
C symbol name "rpg_devroye" not in DLL for package "BayesLogit)
Can anyone help?
Thanks
Tjun Kiat
[[alternative HTM
> * David Winsemius [2012-11-23 13:14:17 -0800]:
>
>>> See
>>> http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-should-I-write-summary-methods_003f
--8<---cut here---start->8---
summary.difftime <- function (v) {
s <- summary(as.numeric(v))
r <- as.data.fr
Hard to tell without the rest of the data. You can probably use
'merge' to add the data from the second file to the first. If you
want printed pages, then you can just have a 'for' loop that goes
through the dataframe creating the lines of output you want on the
report and then insert a 'form fee
On Nov 24, 2012, at 6:05 PM, Catriona Hendry wrote:
Hi,
@ Albyn, David.. No, its not homework. Its basic groundwork for
testing
allometric relationships for a graduate project I am working on. I
read the
guide before posting, I spent half the day trying to understand how
I am
going wron
Hi,
@ Albyn, David.. No, its not homework. Its basic groundwork for testing
allometric relationships for a graduate project I am working on. I read the
guide before posting, I spent half the day trying to understand how I am
going wrong based on the advice given to others.
@Bert, David... I apolo
On Nov 24, 2012, at 4:27 PM, Catriona Hendry wrote:
Hi!
I have a question that is probably very basic, but I cannot figure
out how
to do it. I simply need to compare the significance of a regression
slope
against a slope of 1, instead of the default of zero.
I know this topic has been po
HI,
If you need to order the dates.
dat1<-read.table(text="
site,date,precipitation,temp_max,temp_min
Castle Peak,January-70,0,32,18
Castle Peak,January-70,0,39,9
Castle Peak,September-70,0,34,5
Castle Peak,September-70,0,30,7
Castle Peak,October-70,0,40,6
Castle Peak,November-70,0,45,10
Castle Pe
1. The model is correct : lm( y~ x + offset(x))
( AFAICS)
2. Read the posting guide, please: Code? I do not know what you mean by:
" this resulted in a regression line that was plotted perpendicular to
the data when added with the abline function."
Of course, maybe someone else will groc this.
Is this homework?
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
albyn
On Sat, Nov 24, 2012 at 07:27:25PM -0500, Catriona Hendry wrote:
> Hi!
>
> I have a question that is probably very basic, but I cannot figure out how
> to do it. I simply need to
I have end of semester teaching evaluation data of the following form:
> head(evaluations)
Course Prefix Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14
1 2330301 2 4 3 3 3 4 4 1 2 5 4 1 1 1 1
2 2330301 2 3 3 3 3 3 5 1 2 5 8 1 1 1 1
3 2330301
Hi!
I have a question that is probably very basic, but I cannot figure out how
to do it. I simply need to compare the significance of a regression slope
against a slope of 1, instead of the default of zero.
I know this topic has been posted before, and I have tried to use the
advice given to othe
Jasmin wrote
> I try to use hansen-hurwitz and horvitz-thompson estimator.So I should
> generate samples which come from normal distribution (mu=50,sigma=3).
I have taken the liberty of scaling the problem down to something more
digestible and have changed lines 5 and 7 in your code
nsamples=10
s
On Nov 24, 2012, at 4:58 AM, frespider wrote:
HI A.k,
I need one more question, if you can answer it please
M <- matrix(sample(1:8000),nrow=100)
colnames(M)<- paste("Col",1:ncol(M),sep="")
apply(M,2,function(x) c(Min=min(x),"1st Qu" =quantile(x,
0.25,names=FALSE),
You have all the information that you need to do the pooled t-test using
the formula in many intro stats textbooks and probably on wikipedia as
well, just plug your numbers into the formulas in the book (R can act as
the calculator to make this easier).
Or sometimes simpler (for the human, the com
jholtman wrote
> What do you want to do with the samples after you generate them? What
> are the parameters for the normal distribution? You left a lot of
> information out. You can generate 500,000 numbers and then store them
> in a 1x50 matrix quite easily.
>
> On Sat, Nov 24, 2012 at 5:0
HI,
The example data you gave have only one row for the 1st element of list. So,
it would be better to add it as:
lapply(result,function(x) {x[[2]]<-y
return(x)})
#$`Error: subject`
#Component 1 :
# Df Sum Sq Mean Sq F value Pr(>F)
#Residuals 4 12.4 3.1
#
#Compon
Hello,
I don't know if this is it, do you want a 4 digit year or month-yy? The
following function returns month-yy.
fun <- function(x, format = "%B-%y"){
fmt <- format
x <- as.Date(paste("01", x, sep = "-"), format = paste("%d", fmt,
sep = "-"))
m <- as.integer(format(x, "%m"))
Hi,
Try this:
dat1<-read.table(text="
site,date,precipitation,temp_max,temp_min
Castle Peak,January-70,0,32,18
Castle Peak,January-70,0,39,9
Castle Peak,September-70,0,34,5
Castle Peak,September-70,0,30,7
Castle Peak,October-70,0,40,6
Castle Peak,November-70,0,45,10
Castle Peak,December-70,0,43,8
C
Hello,
I have a list of data with multiple elements, and each element in the list
has multiple variables in it. Here's an example:
### Make the fake data
dv <- c(1,3,4,2,2,3,2,5,6,3,4,4,3,5,6)
subject <- factor(c("s1","s1","s1","s2","s2","s2","s3","s3","s3",
"s4","s4","s4","s5","s5","s5"))
myfact
Dear R Help,
I am having difficulty using Variogram within GLS to examine spatial structure
of nested data. My data frame consists of ecological measurements of a forest,
in which three landscape positions ("landposi") are compared. Each landscape
position is replicated five times ("replicat"
1st. Calm down, this doesn't seem that important.
Then you will need to know some base functions.
see
?rnorm
Doing this 10,000 times and making them of size 50 is no problem.
FYI: I don't understand what "with replacement case" means; could you
clarify?
Jasmin wrote
> Hi,
> I want to gener
Hello,
Right, sorry, it should be nrow(x). I had created a variable nr <-
nrow(x) and forgot to check it after changing it.
incub <- function(x){
x$Incubation <- 0
x$Incubation[1] <- x$Symptomes[1]
if(nrow(x) > 1)
x$Incubation[2] <- sum(x$Symptomes[1:2])
for(i in seq_l
i want to generate an odf report using R,
the report is generated but the run stop just after the instruction:
odfWeave(inputFile,outputFile)
and i get this error:
Error in odfWeave(inf, outf) : Error removing work dir
please help me it's an emergency.
thanks
--
View this message in context:
If I have data (below) and need some help in figuring out how I can change the
values of my date column, so that a year will be from September-August? So the
year
1990 = September 89-August 90; 1991
= September 90-August 91, etc...
I was trying to use the if() function, but am unable to figur
Dear Antti
On 20 November 2012 10:24, Antti Simola wrote:
> I have estimated system of three linear equations with one non-linear
> restrictions with nlsystemfit.
Please read the FAQ at http://www.systemfit.org/
> I was wondering how I can calculate the
> R-squared (or some alternative coeffici
Marcus,
Best guess is one of those variables is a factor and you are thinking it is
numeric.
Please use
dput(head(Jitirana))
and send the resulting exeutable statement.
Please control your email so that the lines are properly transmitted.
Your entire email came as one paragraph.
Please read
Johannes,
This will get you started
tmp <- data.frame(x=rnorm(10), y=rnorm(10, 1000, 100), txt=letters[1:10])
plot(y ~ x, data=tmp)
text(x=tmp$x+.05, y=tmp$y-20, labels=tmp$txt)
rect(tmp$x-.05, tmp$y-25, tmp$x+.1, tmp$y-10)
Rich
You will probably need to use the xlim and ylim arguments on the
Hey there.
I am running a multiple regression and want to see whether a robust
regression would provide different results, since there is some
heteroscedasticity and other minor violations of regression assumptions.
When I run the model using the robustbase package,
> modelrob=lmrob(m1)
I receiv
Hi,I use the 'lmekin' model of the 'kinship' package of R in order to estimate
heritability. I want to estimate the confidence interval of the variance
coefficient and so I should use a bootstrap simulation. The pedigree file has
1386 subjects so I create a kinship matrix [1386*1386].This is th
Hi,I use the 'lmekin' model of the 'kinship' package of R in order to estimate
heritability. I want to estimate the confidence interval of the variance
coefficient and so I should use a bootstrap simulation. The pedigree file has
1386 subjects so I create a kinship matrix [1386*1386].This is th
Hi,
You are right. Range is supposed to be one value (i.e the
difference between largest and smallest). For some reason, the function
range(x) gives both the values.
The description for ?range() is:
"Description:
‘range’ returns a vector containing the minimum and maximum of all
Hello,
Try the following.
incub <- function(x){
x$Incubation <- 0
x$Incubation[1] <- x$Symptomes[1]
if(nr > 1)
x$Incubation[2] <- sum(x$Symptomes[1:2])
for(i in seq_len(nrow(x))[-(1:2)])
x$Incubation[i] <- sum(x$Symptomes[i - (0:2)])
x
}
contag <- function(x){
Hallo there, I've got a simple question concerning a plot attempt of mine. I am
trying to plot two variables using the following code: # Creating a Graph
attach(Jitirana) plot(Sozialkapital, Migration)
abline(lm(Migration~Sozialkapital)) title("Regression of Sozialkapital on
Migration") Simple
This question is in continuation to the one posted in StackOverflow :
http://stackoverflow.com/q/13542480/1029725
Thanks in Advance
Ch
--
View this message in context:
http://r.789695.n4.nabble.com/Does-R-has-any-SVG-devices-that-allow-setting-of-zooming-and-panning-in-addition-to-Tooltips-and
On Nov 24, 2012, at 5:20 AM, mee1d3hs wrote:
I still can't get this to work,
I sent a message yesterday that indicated that one of you earlier
attempts was successful on my machine running the same (or roughly the
same OS) and a current version of R. You seem to be ignoring the
possibil
On Nov 23, 2012, at 8:42 PM, Brian Feeny wrote:
I am trying to make it so two columns with similar data use the same
internal numbers for same factors, here is the example:
read.csv("test.csv",header =FALSE,sep=",")
V1V2 V3
1 sun moonstars
2 stars moon sun
3
My message much earlier in the thread was
> I think that bquote, with its .() operator, suffices for [almost?] any
single title;
> don't bother fiddling with expression(), substitute(), or parse(). (You
can make
> those work in many situations, but if you stick with just bquote then you
?ifelse
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Enginee
> isn't range mean the different between the max and min
That is one meaning of "range". There are many. To see what R's definition is
type
? range
or
help("range")
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [
Dear R users.
I am little lost and i need your help.
I have such data.
DATE i Symptomes t
1 2009-04-24 Mexique 0 14358
2 2009-04-24 usa 0 14358
3 2009-04-26 Mexique18 14360
4 2009-04-26 us
Hi everyone,
i´m trying to graphically display distributions with r and i´m working with
makrodata from the WVS.
the command i´m using is
> plot (Makrodata$v11, Makrodata$v12, xlab="Democracy Score Economist",
> ylab= share religious people")
I spent some time on this simple question, also searched the forum,
eventually hacked my way to an ugly solution for my particular problem but I
would like to improve my coding:
I have data of the form:
df <- expand.grid(group=c('copper', 'zinc', 'aluminum', 'nickel'),
condition1=c(1:4))
I would
I still can't get this to work, I am just trying to learn and this is
supposed to be a feature of R, the ability to combine math notation in
charts and exhibits
I did some more work to try to show what I am trying it to and what is not
working
x <- rnorm(1000,mean=10,sd=2)
par(mfcol=c(3,3))
Yes I read that link but I have lapack version 3.3.1-1:
Paquete: liblapack3gf
Nuevo: sí
Estado: instalado
Instalado automáticamente: sí
Versión: 3.3.1-1
Prioridad: opcional
Sección: libs
Desarrollador: Ubuntu Developers
Arquitectura: i386
Tamaño sin comprimir: 8.098 k
Depende de: debconf (>= 0.5
HI A.k,
I need one more question, if you can answer it please
M <- matrix(sample(1:8000),nrow=100)
colnames(M)<- paste("Col",1:ncol(M),sep="")
apply(M,2,function(x) c(Min=min(x),"1st Qu" =quantile(x, 0.25,names=FALSE),
Range = range(x),
Median = q
I tried to run a Random effect Panel regression and i get this error:
Errore in swar(object, data, effect) :
the estimated variance of the individual effect is negative
>
can you help me trying to understand the problem? (sorry for m bad english)
Thanks to everybody
--
View this message in
Why I am getting this error?
Error in getHTMLFormDescription(docNifty)[[1]] : subscript out of bounds
--
View this message in context:
http://r.789695.n4.nabble.com/postForm-in-RCurl-and-library-RHTMLForms-tp3026742p4650636.html
Sent from the R help mailing list archive at Nabble.com.
__
Hello,
If you want the factor sorted, you'll have to do it manually.
levs <- sort(unique(as.character(unlist(dat
Rui Barradas
Em 24-11-2012 12:57, Rui Barradas escreveu:
Hello,
You can do what you want, but the coding of factors starts at 1 not at 0.
dat <- read.table(text="
V1V2
Hi,
If I understand your question, this would do it:
z2<-transform(z2,Hr=format(index(z2),"%H"))
z2
# Ta HR RS v Hr
#2010-01-01 11:00:00 5.51 100 0 1.1 11
#2010-01-02 11:00:00 5.64 100 0 2.4 11
#2010-01-03 06:00:00 5.40 100 0 2.3 06
A.K.
- Original Message -
Dear Maya,
I think that what you've done should work fine, though I'm not sure why you
created your own UNIT variable rather than allowing sem() to generate the
constant.
Best,
John
On Sat, 24 Nov 2012 10:33:50 +0200
Maya Abou Zeid wrote:
> Dear John,
>
> Many thanks for your response.
> I
Hello,
You can do what you want, but the coding of factors starts at 1 not at 0.
dat <- read.table(text="
V1V2 V3
1 sun moonstars
2 stars moon sun
3 cat dog catdog
4 dog moon sun
5 bird plane superman
6 1000 dog 2000
", header = TRUE)
levs <- unique
On Sat, Nov 24, 2012 at 12:26 PM, Suzen, Mehmet wrote:
> If you want to handle a generic case, best thing is to create an R
> package.
And better than best is to use devtools to save you a fiddly
edit/build/install cycle. You don't even have to think of it as a
package, its just a folder called R
If you want to handle a generic case, best thing is to create an R
package. It is
much easier to manage that using source(), if you have lots of
different functionality
and data files. Also look at ?system.file.
On Sat, Nov 24, 2012 at 7:49 AM, Jeff Newmiller
wrote:
> It is straightforward to loa
allvals <- rt(1000,df=11)
## 1000 samples is overkill: slightly more than
##500*(1.05) should be large enough
subvals <- (allvals[abs(allvals)
Thank you very much bbolker. It works very well!
Best regards
Thomas
--
View this message in context:
http://r.789695.n4.nabble.com/Student-t-
# load example linear model from ?lm
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
lm.D90 <- lm(weight ~ group - 1) # omitting intercept
# store the summary()
Dear John,
Many thanks for your response.
I'd just still like to double check that I have indeed used the raw moment
matrix method correctly in sem. In my model, some equations are in deviations
form and have no intercept, while some have intercept.
sem.QT.1 <- sem(mod.QT.1, data=QTrav, formul
Hi,
I want to do stock price simulation. First of all, I used the
geometric brownian motion. To simulate the values, I used not the
closed form solution for the GBM given by:
S_t=S_0*exp[(μ−σ^2)t+σWt]
but the discrete version, so I can "see" every day realization:
S_i+1=μΔt∗S_i+σφΔt∗S_i+S_i
No
This was answered this week in
https://stat.ethz.ch/pipermail/r-help/2012-November/329946.html
On 23/11/2012 16:05, arysar wrote:
I usually ran different statistical analysis in R with routines that
use lapack like gam() lm(), etc but after several updates of libraries
the following error appea
67 matches
Mail list logo