Re: [R] stem - strange leaves

2018-02-16 Thread S Ellison
> > From: Leif Ruckman [mailto:leif.ruck...@kau.se] > > Sent: Friday, February 16, 2018 3:27 PM > > To: PIKAL Petr > > Subject: RE: stem - strange leaves > > > > Thank you, I also found that solution but I think it is strange that > > this happens at all. I have tried different data and sometimes

Re: [R] alternative for multiple if_else statements

2018-02-26 Thread S Ellison
ps something that picks the minimum year for a subject or other relevant group might work? For example paste("survey", ave(year, studyno, FUN=min), sep="_") S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kevin >

Re: [R] stats 'dist' euclidean distance calculation

2018-03-15 Thread S Ellison
ors constructed from allele data, you will usually get complete nonsense in genetic terms. You should probably look at something like dist.gene in the ape package: see https://www.rdocumentation.org/packages/ape/versions/5.0/

Re: [R] Set Difference Problem

2018-03-19 Thread S Ellison
, "P3", "P4"}} Note the double parentheses ... this is still a set of sets with one member, not a set of character strings with four members. Hope that helps ... S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Neha

Re: [R] How to Find the value of r-square change in hierarchical multiple linear regression

2018-03-19 Thread S Ellison
t? See ?summary.lm For a linear model L summary(L)$r.squared gives R^2 and the adjusted R^2 is summary(L)$adj.r.squared S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __

Re: [R] Shading specific region in R

2018-03-27 Thread S Ellison
> Following the given codes below, I generated a plot that has 6 regions around > a > center point (IL), with 5 regions containing > > a point (L1, L2 to L5) and sixth vacant region. I want background of all the > filled > regions turned "green", while "red" for the > > vacant region. Can it be

Re: [R] Obtain gradient at multiple values for exponential decay model

2018-04-06 Thread S Ellison
he differential function from your function for y; see ?D S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing list --

Re: [R] convert numeric variables to factor

2018-04-10 Thread S Ellison
rn tells me that you have not constructed your data frame correctly. I can't tell you what you did wrong there. - As another poster has said, data.frame is the name of a function - one that construicts a data frame. R can often tell which you want, but it is never safe to use the na

Re: [R] Bivariate Normal Distribution Plots

2018-04-12 Thread S Ellison
> -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of JEFFERY > REICHMAN > # Standard deviations and correlation > sig_x <- 1 > sig_y <- 1 > rho_xy <- 0.0 > > # Covariance between X and Y > sig_xy <- rho_xy * sig_x *sig_y > > # Covariance matrix > Sig

Re: [R] Fill down a new column in data frame with a number

2018-05-10 Thread S Ellison
> I am traying to create a a column in my data frame filled down with a > number. > > > df$newcolumn <- number > > How can I do it? I am considering use rep() but in this case it is > necessary know the number of rows in each data base that I have and I would > like to do it in a faster ( and m

Re: [R] BoxPlot Adding Mean and Median Values

2018-05-10 Thread S Ellison
ats[3,], names, pos=1) #labels just below the medians #And for placing means on the plot: RTFmeans <- with(AmbientTr, tapply(RTF, batch, mean)) points(1:length(RTFmeans), RTFmeans, pch=19) text(1:length(RTFmeans), RTFmeans, paste(round(RTFmeans,0)), pos=

Re: [R] strange behavior of plotmath

2018-05-21 Thread S Ellison
need_ the enclosiong {}, though; > expression(NO[3]^'-'~(mg/L)) works as you intended S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __

Re: [R] Change the legend order by order function

2018-05-23 Thread S Ellison
levels=c("name_b", "name_c", "name_a")) #or, for a more obviously likely example lmh <- factor(sample(c("High", "Medium", "Low"), 30, replace=T), levels=c("Low&qu

Re: [R] internet routines cannot be loaded, R 3.5.0

2018-06-08 Thread S Ellison
", not the menu function or the package installation function "install.packages" The latter needs a list of packages to install. The former tells you what is already installed. S Ellison *** This email and

Re: [R] extract and re-arrange components of data frame

2018-06-12 Thread S Ellison
> #I need to get this final result > r<-data.frame(i=c(1,1,1,2,2,3), s=c(97, 98, 99, 103, 105, 118)) Nothing magic to suggest. But maybe: list.s <- strsplit(d$s,",") r <- data.frame(i=rep(d$i, times=sapply(list.s, length)), s=unlist(list.s), stringsAsF

Re: [R] Using apply function to merge list of data frames

2018-07-27 Thread S Ellison
xpected results. S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Naresh > Gurbuxani > Sent: 25 July 2018 07:17 > To: R-help@r-project.org > Subject: [R] Using apply function to merge list of data frames > > I have

Re: [R] R function stopped working

2017-04-04 Thread S Ellison
Maybe a daft question arising from lack of reproducible example, but have you run ls() manually to make sure there are objects that _exactly_ match "_Figs_" ? The simplest explanation for a loop doing nothing is that there are no cases. S Ellison > The following function is suppo

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread S Ellison
] #Which returns # # FALSE which - particularly since it appears without warning - is not an obviously sensible outcome. I am not suggesting a change to R's logical operations, which have clearly been thought through (that is evident from NA&FALSE == FALSE&NA == FALSE). But

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread S Ellison
> > SQL, for example, generally takes the view that any > > expression involving 'missing' is 'missing'. > > Well, then SQL gets it wrong. Well, that's a view. But paraphrasing an R Turner from a few lines away in the same email: > One should be very, very circumspect about presuming to know

Re: [R] organizing data in a matrix avoiding loop

2017-05-26 Thread S Ellison
atrix with the available flow data dT.m[as.matrix(dataTrade.ag[1:2]) ] <- dataTrade.ag$Flow #This relies on a default conversion from data frame factors to a character matrix, together #with R's facility for matrix indexing by 2-column matrix #Then dataTrade.ag[1:10

Re: [R] Keep only those values in a row in a data frame which occur only once.

2017-06-12 Thread S Ellison
appear. > > How can I do this? Use unique() on each row and pad with NA? Example: uniq10 <- function(x, L=10) { u <- unique(x) c(u, rep(NA, L-length(u)) ) } as.data.frame( t( apply(tmp, 1, uniq10) ) ) assuming tmp is

Re: [R] understanding I() in lmer formula

2017-06-15 Thread S Ellison
u run the product on the command line, either inside I() or not, what's the class of the result? If that is order-dependent for the object types you're combining, while I don't know why that might be it would go some way to explaining

[R] Hunting a histogram variant

2017-06-21 Thread S Ellison
t? ... and the R question: ii) Is it already hiding somewhere in an R package?* S Ellison *If it's not, I'll be adding it to one, hence the hunt for due credit/sources *** This email and any attach

Re: [R] metRology package

2017-07-13 Thread S Ellison
> I'm having trouble with a simple application with metRology. Well, what you probably need is to contact the maintainer of the metRology package. Fortunately that's me. An immediate problem that I have is that I don't quite understand what you're doing (in the measurement), so I may need to

Re: [R] switch of cex adjustment with mfrow?

2017-08-02 Thread S Ellison
Checking ?par, " In a layout with exactly two rows and columns the base value of '"cex"' is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66." You should be able to simply set cex to 1/0.83 for a 2x2 layout and by 1/0.66 for

Re: [R] switch of cex adjustment with mfrow?

2017-08-03 Thread S Ellison
> use > > par(mfrow=c(2,2), cex = 1) This does work as written. But when I first checked single-call setting, an mfrow change to cex in the same call superseded cex=1; hence my suggestion to use separate calls to par(). Further checking confirms that the result of a call to par is dependent on

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-07 Thread S Ellison
. For example: q <- randomLHS(1000, 3) colnames(q) <- c("A", "B", "mort") q[, "mort"] <- qpois(q[,"mort"], 1.5) S Ellison *** This email and any attachments are confid

Re: [R] Nested for loop

2017-08-08 Thread S Ellison
ke a list of either subpopulations or sets of population parameters, lapply your simulation generator over the list and (assuming the output from each of those is a vector) use c(that.list, recursive=TRUE) to concatenate the resulting list of

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-08 Thread S Ellison
> However, my variable is simulated from the cumulative distribution function > of the Poisson distribution. Then I am afraid I don't know what you're trying to achieve. Or why. However, the principle holds; write a function that maps [0,1] to the 'pattern' you want, do that and apply it to the

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-10 Thread S Ellison
> I think that I need to > draw a Hypercube sample for each age class (i.e., for 0, 1, 2, 3, 4, 5, 6, 7) > in a > given simulation (i.e., N = 1) and the LHS values for all age classes should > be > like the observed cumulative distribution (see attached figure). > output of randomLHS should be a

Re: [R] problem with R. program

2017-08-11 Thread S Ellison
ify Upper limit and Lower limit, though I've not tried omitting them. 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

Re: [R] weight in lm

2017-08-14 Thread S Ellison
that there is a difference across three types, is there a reason not to use something like Levene's test to confirm that the variances differ by more than chance? S Ellison *** This email and any attachments are con

Re: [R] ANOVA test to decide whether to use multiple linear regression or linear mixed effects model

2017-08-15 Thread S Ellison
anova is defaulting to anova.lm, and that doesn't expect a mixed effects model. Switch them round to put model2 first: anova (model2, model1) S Ellison *** This email and any attachments are confid

Re: [R] Suggestion for installation of R

2017-08-17 Thread S Ellison
> >Is it possible to download and run R on Asus ZenFone, if yes, which > >version Try Googling 'R on Android' The top link is https://www.r-bloggers.com/install-r-in-android-via-gnuroot-no-root-required/ *** This email and any a

Re: [R] Strange lazy evaluation of default arguments

2017-09-05 Thread S Ellison
Mathias, If it's any comfort, I appreciated the example; 'expected' behaviour maybe, but a very nice example for staff/student training! S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Matthias > Gondan > Se

Re: [R] [FORGED] Re: Block comment?

2017-09-05 Thread S Ellison
e thing. So there's probably more than one reason // was added to C. That and better editors. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} ___

Re: [R] Interesting behavior of lm() with small, problematic data sets

2017-09-06 Thread S Ellison
standard errors. So this particular example is apparently version-specific. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.o

Re: [R] Programming Assignment 1: Quiz Air Pollution (Week 2: Programming with R)

2016-05-23 Thread S Ellison
on 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 A

Re: [R] promoting scalar arguments to vectors in a function

2016-05-23 Thread S Ellison
If you wanted to zero-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}} _

Re: [R] Factor Variable frequency

2016-05-25 Thread S Ellison
> 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"])

Re: [R] What are some toy models I can use in R?

2016-05-25 Thread S Ellison
> -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 sets

Re: [R] subset data right

2016-05-27 Thread S Ellison
n. > df <- data.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 nam

Re: [R] detecting if a variable has changed

2016-06-14 Thread S Ellison
presorted, 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

Re: [R] R help contingency table

2016-06-20 Thread S Ellison
t 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

Re: [R] biplot

2016-06-23 Thread S Ellison
> 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 *

Re: [R] R intersect()

2016-06-28 Thread S Ellison
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

Re: [R] Command to combine means?

2016-06-30 Thread S Ellison
Stata's documentation lists this as a meta-analysis tool. You may want to look at the rma function in the metafor package for various approaches to that problem. S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Carlos R. >

Re: [R] source code of a function

2016-07-08 Thread S Ellison
> Is there a function in R which calls the code behind a function? Type the function name without the brackets. *** This email and any attachments are confidential. Any use...{{dropped:8}} __

Re: [R] I can't see my questions and their answers in this mailing list !

2016-07-18 Thread S Ellison
hat legitimate mailing lists exist. Presumably other email filtering products could be doing the same. S Ellison *To be fair to the product**, an email report is available - if you go to the relevant web portal and manually request it. Of course, the only reason you'd do that is if you know

Re: [R] intersection of two polygons which are not shapefiles

2016-07-18 Thread S Ellison
t and use something like gIntersection() from rgeos or intersect from raster (see http://gis.stackexchange.com/questions/140504/extracting-intersection-areas-in-r) S Ellison *** This email and any attachments

Re: [R] p.adjust not working correctly?

2016-08-03 Thread S Ellison
of 1.0. Dividing by n would imply incorrectly that individual events have become less probable as the number increases. The result you have obtained is what is supposed to happen. S Ellison > > p <- runif(50) > > > > p > [1] 0.08280254 0.08955706 0.19754389 0.52812033 0.68

Re: [R] Apply a multi-variable function to a vector

2016-09-13 Thread S Ellison
rature above). Not quite enough information here. If we called func2(30, 298, 23) which has an arbitrary third argument, what would you like to happen to the third argument? And a fourth, fifth and so on? Something consistent for all arguments, or something different for each depending on i

Re: [R] why data.frame, mutate package and not lists

2016-09-15 Thread S Ellison
re listed in ?attach). attach()is only sensible if you have already completed all the manipulation needed on the attached object first. Even then, using with() is safer. S Ellison *** This email and any attachments are confidential. Any

Re: [R] Query to find minimum value in a matrix in R

2016-09-16 Thread S Ellison
ention to the meaning of negative indices (like '-n' in dd[-n,]) S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of susmita T > Sent: 16 September 2016 13:09 > To: r-help@r-project.org > Subject: [R] Query to find

Re: [R] What are the red line and cut line in lm's Residuals vs Fitted plot?

2016-09-19 Thread S Ellison
ments to ?plot.lm, which uses panel.smooth as a panel function. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing li

Re: [R] add outlier in data set

2016-09-19 Thread S Ellison
> I have one question that how we add one or more outliers in the data set. See ?c to add values to a vector. S Ellison *** This email and any attachments are confidential. Any use...{{droppe

Re: [R] Request for R code

2016-09-19 Thread S Ellison
> Heyy I want to apply LASSO method in AFT model. So can you guys please help > me by sending R code for that. Try help.search("LASSO") or RSiteSearch("LASSO") or Google "LASSO method in AFT using R"

Re: [R] What are the red line and cut line in lm's Residuals vs Fitted plot?

2016-09-19 Thread S Ellison
> Do you mean that the red line is a regression line? > Why is the regression (line) weighted? I suggest you look up 'locally weighted regression' to find out why that is useful and what it is for. *** This email and any attachmen

Re: [R] add outlier in data set

2016-09-19 Thread S Ellison
l reading for what you are trying to do. See also the Note and examples in ?"==" which are also essential reading for comparisons involving floating point numbers; also FAQ 7.31. S Ellison *** This email and any atta

Re: [R] Overlapping axis numbering and labels when using par(new=TRUE)?

2016-09-19 Thread S Ellison
> How can I get the axis numbering and labels to not overlap? I could also Try specifying las=2 in your plot command? See ?plot.default and ?par S Ellison *** This email and any attachments are confidential. Any use...{{droppe

Re: [R] "invalid argument to unary operator" while selecting rows by name

2016-09-21 Thread S Ellison
> > Works like a charm, thanks! Still don't know what that error message > > means though. Any idea? You tried to negate a character string. -"601" '-' can't do that. [-x] relies on negative _numbers_ to remove elements, not on separate i

[R] FW: Why removing the (Intercept) from lm is done by adding -1?

2016-09-21 Thread S Ellison
here the method of subtracting one? Why > > does subtracting one mean that the (Intercept) term disappears? See above; '-' _in a formula_ means 'remove the following term' Following that consistently, if there's a weirdness there, it's that ~0+x works t

Re: [R] [R-pkg-devel] doc url to vignette

2016-09-22 Thread S Ellison
> In other words, try to mislead CRAN. Well, no. The thought was that if CRAN has agreed an exception, as Uwe had indicated, you might want a simpler way of maintaining it than discussing it on every update. I can see that that would sidestep an enforced regular review, though. Keep up the g

Re: [R] Fixed effects regression and robust regression

2015-05-20 Thread S Ellison
mRob 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.

Re: [R] rgl 3d surface

2015-07-16 Thread S Ellison
> -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 produ

Re: [R] Why does R start in wrong working directory despite R_USER setting?

2015-08-10 Thread S Ellison
_USER directory if R_USER exists (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] Setting R working directories on Windows - was RE: Why does R start in wrong working directory ...

2015-08-10 Thread S Ellison
> 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

Re: [R] lme4 package installation

2015-08-17 Thread S Ellison
> 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

Re: [R] i need help for var.test()

2015-01-08 Thread S Ellison
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: r-h...@lis

Re: [R] R vs. RStudio?

2015-01-11 Thread S Ellison
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

Re: [R] create a function with "subset" statement

2015-01-29 Thread S Ellison
> -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]

Re: [R] lost in plotmath expressions

2015-01-30 Thread S Ellison
tution in plotmath expressions; they just have to be followed very carefully. And ?bquote is also useful for substitution in plotmath... S Ellison *** This email and any attachments are confidential. Any use, copying or disclosure oth

Re: [R] aov and Error function

2015-02-02 Thread S Ellison
ct 1 in the "cont" group. Yes, but that isn't all, is it? subject/group means group nested in subject, expanding to ~subject+subject:group. so Error(subject/group) asks for a subject effect across groups _as well as_ one within groups. S Ellison

Re: [R] naming rows/columns in 'array of matrices'

2015-02-02 Thread S Ellison
> > 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]) cou

Re: [R] How to solve this complex equation

2015-02-10 Thread S Ellison
ur function, use uniroot to find 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,

Re: [R] Terminating a program using R

2015-02-12 Thread S Ellison
skill(pid) #Kill the process You'll have to tweak that if you have more than one process with the same name, and also to check for nonexistence of an expected process. S Ellison

Re: [R] help in anova

2015-02-12 Thread S Ellison
fiable. aov seems fairly tolerant of that in one sense - instead of throwing an error and stopping it tells you what it can identify and leaves out anything it can't. S Ellison *** This email

Re: [R] [BUG] or [undocumented] boxplot - horizontal swaps ylim and xlim

2015-02-13 Thread S Ellison
'col.main', 'sub', 'cex.sub', 'col.sub', 'xlab', 'ylab', 'cex.lab', and 'col.lab' are passed to 'title'." The key phrase is "Currently, 'yaxs' and 'ylim' are

Re: [R] SIMPLE question

2015-02-13 Thread S Ellison
> 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) RSite

Re: [R] Why I am getting error when writing a function for "optim"?

2015-02-13 Thread S Ellison
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

[R] Packages not installing on XP

2015-02-24 Thread S Ellison
his otherwise serviceable 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 ***

Re: [R] Packages not installing on XP

2015-02-24 Thread S Ellison
> 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 confiden

Re: [R] Convert windows source package for Mac use

2015-02-24 Thread S Ellison
re or less trivially 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 

Re: [R] figure resolution

2015-03-01 Thread S Ellison
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

Re: [R] subset a data frame by largest frequencies of factors

2015-03-06 Thread S Ellison
me length as your data. in a data frame it can be 1:nrow(dfr) etc. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org m

Re: [R] Concatenating elements from lists via combinations

2015-03-06 Thread S Ellison
("D")) > > How could I create an exhaustive list of length 21 now, each of whose > elements > contains a unique combination of vector elements? do.call(expand.grid, lst) S Ellison *** This email and any atta

Re: [R] Error in thielsen

2015-03-06 Thread S Ellison
e vector. A common symptom is that the bootstrap sometimes 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 **

Re: [R] density plot not smooth

2015-03-18 Thread S Ellison
you may not find it very interesting 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 rece

Re: [R] Fitting a line on trellis plot

2015-03-25 Thread S Ellison
xample, if you want to plot a line over the data, use xyplot(tmin~year|month, curr_data, panel=function(x, y, ...) { panel.xyplot(x, y, ...) panel.lmline(x, y, ...) } ) S Ellison *** This email and any attachme

Re: [R] Fwd: missing in neural network

2015-03-25 Thread S Ellison
near.output = FALSE, threshold = 0.1) Does neuralnet not recognise '.'? 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 =

Re: [R] Graph with ggplot2.

2015-03-25 Thread S Ellison
renthesis, string terminator or operator terminator - would be sensible. As a clue, you could think about what '%' means in R. It does NOT mean 'percent' S Ellison *** This email and any attachments are co

Re: [R] Calculating Kendall's tau

2015-04-02 Thread S Ellison
of your MannKendalltau. So your result is a list of lists. 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 packa

Re: [R] Combinations of true/false values where one pair is mutually exclusive

2018-08-02 Thread S Ellison
> On Thu, Aug 2, 2018 at 11:20 AM, R Stafford > wrote: > > But I have the extra condition that if E is true, then F must be false, and > > vice versa, Question: Does 'vice versa' mean a) "if E is False, F must be True" or b) "if F is True, E must be False"? ... which are not the same. b) (and

Re: [R] Philip Morris International - Windows10 migration assessment

2018-08-02 Thread S Ellison
Suggest you take a look at the R website at www.r-project.org; the most important answers are evident there. If you 'require' more authoritative answers within a particular timescale, I suggest you engage an R consultant and pay for them. This is a voluntary list. S Ellison >

Re: [R] Combinations of true/false values where one pair is mutually exclusive

2018-08-03 Thread S Ellison
> Given that clarification, I'd just generate the full set and remove > the ones you aren't interested in, as in: I'd agree; that is probably the most efficient thing to do with only half a dozen binary variables and a single condition. A way of going about it for a more complex case might be to

Re: [R] Questions for Licensing

2018-08-03 Thread S Ellison
g your business. 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

Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-06 Thread S Ellison
Another possible approach, using the transformation returned by persp() to locate axes explicitly and using base graphics to place labels etc, is given at http://entrenchant.blogspot.com/2014/03/custom-tick-labels-in-r-perspective.html > -Original Message- > From: R-help [mailto:r-help-

Re: [R] loop over matrix: subscript out of bounds

2018-08-08 Thread S Ellison
> > Eric Bergeron Wed, 8 Aug 2018 12:53:32 +0300 writes: > > > You only need one "for loop" > > for(i in 2:nrow(myMatrix)) { > >myMatrix[i-1,i-1] = -1 > >myMatrix[i-1,i] = 1 > > } Or none, with matrix-based array indexing and explicit control of the indices to prevent overrun i

Re: [R] Submit your own R package - @examples

2018-08-08 Thread S Ellison
> Most of my methods, are not exported to the namespace using the > @examples > options. Joanna, You normally need to export _all_ the objects/functions that you expect users to be able to run. And if you are giving an example of a function, it seems likely that you expect users to use it, so it

Re: [R] security using R at work

2018-08-09 Thread S Ellison
> If I install R on my work network computer, will the data ever leave our > network? As far as I know, if you run R locally (and not, say, on an amazon EC2 instance) your data - indeed anything about you or your machine - will only leave your desktop if you download and run an R package that tr

  1   2   3   4   5   6   7   >