H
ello,
Please reply to the list. You will have more chance to get a reply.
As I am not a Windows user, I can't help you more. But this problem has
been reported in this thread, with a reply by Paul Murrell, one of the
author of the package you are trying to use.
https://stat.ethz.ch/pipermail/r
Dear R Helpers,
I would like to pull the CIK number from the web page
http://www.sec.gov/cgi-bin/browse-edgar?CIK=MSFT&Find=Search&owner=exclude&action=getcompany
If you put this web page into your browser you will see the CIK number in
red on the left side of the page near the top.
When I try
Hello,
What is the result of "sessionInfo()"?
Regards,
Pascal
2013/8/14 Andrew Halford
> Hi Listers
>
> I have been trying to import a .ps graphic file into R using the grImport
> package but I keep getting the following error message
>
> Error in PostScriptTrace("fish.ps") :
> status 127
Hi Listers
I have been trying to import a .ps graphic file into R using the grImport
package but I keep getting the following error message
Error in PostScriptTrace("fish.ps") :
status 127 in running command 'gswin32c.exe -q -dBATCH -dNOPAUSE
-sDEVICE=pswrite
-sOutputFile=C:\Users\ahalford\AppD
Among the many solutions, here is the one using phenology package:
library("phenology")
plot_errbar(1:100, rnorm(100, 1, 2),
xlab="axe x", ylab="axe y", bty="n", xlim=c(1,100),
errbar.x=2, errbar.y=rnorm(100, 1, 0.1))
or
x <- 1:100
plot_errbar(x=1:100, rnorm(10
I had a similar problem and found when looking
inside one of the lattice functions that the
legend colours are controlled by the superpose
series eg superpose.line, superpose.polygon etc
in trellis.par.set/get or par.settings
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
Univer
Hi Hadley,
I suspect that the dispatch algorithm doesn't realize that selection
is ambiguous in your example. For 2 reasons:
(1) When it does realize it, it notifies the user:
setClass("A", "NULL")
setGeneric("f", function(x, y) standardGeneric("f"))
setMethod("f", sig
Hi,
You could try:
dat2<- read.table(text='
Respondent, Question1
1, "1,4,7"
2, "2,7,5"
3, "6,3,5"
4, ""
',sep=",",header=TRUE,stringsAsFactors=FALSE)
library(stringr)
dat2New<-cbind(dat2,do.call(rbind,lapply(
str_split(str_trim(dat2[,2]),","),as.numeric)))
colnames(dat2New)[3:5]<- paste("Q1",coln
On 08/13/2013 11:41 AM, Siraaj Khandkar wrote:
On 08/13/2013 12:17 PM, Walter Anderson wrote:
I have to process a set of survey data with questions that are formatted
like this;
1) Pick your top three breeds (pick 3)
1 Rottweiler
2 Pit Bull
3 German Shepard
4 Poodle
5 Border Coll
It would seem that in going to a 64 bit architecture you have not escaped your
memory problems. Such problems are highly varied in details, so you would need
to be much more specific about how you are encountering this problem before
anyone could help. Read the Posting Guide and make a reproduci
I have a set of survey data where I have answers to identify preference
of three categories using three questions
1) a or b?
2) b or c?
3) a or c?
and want to obtain weights for each of the preferences
something like X(a) + Y(b) + Z(c) = 100%
I am at a loss how how to calculate this from the
Hi everyone:
I am running a code in R and I get the following message after using
large files (files larger than 2GB):
"Runtime error!
this application has requested the Runtime to terminate it in an usual way.
Please contact the application's support team for more information"
Another perso
Hi,
You could try:
tmp[,1]<- as.character(tmp[,1])
tmp[,1][-grep(",",tmp[,1])]<-paste0(",,",tmp[,1][-grep(",",tmp[,1])])
tmp2<-data.frame(read.table(text=tmp[,1],sep=",",header=FALSE,stringsAsFactors=FALSE),rID=tmp[,2],stringsAsFactors=FALSE)
colnames(tmp2)[1:3]<-paste("sID",letters[1:3],sep="
Hi,
You could try:
set.seed(24)
dat1<- as.data.frame(matrix(sample(1:50,29*6,replace=TRUE),ncol=6))
((seq_len(nrow(dat1))-1)%/%6)+1
# [1] 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5
#For a particular column:
aggregate(dat1[,5],list(((seq_len(nrow(dat1))-1)%/%6)+1),FUN=mean)
# Gr
On 13-08-2013, at 18:46, jsf1982 wrote:
> Hi,
> Many apologies for the simplicity (hopefully!) of this request - I can't
> find it on the forum, but it may have been asked in the past.
>
> I have a data frame consisting of ~2000 rows. I simply want to take the
> average of the first 6, then the
Hello.
I am using the aovp() function from the library lmPerm with one factor
(group: 3 levels) controlling for 2 covariates. I now want to conduct a
post-hoc test using the same model. Unfortunately, I did not find an
appropriate test which works with 2 covariates. I would be grateful for any
sugg
Try,
sID <- c("a", "1,2,3", "b", "4,5,6")
tmp1 <- strsplit(sID,',')
tmp2 <- lapply(tmp1,
function(x) if (length(x)==1) c('','',x) else x )
tmp3 <- matrix(unlist(tmp2),ncol=3, byrow=TRUE)
rID <- c("shr1125", "bwr331", "bwr330", "vjhr1022")
newdf <- data.frame(cbind(tmp3,rID))
You could also try:
##Out1 is the output dataset
Out1$PRIMAIRY<-as.logical(Out1$PRIMAIRY) #changing the class
#dat1 input dataset
vec1<- paste(dat1[,1],dat1[,2],colnames(dat1)[2],sep=".")
res2<-reshape(dat1,idvar="newCol",varying=list(2:26),direction="long")
res3<-res2[order(res2[,4]),]
res4<- re
Lauria: For historical reasons the logistic regression (binomial with
logit link) model portion of a zero-inflated count model is usually
structured to predict the probability of the 0 counts rather than the
nonzero (>=1) counts so the coefficients will be the negative of what you
expect based on
On 08/13/2013 03:06 PM, Stackpole, Chris wrote:
From: Kevin E. Thorpe [mailto:kevin.tho...@utoronto.ca]
Sent: Monday, August 12, 2013 11:00 AM
Subject: Re: [R] Memory limit on Linux?
What does "ulimit -a" report on both of these machines?
Greetings,
Sorry for the delay. Other fires demanded
I have a dataFrame
sID <- c("a", "1,2,3", "b", "4,5,6")
rID <- c("shr1125", "bwr331", "bwr330", "vjhr1022")
tmp <- data.frame(cbind(sID,rID))
but I need to split tmp$sID into three different columns, filling locations
where tmp$sID has only one value with NA.
I can split tmp$sID by the comma
t
> From: Kevin E. Thorpe [mailto:kevin.tho...@utoronto.ca]
> Sent: Monday, August 12, 2013 11:00 AM
> Subject: Re: [R] Memory limit on Linux?
>
> What does "ulimit -a" report on both of these machines?
Greetings,
Sorry for the delay. Other fires demanded more attention...
For the system in which
What about something like this:
tmp <- data.frame(var1 = rnorm(36), ind = gl(6,6))
with(tmp, tapply(var1, ind, mean))
You can see that your version of
mean(tmp[1:6,c("var1")])
gives the same as mine for the first 6 rows.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r
According to your first post,
"
NewDataFrame <- data.frame(ID=integer(), DSYSRTKY=integer(), CODE=character(),
PRIMAIRY=logical())"
The new output dataset: "Out1"
str(Out1)
'data.frame': 48 obs. of 4 variables:
$ ID : chr "1" "2" "3" "4" ...
$ DSYSRTKY: chr "10005" "10005"
On 08/13/2013 12:17 PM, Walter Anderson wrote:
I have to process a set of survey data with questions that are formatted
like this;
1) Pick your top three breeds (pick 3)
1 Rottweiler
2 Pit Bull
3 German Shepard
4 Poodle
5 Border Collie
6 Dalmation
7 Mixed Breed
and the answ
The following should help:
What does R ask you each time you quit R? Answer no.
Start R with
R --no-save
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 8/13/13 9:15 AM, "Jannis" wrote:
>Dear R users,
>
>
>occasio
sir i have installed plant breeding library well. But when i import the
file in R and give command
*> data(fulldial)
Warning message:
In data(fulldial) : data set fulldial not found*
above warning message is found please guide me. my data is under
MALE FEMALE YIELD 1 1 53.333 1 2 52.333 1
Hi,
Many apologies for the simplicity (hopefully!) of this request - I can't
find it on the forum, but it may have been asked in the past.
I have a data frame consisting of ~2000 rows. I simply want to take the
average of the first 6, then the next 6, then the next 6 until the end of
the table.
T
Dear All,
I am running a negative binomial model in R using the package pscl in oder to
estimate bed sediment movements versus river discharge. Currently we have
deployed 4 different plates to test if a combination of more than one plate
would better describe the sediment movements when the riv
Hi,
My desired output for my sample!! using dput():
structure(list(ID = c("1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30",
"31", "32", "33", "34", "35", "36", "37", "38", "3
Yes, you're right.
So I guess you should match on duplicated values, something like (untested)
with(dat1, dat1[individual %in% individual[duplicated(individual)],]
which is presumably essentially what you gave.
-- Bert
On Tue, Aug 13, 2013 at 10:41 AM, arun wrote:
> Bert,
>
> dat1<-structure(
Hi,
You could try:
lapply(split(Clean,list(Clean$TERM,Clean$INST_NUM)),function(x)
shapiro.test(x$GRADE))
A.K.
- Original Message -
From: Robert Lynch
To: r-help@r-project.org
Cc:
Sent: Tuesday, August 13, 2013 1:46 PM
Subject: [R] ave function
I've written the following function
C
On 13/08/2013 18:47, Jannis wrote:
Dear r users,
what could cause such an error:
"internal error -3 in R_decompress1"
unfortunately the error kills all my usual error catching mechanisms an
appears on a remote cluster so I can not really tell you which command
etc is causing it.
It is a co
I've written the following function
CoursePrep <- function (Source, SaveName) {
Clean$TERM <- as.factor(Clean$TERM)
Clean$INST_NUM <- as.factor(Clean$INST_NUM)
Clean$zGrade <- with(Clean, ave(GRADE., list(TERM, INST_NUM), FUN =
scale))
write.csv(Clean,paste(SaveName, "csv", sep ="."), ro
Dear r users,
what could cause such an error:
"internal error -3 in R_decompress1"
unfortunately the error kills all my usual error catching mechanisms an
appears on a remote cluster so I can not really tell you which command
etc is causing it.
Thanks for any hints on where to dig for th
Bert,
dat1<-structure(list(SameName = 1:6, Individual = c(4L, 15L, 1L, 15L,
2L, 4L), Age = c(80L, 56L, 75L, 56L, 58L, 80L), Gender = c("M",
"F", "F", "F", "F", "M")), .Names = c("SameName", "Individual",
"Age", "Gender"), class = "data.frame", row.names = c(NA, -6L
))
Your solution gives:
dat
Dear R users,
I've just updated the WriteXLS package (on R 3.0.1) and I now have an error
when exporting a data.frame with the argument Encoding="latin1". For
example, these two lines work:
library(WriteXLS)
WriteXLS("iris", "iris.xls")
whereas these ones don't work:
library(WriteXLS)
Wr
R-3.0.1 (use all digits for describing an R version) is not the problem.
Most likely you are masking a function
or something like that. When you started the R session, did you get a
message about "restoring a previous session"?
If so, then close R, find the directory in which you were working and
Thanks Bert!
I think they are relatively important. What I am doing is comparing 2003 with
2013 distribution and use of this species in an specific sampled area. They are
currently way lower numbers than in 2003, however in both years the data are
zero inflated. Most of the outliers are in 2003
I think I understand your question. You need to make sure that you are
setting the right parameters in your theme. Use trellis.par.get() to have
a look at the MANY possible settings. For example, in your case, to have
the boxplots and rectangles be the same color:
my.theme <- list(
box.umbre
I have to process a set of survey data with questions that are formatted
like this;
1) Pick your top three breeds (pick 3)
1 Rottweiler
2 Pit Bull
3 German Shepard
4 Poodle
5 Border Collie
6 Dalmation
7 Mixed Breed
and the answers are formatted like this:
Respondent, Question1
1,
I don't see a question in what you wrote. Your graph has some similarities
to some of my examples.
Please look at the demo in the HH package
## install.packages("HH") ## if necessary
library(HH)
demo("bwplot.examples", package="HH")
Rich
On Tue, Aug 13, 2013 at 10:00 AM, Anna Zakrisson Braeun
Dear R users,
occasionally I find .Rhistory and/or .RData files cluttered around in my
file structure. Is there a way to tell R not to save such files? Or to
use one central location where to save them (if they are of any use)? I
have looked through options() to no avail.
Cheers
Jannis
__
Sorry. Typo. Corrected version is:
yourframe[!duplicated(yourframe$Individual),]
-- Bert
On Tue, Aug 13, 2013 at 9:05 AM, Bert Gunter wrote:
> ?duplicated
>
> yourframe[!duplicated(yourframe)$Individual,]
>
> -- Bert
>
> On Tue, Aug 13, 2013 at 8:12 AM, Kripa R wrote:
>> I manipulated the co
The central question is: What caused the 3 unusual values? What is
their scientific relevance? Only you can answer that, not us.
-- Bert
On Tue, Aug 13, 2013 at 8:51 AM, Marta Lomas wrote:
> Thanks for your interest and prompt answer!
>
> What I try to estimate is the correlation of one bird spe
I do not know what you are exactly estimating, but if it is about count models
and the model fit gets better when you drop the outliers, it does not say, that
the model is now more correct. It just says, if the data were without the
outliers, this model would fit good.
Overdispersion in count
?duplicated
yourframe[!duplicated(yourframe)$Individual,]
-- Bert
On Tue, Aug 13, 2013 at 8:12 AM, Kripa R wrote:
> I manipulated the code you sent and it works perfectly, thanks!
>
> .kripa
>
>> Date: Tue, 13 Aug 2013 08:10:53 -0700
>> From: smartpink...@yahoo.com
>> Subject: Re: [R] pulling o
Thanks for your interest and prompt answer!
What I try to estimate is the correlation of one bird species counts with a set
of environmental parameters. The count data are zero-inflated and
overdispersed. I am modeling with hurdle-negative binomial-mixed effects.
The results are very difficult t
HI,
Your desired output is not clear. May be this helps:
#dat1 is the dataset
dat1$ID<- 1:nrow(dat1)
library(reshape2)
res1<-melt(dat1,id.vars=c("ID","DSYSRTKY"))
res1$value<-res1$value!=""
res1[,2]<- as.integer(as.character(res1[,2]))
res1[,3]<-as.character(res1[,3])
colnames(res1)[3:4]<-c("CO
Hi again,
I have a question on some outliers that I have in my response variable (wich
are bird counts). At the beginning I did not drop them
out because they are part of the normal counts and I considered them
"ecologically" correct.
However, I
tried some of the same models without ou
I manipulated the code you sent and it works perfectly, thanks!
.kripa
> Date: Tue, 13 Aug 2013 08:10:53 -0700
> From: smartpink...@yahoo.com
> Subject: Re: [R] pulling out pairs from data frame
> To: kripa...@hotmail.com
> CC: r-help@r-project.org
>
>
>
> Hi,
> The conditions are still not
Hi,
The conditions are still not clear.
dat2<- dat1[dat1$Individual%in% reps,]
dat2
# SameName Individual Age Gender
#1 1 4 80 M
#2 2 15 56 F
#4 4 15 56 F
#6 6 4 80 M
A.K.
If you take an example which works with slots,
setClass("A", representation(a = "numeric")
setClass("B", contains = c("A"), representation(b = "numeric"))
a <- new("A", a = 2)
b <- new("B", a = 3, b = 2)
setClass("AB", contains = c("A", "B"))
new("AB", a = 2, b = 3)
You see, that there is only o
Thank you David.
I had to sort the data afterwards for it to work:
S<-1:86
B<-1:15
V<-1:45
S2 <- data.frame(Group=rep("S", length(S)), Cat=factor(S))
B2 <- data.frame(Group=rep("B", length(B)), Cat=factor(B))
V2 <- data.frame(Group=rep("V", length(V)), Cat=factor(V))
table(rbind(S2, B2, V2))
y<-t
I am teaching a summercourse this and the next week where the students are
using R.
We have downloaded and use the new version R.3.0. It has worked perfectly until
today where some of the basic functions have started NOT to work.
Examples are sd() and lm ()
The message we get is Error: c
Hi,
Yes, I have searched stack overflow.
My issue is to simply change coloring in boxes and legend in my bwplot. I have
done this many times in lattice, but now I have been tweaking the plot somewhat
and I can no longer apply the color changes.
I would really appreciate some help.
A. Zakrisson
Hi experts,
I have a dataframe with 100k+ records. it has a key/id column and 25 code
columns. I would like to restructure it having a row for each code column.
I have a structure like this (used dput):
structure(list(DSYSRTKY = structure(c(1L, 2L, 3L, 3L, 4L, 4L), .Names =
c("1",
"2", "3", "4",
Oops! Ok So I have this file:
SampleName Individual Age Gender
1 4 80 M
2 15 56 F
3 1 75 F
4 15 56 F
5 2 58 F
6 4 80 M
And I want to pull out paired samples, so the resulting file would look
something like this:
SampleName Individual Age Gender
1 4 80 M
2 15 56 F
4 15 56 F
6 4 80 M
.kripa
Thank you for your response, Terry.
To put the discussion into perspective, my data set is quite large with
over 160,000 samples and 38 variables. The event is true for all samples in
this dataset. The distribution is zero-inflated (i.e. most events occur at
time = 0).
The result of the cox.zph l
> The class AB inherits from A and from B, but B already inherits from class A.
> So actually you only have an object of class B in your object of class AB.
> When you call the function f R looks for a method f for AB objects. It does
> not find such a method and looks for a method of the object
Try this
S2 <- data.frame(Group=rep("S", length(S)), Cat=factor(S))
B2 <- data.frame(Group=rep("B", length(B)), Cat=factor(B))
V2 <- data.frame(Group=rep("V", length(V)), Cat=factor(V))
table(rbind(S2, B2, V2))
-
David L Carlson
Associate Professor of Anthropol
Robert U yahoo.fr> writes:
>
> Dear
> R-users,
>
[snip]
This question probably belongs on r-sig-mixed-mod...@r-project.org .
Followups there, please.
> Let's say that I have 2 random effects, A (e.g. species, k=2) and B
(e.g. individuals, n=100). I made some research about model syntax,
Hadley,
The class AB inherits from A and from B, but B already inherits from class A.
So actually you only have an object of class B in your object of class AB. When
you call the function f R looks for a method f for AB objects. It does not find
such a method and looks for a method of the objec
Hello!
I have a very large experimental design space (all possible combinations of
all possible levels of several factors). For example, 'allcand' below has
1,875,000 possible combinations of 9 factors.
allcand<-expand.grid(a1=as.factor(1:5),a2=as.factor(1:5),a3=as.factor(1:5),a4=as.factor(1:5),
That's the primary reason for the plot: so that you can look and think.
The test statistic is based on whether a LS line fit to the plot has zero slope. For
larger data sets you can sometimes have a "significant" p-value but good agreement with
proportional hazards. It's much like an example
Hi all,
Any insight into the code below would be appreciated - I don't
understand why two methods which I think should have equal distance
from the call don't.
Thanks!
Hadley
# Create simple class hierarchy
setClass("A", "NULL")
setClass("B", "A")
a <- new("A")
b <- new("B")
setGeneric("f", f
1) Why use Nelder-Mead with optimx when it is an optim() function. You
are going from New York to Philadelphia via Beijing because of the extra
overhead. The NM method is there for convenience in comparisons.
2) NM cannot work with NA when it wants to compute the centroid of
points and search
Hello,
r1$df and r2$df don't exist.
Regards,
Pascal
2013/8/13 Ingo Wardinski
> G'day
> I try do compute some F-statistics of a singular spectrum analysis of a
> timeseries sv
> I run:
> > require(Rssa)
> > s <- ssa(sv)
> > summary(sv)
>Min. 1st Qu. MedianMean 3rd Qu.Max.
> -4.2
Hi Pancho,
there are already a bunch of R User Groups around the world:
http://rwiki.sciviews.org/doku.php?id=rugs:r_user_groups
The Revolution Analytics guys has posted some tips on how to found one (
http://www.revolutionanalytics.com/news-events/r-user-group/how-to-start-r-user-group.php)
and
G'day
I try do compute some F-statistics of a singular spectrum analysis of a
timeseries sv
I run:
> require(Rssa)
> s <- ssa(sv)
> summary(sv)
Min. 1st Qu. MedianMean 3rd Qu.Max.
-4.238 2.761 6.594 6.324 10.410 15.180
> r1 <- reconstruct(s,groups = list(1:5))
> r2 <- reco
Hi Gergely!
This sounds so exciting - so R is turning 20 years old? How did you set up your
R users' group? What are the best practices in going about to set one up?
I would be keen on establishing one here in Windhoek, Namibia.
Pancho Mulongeni
Research Assistant
PharmAccess Foundation
1 Fouché
Dear
R-users,
Iâve been
looking at the lmer function (lme4 package) in order to set up a mixed linear
model
and something about the syntax of the random effects eludes me. Iâd like a
hand
with understanding a specific point, if someone does master this functionâ¦
Letâs say
that I have
Hello,
Maybe this link might help:
http://www.stats.uwo.ca/faculty/yu/Rmpi/install.htm
Regards,
Pascal
2013/8/13 Patrick Connolly
>
> With R-3.0.1
>
> Loading required package: Rmpi
> Failed with error: package Rmpi was built before R 3.0.0: please
> re-install it
>
>
> And when I try t
With R-3.0.1
Loading required package: Rmpi
Failed with error: ‘package ‘Rmpi’ was built before R 3.0.0: please re-install
it’
And when I try to reinstall Rmpi, I get this
checking mpi.h usability... no
checking mpi.h presence... no
checking for mpi.h... no
configure: error: "Cannot fi
Hi,
How can I add to LDA ggplot axes the Percentages of variance explained?
Script:
/require(MASS)
require(ggplot2)
iris.lda<-lda(Species ~ Sepal.Length + Sepal.Width + Petal.Length +
Petal.Width, data = iris)
datPred<-data.frame(Species=predict(iris.lda)$class,predict(iris.lda)$x)
ggplot(da
Dear R helpers,
I try to find the model parameters using mle2 (bbmle package). As I try to
optimize the likelihood function the following error message occurs:
Error in grad.default(objectivefunction, coef) :
function returns NA at
1e-040.001013016911639890.0003166929388711890.00093516359482939
76 matches
Mail list logo