know how should I do this?
Consider
setdiff( licenseY, licenseX)
or, more or less equivalently,
licenseY[ (!licenseY %in% licenseX) ]
S Ellison
***
This email and any attachments are confidential. Any
> Rather than doing them manually,
> you might have better luck with ggbiplot, and the ggrepel package designed to
> 'repel' point labels so they don't overlap.
For base graphics, 'thigmophobe.lables' in the plotrix package also works to
avoid label overlap.
Steve E
versa?
[not that that will help _me_ answer your question, but it may help someone
else].
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. I
wouldn't a binary search find the correct location
in O(log(n))? (roughly log2(n)?)
After that any insertion depends on how fast R can move memory about so the
overall speed clearly depends on factors other than finding the loc
ta.frame(quant=factor(letters))
looks very like you're assigning a data frame to the function 'df' (density for
the F distribution)
It doesn't, because R is clever. But it's really not good practice to use
common function names as variable names. Too much potential for
> -Original Message-
> My data come from statistical model N(5, 2), with n=100, call this model_1
> Then, I add bias to that data with N(3, 1), with n=100, call this model_2
Do you mean you have data from N(5,2) that has had data from N(3,1) added to
it, or that you have two different
> ruipbarra...@sapo.pt
> Maybe the following (untested).
>
> table(df$Protocol[df$Speed == "SLOW"])
Could also use which.max to get the particular item: ...
tprot <- table(df$Protocol[df$Speed == "SLOW"])
ero-fill to the same length, or fill with NA, that'd be
something else ...
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-projec
to
"Basic statistics and classroom homework"'
S Ellison
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of kashyap vora
> Sent: 23 May 2016 14:04
> To: r-help@r-project.org
> Subject: [R] Programming Assignment 1: Quiz Air Polluti
> I want to write the inside function (3^(x[i]+x[j])) in a more condensed form
> cause this will help me when the multiple summations are more than two
indices<-c(i,j) #or whatever you want
3^sum( x[indices] )
> Apparently, abs(1 - 0.95) is not equal to 0.05, which I find however quite
> disturbing.
It's normal.* See R FAQ 7.31 in the html help system.
S Ellison
*... and common to all computers that use binary.
***
This email a
from glm comes up, there's a
strong likelihood that someone will point out that the covariances are not
necessarily sufficient for reliable confidence intervals on prediction (and
look! that just happened). You might want to hunt around for more authoritative
comment on that if the intervals/standard err
coordinates for each cluster. If you assign that list to an object you can then
write a separate function to format and write out the coordinates and use
lapply to run that on the list. Or you can include formatted write calls in the
by.index function, writing to a file as before.
.)
}
lapply(names(cl), Write, x=cl, filename="myclust.txt")
(Ignore the NULLs returned)
Anything more structured than that and you'll have to write a write.kmeans
replacement for write that structures the results as you need them later.
S Ellison
**
> Are you aware of any function what would query the original function call
> arguments no matter what happens in the function?
Use missing() first.
If you can't use missing() first, or use it early in a parent function and pass
a flag, you could perhaps pass a copy of the parent function call
Is there a reason not to use the convex hull for area calculations? Any curve
you put through the points would surely be at least as arbitrary as a straight
line.
S Ellison
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Alexander
> Shenk
ily is allowing for overdispersion and stata is not.
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have received this message in error
between two and
only two groups. Your files seem to have more than two years, which - at least
until my telepathic inference improves - seems likely to cause a problem for
t.test and var.test. Perhaps you were lookin
> > What I need is this:
> > [[1]]
> > [1] 1 2 3
> > [[1]]
> > [2] 1 2 3
> > [[1]]
> > [2] 1 2 3
Try
rep(list(1:3), 3)
S Ellison
***
This email and any attachmen
r example, to sort by the first column of a matrix mm:
oo <- order(mm[,1])
mm[oo,]
order() also takes multiple sort fields so can sort by several columns
simultaneously (eg sort by first column and within that by third column etc)
+")))
)
test.FN(scope=scope)
}
test.step(X.des, Y)
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org m
do things like
x[is.na(x)] <- "Empty Space"
x
or
x[is.na(x)] <- ""
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help
rp1 <- as.character(nwCorp1) ?
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
Does
do.call('cbind', list_of_dataframes)
do what you want?
S Ellison
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang
> Waser
> Sent: 09 February 2016 09:03
> To: Dénes Tóth; r-help@r-project.org
> Subject: Re: [R] H
f you want to see how
closely individuals are associated, but correlation is a possible step on the
way.
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended reci
culations).
I wouldn't exactly call it statistics - it's based on recommendations for
measurement science and they assume a pretty simple deterministic model and
that has little or nothing to do with model fitting and inference.
S Ellison
> -Original Message-
> From: R-help [mailto:r
Apologies if I've missed a post, but have the default treatment of posts and
reply-to changed on R-Help of late?
I ask because as of today, my email client now only lists the OP email when
replying to an R-help message, even with a reply-all, so the default reply is
not to the list.
I also
pair to your GPS location?
And once you have the distances you could use order() or rank() to pick the top
5 (maybe using head()) or just rank() on the distances.
And once you've picked a set you can still additionally check whether a
location was within the box.
S Ellison
**
df[order(df[,"x"]),]
or
df[order(df$x),]
And just to prevent yet more confusion, you might also want to avoid 'df' as a
name. 'df' is the function that returns the density of the F distribution ...
S Ellison
***
This em
ess', no-one
has yet pointed to Trey Causey's analysis of R-help's alleged meanness at
http://badhessian.org/2013/04/has-r-help-gotten-meaner-over-time-and-what-does-mancur-olson-have-to-say-about-it/
Up to 2013, it was apparently getting _less_ 'mean', not more.
tion(x, ...){ "AnotherName"}
str(test1)
# List of 1
# $ AnotherName: chr "justaname"
# - attr(*, "class")= chr "eem"
So it isn't your '<-', it's because you overrode 'names'
S Ellison
***
th names of the right format.
I() wrapped round a matrix or data frame does nothing like what is needed if
you include it in a data frame construction, so either things have changed
since the tutorial was written, or the authors were not handling a matrix or
data frame with I().
S Ellison
**
> I want to get the table like "output". Any possibility to get it in R?
What do the rows represent in 'output'? Places? Times? Individuals?
What do the numbers in the table relate to? Individual bird identifier? Number
of birds?
> It is clear that a ) although is a type of bracket it is called a
> parenthesis, just as ,
> is called a comma, which is a type of punctuation mark.
These things are called parentheses because of what they do, not what they are.
A parenthesis is any word or phrase inserted as an explanation
Meeting2", "Meeting3", "Meeting4","Meeting5")
>
> and have gotten a '+' at the end meaning I am missing something.
You are missing the closing bracket on the boxplot() command.
Just finish with a ')'
S Ellison
**
optim() - is pretty much
completely different from MCMC using a Gibbs sampling algorithm
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of debra ragland
> via R-help
> some sample data
> p<-matrix(c(rep(c(F,T,F),3), rep(c(T,F,T),3), rep(c(T,T,F),3),
> rep(c(F,F,T),3)))
i) Something wrong with p, here; it's a single column matrix. did you mean
E,...){
x<-subset(x,subset)
do.call(type,list(x=x[[var]],...))
}
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-
> Could you please explain about
>
> sub("^([0-9]*).*$", "\\1", fields)
See ?regex and the extensive online literature on regular expressions.
S Ellison
***
This email and any attachments are confid
xes. If it's not what you meant, you'll need
to provide the picture.
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have recei
sin(w*x) to get alpha and beta, and hence
a and p. Those values could then be used as starting values for optim or
similar.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Luigi
> Marongiu
> if I have a sample set of the following numbers x1=0.09, x2=0.94, x3=0.48,
> x4=0.74, x5=0.04 I can calculate the variance easily.
Not without concatenating them into a vector, you
t from
" amet is not the only instance of 'amet', and there is more than one instance
of 'instance', 'is', 'of' and 'and'."
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
r why you’re looping. grepl returns a vector of
logicals; you have a vector of character strings. Consider replacing 'if'
constructs with 'ifelse' - albeit a complicated ifelse() - and doing the whole
thing without a loop.
S Ellison
command you used above. If you used a different plotting
system for the bar plot the alignment would be very hard to guarantee, so stay
with base graphics for both.
S Ellison
***
This email and any attachments are confidential.
:
set.seed(1023)
dati$parts - sample(gl(2, 50))
xyplot(y~x|parts, data=dati,
panel = function(x, y, ...) {
panel.xyplot(x, y, ...)
panel.segmented(x, y, ...)
}
)
S Ellison
***
This email and any attachments
, ...)
}
)
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https
I have already tried options(max.print=99) but does not show the desired
result.
As posted above it want to share the outcome with the business owner where
there could be multiple entries.
Then just print the multiple entries. See ?duplicated for finding them
Otherwise, use things like
try tu put line
setInternet2(TRUE)
into your Rprofile.site file (located in etc directory of R installation) and
restart
R.
You may well need to specify the utils library, as follows, to make sure the
setInternet2 function is found at run time:
utils::setInternet2()
S Ellison
(that is, the
working directory will be set to R_USER's contents).
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list
My preference is to start in different working directories depending on which
project I am working on. R_USER is not a project directory. One way to do that
is to double-click on an RData file located where you want to start.
Saving an empty 'empty.RData' image in my project directories when I
-Original Message-
I compute its regression surface doing polynomical regression (fit)
...
fit - lm(z ~ poly(x,2) + poly(y,2))
.
So I want to repressent the surface
How could I do it? Any idea??
You need to write a function f of x and y that produces the fitted
in the robustbase
package to test your fixed effects; comparing the different inferences will
tell you something about which effects in OLS are simply artefacts caused by
outliers. lmRob uses comparatively recent developments in wald-type inference
tests to put the tests on a firmer footing.
S Ellison
.
Finally, you don’t need a loop at all. On a data frame, sapply would work
nicely, so (although I've not tested it) something like
sapply(desta[,2:nc], 2, function(x) ManKendall(x)$tau)
ought to do the whole thing in one shot and package it nicely into a named
vector while it's about it.
S Ellison
(x, y, ...)
panel.lmline(x, y, ...)
}
)
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have
'.'? If it does and if you include resp in the
data frame, you could drastically simplify the formula, to just resp~. That is:
out - neuralnet(resp~. , data=cbind(resp, mydata), hidden = 4, lifesign =
minimal,
linear.output = FALSE, threshold = 0.1)
S Ellison
could think about what '%' means in R. It does NOT mean 'percent'
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing
for such a small range
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have received this message in error, please notify
) etc.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch
works and sometimes doesn't, or only seems to work for small numbers
of bootstrap replicates.
But you're right; with no data, one can only guess.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8
?
do.call(expand.grid, lst)
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
See ?tiff, ?png etc and look for 'res'
S Ellison
From: R-help [r-help-boun...@r-project.org] On Behalf Of linda.s
[samrobertsm...@gmail.com]
Sent: 01 March 2015 14:50
To: r-help
Subject: [R] figure resolution
when using R for exporting figures to folder
small
laptop and it'll be a while before I get back to my desktops, I'd appreciate
any clues as to what - if anything - I could to do in the mean time to get a
working package install.
S Ellison
***
This email and any attachments
2) Switch off any anti-virus runtime checking.
Thanks; that seems to have been it - probably because of a recent Norton
update, as previous package installations worked smoothly.
S
***
This email and any attachments are
using R CMD from the package source code.
The documentation you're looking for on installation is 6.3 of 'R Installation
and Administration. For building packages locally from your own R source code,
look at 'Writing R Extensions'
S Ellison
',
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman
I want to do a boxcox transformation, but I got this:
Error: could not find function boxcox
What can I do?
Well, the recommended 'homework' in the posting guide would be a start.
i) ??boxcox, if you have any packages installed that include something with
that functionality.
ii)
You don't appear to be supplying a valid parameter set to optim.
The first argument in optim (par) must be a vector of parameters to optimise;
you're passing a vector of NAs. Thise are not finite.
Also, temp is defined as a value and optim will not be able to optimise that.
You need to define
process with the same name,
and also to check for nonexistence of an expected process.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r
an error and stopping it tells you what it can identify and leaves out
anything it can't.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help
a
root of (f(x) - 0.05)
That will normally need you to define a new function g(x) = f(x)-0.05 and apply
uniroot to g(x)
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than
, expanding to
~subject+subject:group.
so Error(subject/group) asks for a subject effect across groups _as well as_
one within groups.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8
I'd also be interested in why the 'direct, brute force' approach
(above) doesn't work,
Your example was a 3-dimensional array, so
rownames(P) - colnames(P) - c(live', 'dead')
would have worked; rownames() and colnames() work on dimnames[1] and
dimnames[2].
But
rownames(P[,,1])
could not
for substitution in plotmath...
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have received this message in error, please
-Original Message-
subsets-list(B=(A[,1] %in% c(1,2) A[,2] %in% c(1,2)) | (A[,1] %in%
c(3) A[,2] %in% c(1)) | (A[,1] %in% c(4) A[,2] %in% c(1:4)), C=(A[,1]
%in%
c(1:4) A[,2] %in% c(1,2)), D=(A[,1] %in% c(1,2) A[,2] %in% c(1:3)) |
(A[,1]
%in% c(3) A[,2] %in% c(1,2)))
David Stevens [david.stev...@usu.edu] wrote:
There are other R-friendly editors too. Tinn-R and Notepad++ come to mind.
TextPad also has an R syntax file.
S Ellison
***
This email and any attachments are confidential. Any use
See also the levene test from the car package, and for a single outlying
variance see the cochran test from the outliers package.
From: R-help [r-help-boun...@r-project.org] On Behalf Of sait k
[sa...@hotmail.de]
Sent: 08 January 2015 11:12
To:
I want to change R-3.1.1 to the default, so that when I type which R, I get
/usr/local/R-3.1.1
Change your PATH to include the R 3.1.1 directory instead of the version 2
directory?
S
***
This email and any attachments are
A solution on the link below provides the steps of updating R without losing
packages in Unix.
http://zvfak.blogspot.se/2012/06/updating-r-but-keeping-your-installed.html
How could I do that on windows 7 platform?
See the R Windows FAQ, FAQ 2.8.
representation depends only on how much you decide to
round when converting to character format. That is essentially arbitrary, so
any games you play with conversion to character are just telling you how many
digits you decided to round each number to, not how many there were to start
with.
S
,
Scope; it's important, but follows 'advanced examples' which are less
important for a beginner.
After that, Google.
And after that, R-help again.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8
),
Precipitation=as.numeric(substring(x,13)))
}
decode.lst(lst1Sub)
S Ellison
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Zilefac Elvis
Sent: 22 October 2014 16:38
To: R. Help
Subject: [R] Split fixed width data in R
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Clint Bowman
?read.fortran
Also read.fwf if it's in a file.
S
***
This email and any attachments are
referred to.
S Ellison
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have received this message in error, please notify the sender
3. all.equal(a, as.integer(a))
Closer, but be aware that all.equal will not always return TRUE or FALSE and -
more importantly - as.integer truncates towards zero and does NOT generally
round to the nearest integer.
a - 4 - sqrt(2)^2 #Analytically 2
all.equal(a, as.integer(a))
# [1] Mean
But i use a-10/b , b is some value ,may be 5, maybe 5.5
If you do floating point arithmetic on integers you'll usually get floating
point answers, including the 5.0.
See FAQ 7.31 for the usual floating point problem, and ?all.equal for the usual
answer to it. You could see if a result is
I'm stuck trying to begin an axis label in ggplot with a superscript.
For a crude work-round, you could try
ggplot(mydata) +
aes(x = x, y = y) +
geom_line() +
ylab(expression(paste(' '^{14}, C, sep = )))
S Ellison
Thanks Joshua and Sven - I completely forgot about which() .
Also
na.omit(p[p=0.05])
#and
p[p=0.05 !is.na(p)]
S.
***
This email and any attachments are confidential. Any use...{{dropped:8}}
I want to plot( 11:20 ) in a plot.
if i just type the code above, the y value will be from 11 to 20, now i
want the
value from a given range like 0 to 40, how can i do it?
See the ylim= argument to plot.default; eg
plot(x, y, ylim=c(0,40))
Also look at ?par and note that plot() and
:
ar1 intercept
0.5739 2.4133
s.e. 0.1161 0.1466
sigma^2 estimated as 0.1975: log likelihood = -29.38, aic = 64.76
... which seems to be doing what you want...
S Ellison
***
This email and any attachments
one object directly
to another object.
This kind of thing is exactly what makes watching R-help so worthwhile.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8
Is there an easy way to check whether a variable is within +/- 10%
range of another variable in R?
You could use
2*abs(A-B)/(A+B) 0.1
which avoids an apply().
I've assumed you meant different by under 10% of the mean of the two, hence the
2/(A+B); if you meant 10% of something else, same
for pt and qt in R (the cumulative probability distribution and
the inverse, quantile, function respectively) is available in the R source
code, which you can obtain from CRAN; see
http://CRAN.R-project.org/mirrors.html - see the source code link from any of
the listed mirrors.
S Ellison
Keith Jewell said:
... from reading ?all.equal I would have expected
scale = 1 and the default scale = NULL to give identical results for the
length
one numerics being passed to all.equal.
Can anyone explain?
Inspectng the code in all.equal.numeric, I find
xy - mean((if (cplx)
Inability to access a repository index is very often an indication of a failed
internet connection from R. In Windows that is often a result of incorrect
proxy settings or other internet connection settings. The R Windows FAQ, 2.19
(The Internet download functions fail) may have the answer...
If I want to divide the column of a matrix by the sum of the column, should I
loop over the columns or can I use apply family?
Looping's unnecessary.
See ?scale or ?sweep, with ?colSums for two non-looping answers; apply() also
works if you give it a suitable function argument.
S
We are currently trying to migrate 3 users of R to a citrix based
environment, but are coming across major issues trying to install the
packages to the relevant image.
Why can't you open a virtualised OS instance, install and start R in the normal
way, install the packages normally in R
-Original Message-
x-/mnt/AO/AO Data/S01-012/120824/
I would like to extract S01-012
gsub(/mnt/AO/AO Data/(.+)/.+, \\1, x)
#does it, as does
gsub(/mnt/AO/AO Data/([\\w-]+)/.+, \\1, x, perl=TRUE)# \w is perl RE;
the default is POSIX, which would be.
gsub(/mnt/AO/AO
I want to keep only the part inside the two points. After lots of headache
using grep() when trying something like this:
grep('.(.*?).','df.subject_test.RData',value=T)
Does anyone have any suggestion ?
gsub(df\\.(.+)\\.RData, \\1, 'df.subject_test.RData')
Steve E
generally stick to base graphics.
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}}
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
101 - 200 of 644 matches
Mail list logo