Re: [R] Conditional Statistics

2013-01-08 Thread S Ellison
dy been referred to. You may also find aggregate() useful, as it gives you back a data frame that includes the conditioning variables if you tell it to. Alse ave, if you want to do something like mean-centring a data set based on group means rather than t

Re: [R] Precision of values > 53 bits

2013-01-10 Thread S Ellison
> I am working with large numbers and identified that R looses > precision for such high numbers. Yes. R uses standard 32-bit double precision. See ?double in your R help system. And welcome to finite precision arithmetic, which is a very widely known issue in digital comuting ever since it w

Re: [R] Using table to get frequencies of several factors at once

2013-01-16 Thread S Ellison
You could use a variant of apply(), probably sapply For example d <- as.data.frame( matrix(sample(0:1, 200, replace=TRUE), ncol=5)) head(d) sapply(d, table) S Ellison > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Beha

Re: [R] How to cut the time format short

2013-01-16 Thread S Ellison
gsub("(.{9}).+", "\\1", "31JAN2002:00:00:00.000") or you could convert to date and reprint: d <- as.Date("31JAN2002:00:00:00.000", format="%d%b%Y") format(d, "%d%b%Y") #albeit with lowecase month All of those should work on vect

Re: [R] Colors in interaction plots

2013-01-17 Thread S Ellison
I was unable to run your code; 'fac' is missing and npk$fac in teh interaction.plot returns NA. > data(npk, package="MASS") > fit <- by(npk, npk$block, function(bydata) fitted.values(lm(yield ~ N, > data=bydata))) > fit <- unlist(fit) > interaction.plot(npk$N, npk$block, fit, xlab="N", > ylab="y

Re: [R] How to change R file in stats?

2013-01-17 Thread S Ellison
> -Original Message- > I have changed some code in R file inside the stats package > (dendrogram.R). That was brave. Others have already commented on its wisdom... > Now I wan to test and run the stats package > with the new updated code, what should I do in detail? 1. Read and foll

Re: [R] How to change R file in stats?

2013-01-17 Thread S Ellison
> Stats is a base package, so that won't work. Base packages > are built and installed differently from other packages. Dang! Of course it is. Scratch previous response. The irony is that my first thought was indeed "Read 'R Installation and configuration' with special attention to 'Building f

Re: [R] Colors in interaction plots

2013-01-17 Thread S Ellison
ing to black. You are plotting only six lines all of which plot correctly as black when I run the code because the first 6 values in the colour vector you supply are all black. If you want to plot 6 different colour lines, try, for example, col=1:6. Hope that helps you clear things up! S

Re: [R] Colors in interaction plots

2013-01-17 Thread S Ellison
>But I don't want to plot random colors. >... > That's why I have this vector with length 24 - each one matches one line in > the "npk" dataset. ... which is not what interaction.plot, or matplot, needs; it needs one per line on the plot. >How can I inform to the interaction.plot function the co

Re: [R] Naming an object after another object...can it be done?

2013-01-18 Thread S Ellison
> -Original Message- > x<-dat.col > > Now, is there a function (or combination of functions) that > will let me assign the character string "dat.col" to a new > object (called y) without actually typing the characters > "dat$col", i.e. just by referring to x? Yes. dat <- data.frame

Re: [R] Deformulation and R

2013-01-21 Thread S Ellison
the guess from th e label values. On the down side, nuritional components are likely to have very different units, scaling and uncertainty so the weighting is going to be very hard to justify. Ideally, I'd do this - if at all - on a nice large selection of products I knew the answers fo

Re: [R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread S Ellison
> I am trying to replace community numbers with community > names (character). > I am using the following code: > > data[data$commNo==786, "commNo"]<-"Name of the Community" > > Unfortunately, I get the error message > missing values are not allowed in subscripted assignments of > data frame

Re: [R] Regex for ^ (the caret symbol)?

2013-01-22 Thread S Ellison
d so a pattern like "a^b" > could never match anything. ... unless a or b are newlines and you are matching multi-line expressions, when ^ and $ match before and after line breaks as well as beginning and end of string. S Ellison *

Re: [R] Adding a line to barchart

2013-01-23 Thread S Ellison
> > I need a quick help with the following graph (I'm a lattice newbie): > > > > require("lattice") > > npp=1:5 > > names(npp)=c("A","B","C","D","E") > > barchart(npp,origin=0,box.width=1) > > > > # What I want to do, is add a single vertical line > positioned at x = 2 > > that lays over the

Re: [R] problems with coercing a factor to be numeric

2013-01-23 Thread S Ellison
der in which labels are associated with factor levels and the (separate) values of contrasts associated with those factor levels at modelling time. The cost of that control is some complexity, and the time needed to learn what's going on to use it all properly. Hope that helps ... S E

Re: [R] Pasting a list of parameters into a function

2013-01-24 Thread S Ellison
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of bsm2 > Sent: 23 January 2013 20:00 > To: r-help@r-project.org > Subject: [R] Pasting a list of parameters into a function > > I need to repeat a function many times, with diff

Re: [R] Pasting a list of parameters into a function

2013-01-24 Thread S Ellison
ng only over the remaining parameter, y That looks awfully like what you seem to want, with no change to your negative log-likelihood function at all. S Ellison *** This email and any attachments ar

Re: [R] Pasting a list of parameters into a function

2013-01-25 Thread S Ellison
> -Original Message- > I'd love to write a code that would allow me replace the example code: > > fit1F <- mle2(LL, fixed=list(xhalf=6)) > > with something like: > > var<-xhalf > val<-6 > > fit1F <- mle2(LL, fixed=list(var=val)) > > or > > var<-c("xhalf","=") > val<-6 > > fit1F <- ml

Re: [R] How to menage decimals in order to obtain accurate estimates

2013-02-06 Thread S Ellison
> I've checked my iteration loop with other dataset, i've not > problems with integer numbers or other dataset with decimals > but not all decimals dataset. Any R data set that is 'not all decimals' will be represented internally as floating point* (eg c(1, 2, 3, 1.5) consists of four floating

Re: [R] Modifying Package Data

2013-02-07 Thread S Ellison
odified file, as will updating R, so you'd essentially never know which version of the file you're using. Using a modified copy, named differently and accessed via a different path that is immune to updates is far safer. S Ellison

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
> After applying the NLS for a model like y=exp(a*x), and I get > a result showing the summary as: > Estimate Std. Error t value Pr(>|t|) > 2.6720 1.4758 1.811 0.3212 > > My question is what this t-statistics tests? And what's the > meaning of Pr? t is (estimate/std.err) and can be us

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, Absolutely not. *** This email and any attachments are confidential. Any use, copying or disclosure other than by the intende

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread S Ellison
On 8 Feb 2013, at 01:24, "Antonio Silva" wrote: > # Two-sided p-value should be estimated with > dt(t,summary(fit1)$df[2]) # isn't it? No, on two counts. > First, dt is the density; you need pt, the cumulative probability, not dt. Second, pt(t, ...) would calculate the one sided lower tail pro

Re: [R] Random number generator used in 'runif'

2013-02-18 Thread S Ellison
On the same help page, it says "'RNGkind' is a more friendly interface to query or set the kind of RNG in use." Try RNGkind() to see the currently selected RNG. The same function with kind= specified will also change to another S Ellison > -Original Mess

Re: [R] generate variable y to produce excess zero in ZIP analysis

2013-02-20 Thread S Ellison
n.zip <- ceiling(zip*n) n.pois <- n-n.zip sample( c( rpois(n.pois, lambda), rep(0,n.zip) ) ) } #Example rzip(50, 3.5, zip=0.5) Having said that, I'd bet there's a package out there that already does it better... S Ellison > > > &g

Re: [R] calculating seconds

2013-02-20 Thread S Ellison
ee ?DateTimeClasses for a lot of information on dates and times, and (probably) ?as.POSIXct for changing something in seconds (as the Examples say, 'a large integer') into a date-time class which you should be able to conv

Re: [R] R and microsoft

2013-02-20 Thread S Ellison
> -Original Message- > I hava some questions about R and other "softas". > Which applications (softas) I can use with R? Can I connect R > with Microsoft? Can I connect R with SPSS and how I can do it? Information on transferring data to and from other systems can be found under "Impo

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread S Ellison
scope. You probably don;t have a writeable directory called "base" Try testInstalledPackages(scope="base",errorsAreFatal=FALSE) S Ellison *** This email and any attach

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread S Ellison
> Should I create an output directory somewhere either in Program Files where > R is installed or in my working directory? If I wanted to create a writeable test directory I'd put it in my own workspace, not the program files space. But why do you think you need to create an output directory?

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-07 Thread S Ellison
coefficient. effects() is doing somethig quite different; the help page tells you what its doing mathematically. It has an indirect physical interpretation: for simple designs like this, effects() output for the coefficients comes out as the coefficient multiplied by sqrt(n), w

Re: [R] read.table freezes the computer

2013-03-11 Thread S Ellison
a cpu core/thread > fully occupied forever. > 64 bit R with 16GB RAM on Win7 64, i5 cpu should be capable. > So if anyone knows the reason, that will be appreciated. > Thank you for any advice. > A look at the ?read.table section on 'memory usage' may help. In par

Re: [R] Troubleshooting code

2013-03-12 Thread S Ellison
On 12 Mar 2013, at 20:45, "Peter Ehlers" mailto:ehl...@ucalgary.ca>> wrote: Cool. I didn't know dingos had kidneys. I thought they just ate kids. That would be the Australian ones, at least allegedly. The canonical UK reference to the cited anatomical features is Adam

Re: [R] reviewer comment

2013-03-15 Thread S Ellison
> My question: what does it mean asymmetry distribution could > affect PCA ? and also outliers could affect factors? It means what it says. PCA will be affected by asymmetry and outliers will affect the principal components (sometimes loosely called 'factors') In particular an extreme outl

Re: [R] Counting confidence intervals

2013-03-18 Thread S Ellison
not of length length(x) low.comp <- if(closed[1]) "<=" else "<" high.comp <- if(closed[2]) ">=" else ">" do.call(low.comp, list(lower, x)) & do.call(high.comp, list(upper, x)) } #Examples within

Re: [R] Counting confidence intervals

2013-03-19 Thread S Ellison
> There _is_ a function ?within. Drat! of course there is. I even use it, though not often. > Maybe your function can be > named 'between' Good thought - thanks Steve E *** This email and any attachments are confidential. Any u

Re: [R] changing y-axis intervals in a boxplot

2013-04-02 Thread S Ellison
lim=c(0,100), > xlab="MRA diagnosis", ylab="Predicted probability (%)") Add yaxp=c(0,100,20) to your boxplot call. See ?par for what this means. S Ellison *** This email and any at

Re: [R] How to do platform independent system calls?

2013-04-02 Thread S Ellison
> -Original Message- > 1) Is there a way to implement such calls to external tools, > so they become platform independent? I mean, so that these > calls will work both on a *nix and a Windows system? No - at least, not generally, for the more or less obvious reason that *nix tools are

Re: [R] How to do platform independent system calls?

2013-04-02 Thread S Ellison
> > 2) Is there a way to generate platform independent paths? So that > > "path/2/input.tbl" on *nix systems becomes "path\2\input.tbl" on a > > Windows system? > > R already does that automatically. Clarification. R does that automatically _for paths used by R_ (including, on my system, the

Re: [R] Problem with integrate function

2013-04-03 Thread S Ellison
>Error in integrate(fx[[2]], 0.056, 1) : > maximum number of subdivisions reached > > Can anyone help? At the risk of longer integration time, look at the 'subdivisions' argument in ?integrate and consider inc

Re: [R] Full Documentation of R analysis

2013-04-05 Thread S Ellison
the same directory as scripts. Consider web log analysis for one - why would the script be in the server-writeable log file directory? S Ellison *** This email and any attachments are confidential. Any use...{{

Re: [R] prcomp() and varimax()

2013-04-07 Thread S Ellison
> > My concern is with the reported proportions of variance for the 3 > components after varimax rotation. It looks like each of my 3 components > explains 1/15 of the total variance, summing to a cumulative proportion > of 20% of variance explained. But those 3 components I retained should >

Re: [R] scanning data in R

2013-04-07 Thread S Ellison
>> I have a data file 'stop' to be scanned in >> R. >> But I want to ignore one specific number '21' there. Putting differently, >> I >> want to get all numbers in the file except 21. Is there any command to >> achieve it? >> See the na.strings argument to scan, and note that it can be a vecto

Re: [R] windows to remote R(linux) via putty with X11 forwarding

2013-04-07 Thread S Ellison
clients make it possible to transfer files, which can help if you want to save files at the linux end Nd then transfer to windows. S Ellison *** This email and any attachments are confidential. Any u

Re: [R] predict.lm

2013-04-08 Thread S Ellison
> I would like to use predict.lm to obtain a set of predicted > values based on a regression model I estimated. > Do you want predictions - which will always be the same - or randomly distributed data that is based on the model prediction plus random error? *

Re: [R] Importing from file to graphic window

2013-04-09 Thread S Ellison
shell doesn't work, consider, for example, openPDF from the Biobase package And you could use any search engine to search for "display jpeg in R" or "display PDF from R" or "import image into R" and so on. S Ellison

Re: [R] Solving tridiagonal matrix in R

2013-04-10 Thread S Ellison
trix: lu itself does not return the simple form you might expect from the usual literature LU decomposition for a tridiagonal matrix) S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} ___

Re: [R] Reshaping a table

2013-04-11 Thread S Ellison
it can;t handle them. The help file doesn't say what as.table doesn't do, perhaps because the list would be quite long. It would have headed off this post, though, if it mentioned that the default method accepted only a table,

Re: [R] Reshaping a table - PS

2013-04-11 Thread S Ellison
> as.table(dat1) > #Error in as.table.default(dat1) : cannot coerce to a table You _can_ coerce to a matrix first: as.table( as.matrix(dat1) ) S Ellison *** This email and any attachments are confidential. Any use...{{dro

Re: [R] remove duplicates in data frame

2013-04-11 Thread S Ellison
> -Original Message- >> How do I find and remove the two duplicate rows? > Try ?unique() See also ?duplicated and consider the usage d[ !duplicated(d), ] where d is your data frame. But read the 'details' part of the help page

Re: [R] Unbalance to balance panel

2013-04-11 Thread S Ellison
ill the gaps?) There are several imputation packages about; look up 'imputation in R' to get a selection. S Ellison *** This email and any attachments are confidential. Any use.

Re: [R] Remove data 3 standard deviatons from the mean using R?

2013-04-11 Thread S Ellison
the mean. huber in MASS and huberM in robustbase are often appropriate for that kind of situation. If the extreme values are not known to be unreliable, see previous posts... S Ellison *Reverence for data is fundamental, but that doesn't mean being blind to the apparently limitless number

Re: [R] Stat question: How to deal w/ negative outliers?

2013-04-12 Thread S Ellison
ous as unusually large values, you probably should have set the bounds differently. Try taking logs and see if that gives you a more or less symmetric distribution? S Ellison *** This email and any attachme

Re: [R] Print occurrence / positions of words

2013-04-26 Thread S Ellison
#Returns a list of vectors of locations of each word, sorted alphabetically S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.

Re: [R] the joy of spreadsheets (off-topic)

2013-04-26 Thread S Ellison
> One might wonder if the "Excel error" was indeed THAT or > perhaps a way to get the desired results, give the other > issues in their analysis? The prior for the incompetence/malice question is usually best set pretty heavily in favour of incompetence ... S *

Re: [R] the joy of spreadsheets (off-topic)

2013-04-26 Thread S Ellison
> From a quick read, the Excel error prior for incompetence > looks high but some of the other issues hint that the prior > for the overall findings was remarkably in favor of malice. That's p(malice|evidence), not p(malice); surely that must be the posterior? ;-) 'tain't a great advert fo

Re: [R] Likelihood

2013-05-03 Thread S Ellison
> I have run a regression and want to calculate the likelihood > of obtaining the sample. > Is there a way in which I can use R to get this likelihood value? See ?logLik And see also ?help.search and ??. You would have found the above by typing ??likelihood at the command line in R

Re: [R] Very basic statistics in R

2013-05-03 Thread S Ellison
> - the mean-> mean(x) > - the uncertainty on-> std.error(x) ? Or sd(x)? > - the standard deviation of x -> ? > - the uncertainty on the standard deviation -> ? > > Anyone has an idea? 1. Use R's help system to look up 'standard deviation' and 'mean' e.g.: ??'s

Re: [R] Why can't R understand if(num!=NA)?

2013-05-03 Thread S Ellison
hen tells you that you have a missing value where you need either TRUE or FALSE. Play with num!=NA #returns NA and if(NA) "Not there" #returns error is.na() returns TRUE for NA's, so 'if' knows what to do with the answer. S Ellison

Re: [R] boxplot with grouped variables

2013-05-11 Thread S Ellison
ns ( if V2 were correctly numeric) you could try boxplot(V2~V1+V3, data=Daten) S Ellison From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of maggy yan [kiot...@gmail.com] Sent: 11 May 2013 16:40 To: R-help@r-project.org Subject: [R

Re: [R] need means on all boxplots, but only half of them got that

2013-05-14 Thread S Ellison
ts really weird because I don't think that I separated the sex in the codes > above Look again; the boxplot is clearly distinguished by sex. Try means<-tapply( Daten$weight, interaction(Daten$Dosis,Daten$sex, drop=TRUE), mean) S Ellison

Re: [R] quantile

2013-06-19 Thread S Ellison
Or cast to vector: > set.seed(28) >  x<- sample(1:40,20,replace=TRUE) >  qx<-quantile(x,probs=0.10) >  qx > #10% > #3.8 > as.vector(qx) > #3.8 *** This email and any attachments are confidential. Any use...{{dropped:8}}

Re: [R] alternative to ifelse

2013-06-21 Thread S Ellison
0 > > [9,] 22 22 19 7 > > [10,] 30 20 5 22 > > [11,] 2 12 24 15 > > [12,] 5 21 13 22 > > [13,] 23 17 28 3 > > [14,] 1 7 24 14 > > [15,] 12 15 8 8 ifelse( apply(mx, 1, function(x

Re: [R] Levene's test output

2013-06-21 Thread S Ellison
he calculation is http://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm if you followed that, you would find that 356 turns up somewhere important ... A clue: It is unlikely to be coincidence that you have 358 data points in 2 groups and that the 356 turns up in the column headed "Df" in th

Re: [R] Lexical scoping is not what I expect

2013-06-26 Thread S Ellison
> -Original Message- > It may be helpful not to worry about the technical details, > just to look at the source code defining the function: if it > is defined in a place where a variable can be seen, it can > see that variable. I too find R's lexical scoping rules straightforward. H

Re: [R] Lexical scoping is not what I expect

2013-06-28 Thread S Ellison
> > I too find R's lexical scoping rules straightforward. > > However, I'd say that if your code relies on lexical > > scoping to find something, you should probably rewrite your code. > > Except of course that almost every function relies on lexical > scoping to some extent! This could get m

Re: [R] Optimum of lm

2013-07-02 Thread S Ellison
> I am trying to do some D o E. I would like to find > the optima > (maxima) of a 2 dimensional lm with quadratic terms. > I'm sure there is a really simple solution but i can't find it. At least part of this problem is solved by the rsm package; that fits a quadratic response surface

Re: [R] plot: x and y chromosomes are missing

2012-09-11 Thread S Ellison
> -Original Message- > I have a list with gene names, fold changes (=expression > level) and chromosomes. > > Names fold change chromosome > hz 1.5 2 > > > If I plot fold change versus chromosome (or vice versa): > > plot (ch, fc) > > I see only the chromos

Re: [R] lowess regression

2012-09-11 Thread S Ellison
t a smoother through; gene ID is usually categorical. To be sensible you'd need some continuous quantitative x- and y- coordinates. S Ellison *** This email and any attachments are confidential. Any

Re: [R] R calculates small numbers, where the result should be zero

2012-09-11 Thread S Ellison
See R Faq (http://cran.r-project.org/doc/FAQ/R-FAQ.html) with particular attention to FAQs 7.31 and 9.1 paragraph 3. Essentially, computational precision is finite. S Ellison > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org]

Re: [R] fractional balanced design conjoint analysis

2012-09-13 Thread S Ellison
l fractional factorial design toolkit. Something tells me you won't get a balanced 2x2x2x2x3 fractional in 16 or fewer runs though. I think 18 is possible. S Ellison *** This email and any attachments are confidential. Any

Re: [R] fractional balanced design conjoint analysis

2012-09-13 Thread S Ellison
nced' in as much as the 3-level factor does not have all levels equally represented) will behave adequately for a conjoint analysis I'm afraid I can't say. S Ellison *** This email and any attachments are confidential. A

Re: [R] R for commercial use

2012-10-02 Thread S Ellison
> cool, im none the wiser now, but thanks anyway That would be because your IT questionnaire requires telepathy to understand what the writer wanted to know. My take on these, in case it helps: 1. Is R a Clientsoftware / Serversoftware / Systemsoftware? R can run both on a client or on a serv

Re: [R] predict.lm if regression vector is longer than predicton vector

2012-10-03 Thread S Ellison
tely, so a warning is issued." Could that be the situation you are in? If it is, it's not the new data that causes the problem, but the original fit. S Ellison *** This email and any attachments are conf

Re: [R] error bars on line plot with error bars using ggplot

2012-10-03 Thread S Ellison
> I'm new to this and struggling away with ggplot. I need to > plot some line graphs for about 4 series. I have the values > to plot and also the value of the standard error of the > value. Is it possible to plot the standard error bars when > the value are already calculated as opposed to

Re: [R] How to write out this regression equation in R?

2012-10-09 Thread S Ellison
> How to make R write out: > > Balance = 2 + 3 * IntGDP + 5 * IntUnemployment + 0.3 * d1 > > from the table below: > > Balance Intercept IntGDP GDPNum IntUnemployment > IntInflationd1 d2 d3 > 3 2 3 5 > 0.3 0

Re: [R] why does R stepAIC keep unsignificant variables?

2012-10-09 Thread S Ellison
reason it should give the same result. And it often - quite correctly - doesn't. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-proj

Re: [R] RGL package surface plot

2012-10-10 Thread S Ellison
aphics) 3-D plot at http://streaming.stat.iastate.edu/~stat506/notes/ordkrigeexamp.pdf S Ellison > I'm completely new at R... I have sinkhole survey data (lat, long, and > elevation) and have been trying to plot a rotatable 3d plot > for several hours... cannot get it right. Examp

Re: [R] Constant Error in R

2012-10-10 Thread S Ellison
> I keep getting this "Error in x^2 : non-numeric argument to > binary operator" > using multiple different codes, ones which have been verified > to work by my professor and other students. I confirm the previous poster's lack of error in running the code supplied. I also agree that something

Re: [R] practical to loop over 2million rows?

2012-10-11 Thread S Ellison
> If I use a nested ifelse statement in a loop it takes me 13 > minutes to get an answer on just 50,000 rows. > ... > ifelse(strataID[i+1]==strataID[i], y<-x[i+1], y<-x[i-1])) maybe take a closer look at the ifelse help page and the examples? First, ifelse is intended to be vectorized. If you

Re: [R] Contacting Delphi ??

2012-10-11 Thread S Ellison
> What does the sudden appearance of "Contacting Delphi > ..the oracle is unavailable. > We apologize for any inconvenience." mean? A bug? It appears > at plotting. If you have an ordinary plot command, that is very strange indeed. It's a help message ... of sorts*. It should be no more li

Re: [R] Error in file(file, "rt") : cannot open the connection

2012-10-12 Thread S Ellison
> I get this error : " Error in file(file, "rt") : cannot open > the connection" >... > saspath="\"C:/Program Files/SAS/SASFoundation/9.2", I don't know the package but your saspath only contains one quote mark, so you have given it "C:/Program Files/SAS/SASFoundation/9.2 to open. W

Re: [R] characters, mathematical expressions and computed values

2012-10-12 Thread S Ellison
I agree completely; bquote is a neat way of doing the job. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing list https

Re: [R] anova test for variables with different lengths

2012-10-16 Thread S Ellison
c(a, b) g <- factor( rep( letters[1:2], c(length(a), length(b) ) ), ) summary( aov(y~g) ) Since this is a one way problem the type of SS won't matter, but in other cases it would be crucial to at least understand why - and to what extent - anova can be unsafe* on unbalanced data. S El

Re: [R] plotting multiple variables in 1 bar graph

2012-10-24 Thread S Ellison
> I'd greatly appreciate your help in making a bar graph with multiple > variables plotted on it. All the help sites I've seen so far only plot 1 > variable on the y-axis > ... > > I've spent several hours looking for code to do this but didn't find > anything. I'd use the Excel graph except that

Re: [R] How to quit R script & return to R prompt

2012-10-25 Thread S Ellison
> You typed a ` without closing it: > barplot(xtab(`profits`,data=Forbes2000)) > > anyway: pushing the escape button should also return you to > the R-prompt (at least on a Windows platform) But why is the OP using a backtick at all? It's not necessary in this instance (and in fact it's ver

Re: [R] mean of a value of the last 2 hours

2012-10-25 Thread S Ellison
ons zoo for RollingMeans, TTR for MovingAverages, forecast for ma and a possible solution using filter. One of those might help. S Ellison *** This email and any attachments are confidentia

Re: [R] plotting multiple variables in 1 bar graph

2012-10-26 Thread S Ellison
etc so you will need to use those names in ggplot. Steve E > > > > On Wed, Oct 24, 2012 at 11:22 PM, S Ellison > wrote: > > > > > I'd greatly appreciate your help in making a bar > graph with multiple > > variables plotted on

Re: [R] error bars

2012-10-26 Thread S Ellison
Hmisc and sfsmisc but I don't know whether either of those the one you were looking for; you'll have to go back to your code to see which library it used to load. S Ellison > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.o

Re: [R] Stata Database & R

2012-10-28 Thread S Ellison
A look at the R data import/export page supplied in the R HTML help system (see the link at top left) says that stata files are handled by the foreign package. S Ellison From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of

Re: [R] Why are coefficient estimates using ML and REML are different in lme?

2012-10-29 Thread S Ellison
different from zero. S Ellison From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Houhou Li [lidar...@yahoo.com] Sent: 28 October 2012 23:55 To: r-help@r-project.org Subject: [R] Why are coefficient estimates using ML and REML are

Re: [R] locating a data value in 3-dimensional data set

2014-04-08 Thread S Ellison
> I tried: > which(3ddata==x) # 3ddata is name of data set, x is the observed extreme > value But this couldn't help me. You'll need which(3ddata$long==x) if 3ddata is a data frame* with columns long, lat, time, or something like 3ddata[ ,'long'] if it's a matrix with dimnames or [,1] if just a

Re: [R] Read.table mucks up headers

2014-04-14 Thread S Ellison
eck the file encoding and set accordingly? iii) See if the offending first character(s) can sensibly be stripped before reading the file? S Ellison *** This email and any attachments are confidential. Any use, copying or disclosure

Re: [R] Request for R " Initial value of MLE"

2014-04-24 Thread S Ellison
isation, 0 iterations > Return code 100: Initial value out of range." > > Dear sir how we give the initial value to estimate the parameters. i) Avoid cross-posting; some folk get a bit snippy about that. ii) read the help page for maxLik and look for an ar

Re: [R] nested design

2014-05-15 Thread S Ellison
icated model terms. For example, fac1+fac1/fac2 expands to fac1 + fac1 + fac1:fac2 ... which reduces to fac1+fac1:fac2. All this is specified in some detail in ?formula. S Ellison *** This email and any attachments are confidentia

Re: [R] Second axis on bottom of graph

2014-05-16 Thread S Ellison
par(mar) Example: windows() #or X11() par(mar=c(6.5, 4,4,2)+0.1) plot(1:10, xlab="") axis(1, line=4) Also consider using par(mgp) to get the axis labels a bit closer to the axis, or using mtext() to place x axis labels. S Ellison **

Re: [R] Second axis on bottom of graph

2014-05-16 Thread S Ellison
> To start-with, how do I omit the axis label? > I tried xlab=NULL in the plot command NULL is the default for xlab (see ?plot.default, which probably gives most of the information you need) Try 'xlab=""' or xlab=NA. S *** This

Re: [R] Second axis on bottom of graph

2014-05-16 Thread S Ellison
iting for R-help answers; for example, Ted Harding's at https://www.harding.edu/fmccown/r/ and the R Graph Gallery at http://rgraphgallery.blogspot.co.uk/ S Ellison *** This email and any attachments are confidential. Any use

Re: [R] Boxplots

2014-05-19 Thread S Ellison
(x, at=n+1) is the kind of thing you'd need to do. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing

Re: [R] Legend having lines with different types

2014-05-28 Thread S Ellison
> I want to plot the legend for the following two lines: > ... > Any ideas how? Try ?legend S Ellison *** This email and any attachments are confidential. Any use...{{

Re: [R] Standard Deviation in R

2014-06-12 Thread S Ellison
s... #Example: set.seed(1023) x<-rnorm(200, 1e9) # Compare 199*var(x)/200 #"Population" variance #with mean(x^2)-mean(x)^2 #Other seeds give differently wrong numbers. #See FAQ 7.31 for why S Ellison *** This em

<    1   2   3   4   5   6   7   >