Re: [R] SURVDIFF()

2019-01-12 Thread David Winsemius
ata( rx+ecog.ps) , data=ovarian) Call: coxph(formula = Surv(futime, fustat) ~ age + strata(rx + ecog.ps),     data = ovarian)    coef exp(coef) se(coef) z   p age 0.11942   1.12684  0.04528 2.637 0.00836 -- David. __ R-help@r-project.org mai

[R] Colors on box plots in ggplot

2019-01-17 Thread David Doyle
brary(ggplot2) # Basic box plot p <- ggplot(ToothGrowth, aes(x=dose, y=len)) + geom_boxplot() p+scale_color_manual(values=c("#99", "#E69F00", "#56B4E9")) p But still can not get the colors to show up. I'm sure it is something simple I'm doing wron

Re: [R] [FORGED] Newbie Question on R versus Matlab/Octave versus C

2019-01-28 Thread David Winsemius
dle simulations of stochastic differential equations. Bert's suggestion to use Rseek should serve you well. -- David. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Extract the coordinates of a Polylines

2019-01-31 Thread David Winsemius
e importation of such a structure into R. You should instead provide the output of `dput (head(topo@data) )` if you want more informed comments. David. > > How can I do this. > Sincerely. > > On Sat, Jan 26, 2019 at 9:37 AM javad bayat <mailto:j.bayat...@gmail.com>>

Re: [R] Help converting file to XTS

2019-02-05 Thread David Winsemius
. And the error is: Error in as.POSIXct.default(dat) : do not know how to convert 'dat' to class “POSIXct” The function is telling you that dat is the wrong type of object to be converted to the rownames of a matrix (which is what xts objects are. -- David Any he

Re: [R] Using ggplot2 geom_path() in a grouped variable

2019-02-12 Thread David Winsemius
uccessful code that used geom_path. Otherwise we hav no way of knowing what you gave as the grouping argument. The second bit of advice would be to include a dataset that illustrates the problem. (These are both bits of advice that you should have found in the Posting Guide. -- David. > Reg

Re: [R] Using ggplot2 geom_path() in a grouped variable

2019-02-12 Thread David Winsemius
bout error semantics unless one has the data-object. -- David > On Feb 12, 2019, at 4:22 PM, Rui Barradas wrote: > > Hello, > > I am not understanding the problem. > With a made up dataset everything seems right. > > set.seed(1234)# make the results reproducible >

Re: [R] Saving and reloading function in a package

2019-02-15 Thread David Winsemius
Isn't this much more on topic with the package development list? -- David > On Feb 15, 2019, at 6:37 AM, Dimitrios Stasinopoulos > wrote: > > I would like to put a graphic background to a model diagnostic plot. > The background is created with plot()/lines() but

Re: [R] Help formulating gamm with repeated measures and spatial autocorrelation using mgcv package

2019-02-26 Thread David Winsemius
h and clarity. David On 2/26/19 2:36 PM, Julie Lee-Yaw via R-help wrote: (Also posted on StackExchange but submitting to R-help to reach more potential experts)I am using the gamm function in the mgcv package in R to specify a model that predicts abundance with respect to elevation and year bas

Re: [R] add points to lattice cloud plot (3D scatter)

2019-02-28 Thread David Winsemius
en I appended points. Perhaps there is a counter in the lattice object that I have not yet seen. Hope this helps; David. On February 28, 2019 7:38:52 AM PST, Luigi Marongiu wrote: I see. I have been thinking of superimposing two plots with par(new=TRUE), but how could I remove all the grap

[R] Benjamini-Hochberg (BH) Q value (false discovery rate)

2019-03-06 Thread David Bars
ethod developed by: Dalmasso C, Broet P and Moreau T (2005). A simple procedure for estimating the false discovery rate. *Bioinformatics* 21:660--668. Many thanks for your help, David Bars. [[alternative HTML version deleted]] __ R-h

[R] Q re: logical indexing with is.na

2019-03-09 Thread David Goldsmith
Hi! Newbie (self-)learning R using P. Dalgaard's "Intro Stats w/ R"; not new to statistics (have had grad-level courses and work experience in statistics) or vectorized programming syntax (have extensive experience with MatLab, Python/NumPy, and IDL, and even a smidgen--a long time ago--of experie

Re: [R] [FORGED] Q re: logical indexing with is.na

2019-03-10 Thread David Goldsmith
ch vectors are recycled if necessary to match > the corresponding extent. i, j, ... can also be negative integers, > indicating elements/slices to leave out of the selection. > > On March 9, 2019 6:57:05 PM PST, Rolf Turner > wrote: > >On 3/10/19 2:36 PM, David Goldsmith wro

Re: [R] How to change the number of bins?

2019-03-10 Thread David Winsemius
Seems rather likely that 999 is not really a measured value but rather is a missing value indicator. -- David. On 3/10/19 1:54 PM, wong bowie wrote: I wish to calculate the weight of evidence of a variable x, which is positively skewed, with over 6000 of the observations are 999 but only

Re: [R] How to change the number of bins?

2019-03-10 Thread David Winsemius
ne to specify a value such as 999 to be missing but R needs to have it changed to NA is.na(Table$pdays) <- Table$pdays == 999 -- David > > David Winsemius <mailto:dwinsem...@comcast.net>> 於 2019年3月10日 週日 下午10:48寫道: > > Seems rather likely that 999 is not r

Re: [R] About wilcox test

2019-03-12 Thread David Winsemius
lease read the Posting guide and in the future post in plain text. David I run the wilcox test as : wilcox.test(A , B, data = mydata, paired = FALSE) I got always the p value very high, like 0.60 Even I make changes in the data, it gives me 0.7, 0.4 etc which is too high than 0.05 and can not

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread David Winsemius
are Web accessible forums that are set up to statistics. -- David. On 3/19/19 10:42 AM, Philip Rhoades wrote: People, I have only a general statistics understanding and have never actually used Bayes' Theorem for any real-world problem.  My interest lies in developing some statis

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread David Winsemius
. If I had seen that posting, I might have rejected it. -- David. On 3/19/19 11:06 AM, Evan Cooch wrote: Just curious -- if R-help is a moderated list (which  in theory , it is -- my posts have been 'modertated', to the degree that they aren't released to the list until someon

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread David Winsemius
d.com (i.e., stats.stackexchange.com) -- David. On March 19, 2019 10:42:24 AM PDT, Philip Rhoades wrote: People, I have only a general statistics understanding and have never actually used Bayes' Theorem for any real-world problem. My interest lies in developing some statistical ap

Re: [R] Rank ANCOVA

2019-03-21 Thread David Winsemius
If you are looking for robust multivariate or multivariable methods, then review the Robust Methods Task View: https://cran.r-project.org/view=Robust -- David. On 3/13/19 4:06 AM, Jackson, Daniel wrote: Hi Frank and Dennis I am in a similar situation but I would prefer to use a

Re: [R] counting unique values (summary stats)

2019-03-21 Thread David Winsemius
ooked up the usage on `length` and do not see any possibility of using a "replace" parameter. It's also unclear what sort of data object `myData` might be. (And you might consider using column names other than the names of R functions.) -- David. Can I do that, or am I using

Re: [R] Regression Modeling Strategies and the R rms Package Short Course 2019

2019-03-24 Thread David Winsemius
se as the next step to being "statisitcally educated". -- David. On 3/24/19 2:42 AM, Graeme Davidson wrote: Hi Frank, As part of the R community, you will be aware that the vast majority of knowledge regarding statistics such as linear modelling is online for free. What makes this

[R] Just confirming (?): No way to "export" a (Quartz) plot...

2019-03-25 Thread David Goldsmith
...once I've got it the way I want it, (e.g., to a PNG)? I.e., I either have to create a PNG device and then plot to that, or use Mac's (screen) "Grab" app? Thanks. DLG > sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.

Re: [R] Just confirming (?): No way to "export" a (Quartz) plot...

2019-03-25 Thread David Goldsmith
Excellent, thanks! (It just goes to show how hard it can be to find something when you don't know precisely what to look for.) DLG On Mon, Mar 25, 2019 at 8:18 AM Ivan Krylov wrote: > On Sun, 24 Mar 2019 23:35:30 -0700 > David Goldsmith wrote: > > > No way to &quo

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-28 Thread David Winsemius
On 3/27/19 3:43 PM, Bernard Comcast wrote: To follow on Jeff, is there a function to do 2-D (double) numerical integration in R? Packages pracma and cubature offer a variety of solutions to that task. -- David. Bernard Sent from my iPhone so please excuse the spelling!" On M

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-28 Thread David Winsemius
also has a "sliced" approach to disply of 2d densities that I found informative and attractive. -- David. Bernard McGarvey Director, Fort Myers Beach Lions Foundation, Inc. Retired (Lilly Engineering Fellow). On March 28, 2019 at 1:40 PM David Winsemius wrote: On

Re: [R] Analysing diallel and line x tester mating design with multiple location in R

2019-03-29 Thread David Luckett
other stand-alone software, such as: PBTOOLS, GENES, QGAStation, TNAUSTAT, ICRISAT Genstat scripts, GSCA (not free), or Dial98. HTH, Cheers David Luckett djluck...@gmail.com 0408 750 703 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] Help installing netReg

2019-04-14 Thread David Winsemius
end of the message? And do read the Posting Guide and include "commented, minimal, self-contained, reproducible code." -- David. Best, Spencer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

[R] Partition of sums of squares (ANOVA)

2014-07-22 Thread Marino David
regression sum of squares. Is it similar to the Sum Sq computation? Is the regression sum of squares equal to (0.000437+ 0.002545+ 0.060984+ 0.062330+ 0.060480)? Any suggestion will be greatly appreciated. Thank you! David TraingData<-data.frame( x1=c(3.532,2.868,2.868,3.532,2.868,2.536,3.

Re: [R] Partition of sums of squares (ANOVA)

2014-07-22 Thread Marino David
Thanks Bert. I will post it on StatsExchange. David 2014-07-23 2:08 GMT+08:00 Bert Gunter : > Wrong list! > > Try stats.stackexchange.com for statistics questions. This list is > about R programming related issues. > > Also, note that HTML does not work and should not be use

Re: [R] packages across different versions of R

2014-07-22 Thread David Winsemius
rly named directory and then run: update.packages(checkBuilt=TRUE,ask=FALSE) # I added that second argument b/c I have a large collection (This doesn't work for packages only available on r-forge or github.) -- David Winsemius Alameda, CA, USA _

Re: [R] Importing random subsets of a data file

2014-07-23 Thread David Winsemius
than calling 10,000 times. You have not said whether this is to be done with or without replacement, but if the rows have a unique identifier there is always the `duplicated` function. -- David. On Jul 23, 2014, at 8:37 AM, Sarah Goslee wrote: > Hi, > > You can use scan() with the n

Re: [R] Retrieve Axis coordinates from map

2014-07-24 Thread David Winsemius
automatically to be able to > generate the legend within the function. > > Thanks > > Julien > > > > [[alternative HTML version deleted]] r-help is a plain text mailing list. > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

Re: [R] R function returning a list of variable(s) conditional on the value of an option?

2014-07-25 Thread David McPearson
I don't know about better or more elegant - but see inserts below... Cheers. On Fri, 25 Jul 2014 22:22:56 +1000 "Luke Hartigan" wrote > Dear all, > > I have an R function which returns a list of variables; however, within the > body of the function I would like to incorporate a branch based on

Re: [R] Using R to Compute Covariance

2014-07-26 Thread David Winsemius
ultiplying it by 2 and then dividing by 3. However, when I get that I still do not get 41/16. What am I missing? -- David Winsemius, MD Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] Need(?) way to create a "picture" (or "plot") of a data.frame

2014-07-31 Thread David Winsemius
ns is sos::findFn. I'm pretty sure that Baptiste Augie has written a function or a package to do this, and I've seen several worked examples on StackOverflow. This is something I fairly quickly found: http://rpubs.com/baptiste/ftableGrob -- David Winsemius Alameda, CA, USA ___

Re: [R] keep information on the number of warnings

2014-07-31 Thread David Winsemius
> the following message: > > "There were 36 warnings (use warnings() to see them)" > > How can I store the number 36 in a variable in function Y? > > In other words, how can I extract the information on the number of warnings > generated? length(w

Re: [R] mutually exclusive events

2014-08-02 Thread David Winsemius
https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA __ R-help@r-project.org ma

Re: [R] keep information on the number of warnings

2014-08-04 Thread David Winsemius
On Aug 4, 2014, at 9:24 AM, Luis Borda de Agua wrote: > Dear David > > Thank you very much for your reply. I‚ve only seen it now. > I tried length(warnings) and I got a strange result. > > When I used > > lw <- length(warnings) > print(lw) > > I obtained

[R] Revolutions blog: July 2014 roundup

2014-08-05 Thread David Smith
onthly basis. As always, thanks for the comments and please keep sending suggestions to me at da...@revolutionanalytics.com or via Twitter (I'm @revodavid). Cheers, # David -- David M Smith Chief Community Officer, Revolution Analytics http://blog.revolutionanalytics.com Tel: +1 (65

Re: [R] big data?

2014-08-05 Thread David Winsemius
___ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, U

Re: [R] R script in batch mode — Echoing messages to windows shell

2014-08-05 Thread David Winsemius
tive HTML version deleted]] This was just seen on SO: "If my guess is correct, shell("echo Some test > CON") should work. – Harry Johnston 1 min" If you had read the Posting Guide, you might have seen that cross-posting to multiple sites is deprecated. -- David W

Re: [R] How to optimizing the code for calculating the launch time

2014-08-06 Thread David McPearson
On Tue, 5 Aug 2014 09:51:56 +0300 Lingyi Ma wrote > My dataset: > > Item_IdYear_Month > B65623262 201204 > B58279745 201204 > B33671102 201204 > B36630946 201204 > B63270151 201204 > B63270133 201204 > > > > I have written my code to calculate one more c

Re: [R] lattice scales format dates

2014-08-06 Thread David Winsemius
45) ) ) > > > > dat <- data.frame(var1=1:10, > date.val=as.POSIXct(seq(as.Date("1910/11/1"), as.Date("1911/8/1"), > "months") )) > > barchart(var1~date.val, data=dat, horizontal=F, > scales=list(x=list(rot=45, format="%Y-%b")))

Re: [R] problem with labeling plots, possibly in font defaults

2014-08-07 Thread David Winsemius
es-Bold" "Times-Italic" "Times-BoldItalic" > > > This is clearly not a big problem (at least for now) since I can put labels > on plots by running par(), but if it is indicative of a larger underlying > problem (or if there is a simple fix) I

Re: [R] how to process multiple data files using R loop

2014-08-08 Thread David Winsemius
urce_data" > [15] "P_last_intron_oncds_source_data" "P_last_intron_ongene_source_data" > > The results from `ls()` are not actual R names but rather are character vectors. To "promote" a character value to an R language-name you need the `get` fun

Re: [R] circlize package: some error message

2014-08-08 Thread David Winsemius
> Wonder anyone could please help me out with this? > > Thank you very much for your time.:) > > [[alternative HTML version deleted]] Your failure to post in plain text makes this message very difficult to read. Unless there i

Re: [R] Installing manual package problem

2014-08-08 Thread David Winsemius
> (...R/win-library/3.0) I see the glassbox folder there. > > I'm new to using packages not from the CRAN list so I'm trying to learn > fast. I tried some searching and this seems to be what I'm suppossed to > do, but perhaps I need to use dev mode

Re: [R] R Package for Text Manipulation

2014-08-09 Thread David Winsemius
ative HTML version deleted]] And do : > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- David Winsemius Alameda, CA, USA __ R-help@r-project.org ma

Re: [R] "Best" way to merge 300+ .5MB dataframes?

2014-08-10 Thread David Winsemius
) a b 1 1 2 > rbind( data.frame(a=1, b=2), data.frame(a=1, b=2) ) a b 1 1 2 2 1 2 > Now with that in mind, what is the idiomatic way? Do people usually do > something else because it is /faster/ (by some definition)? > > Kind regards, > -- David Winsemius Alameda, C

Re: [R] efficient way to replace a range of numeric with a integer in a matrix

2014-08-11 Thread David Winsemius
4188 1688 4 [7,] 1644448884 2 [8,]4114 168 1684 2 [9,] 3218141848 8 [10,]4 164888828 8 -- David. >> (What do you w

Re: [R] "Best" way to merge 300+ .5MB dataframes?

2014-08-11 Thread David Winsemius
r implementation would work well on that system. Well, if > there were a version of R for it. It is a branded UNIX system which > was designed to be totally __and only__ POSIX compliant, with few > (maybe no) extensions at all. IOW, it stinks. No, it can't be > replaced. It is the z

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread David Winsemius
t trust. I've used it with the `cobs` function from the package of the same name to implement the monotonic constraint. I think there is a worked example in the quantreg package, but since I bought Koenker's book, I may be remembering from there. -- David Winsemius Alameda, CA, USA

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-13 Thread David Winsemius
ary(cobs) library(quantreg) Rbs.9 <- cobs(age,analyte, constraint="increase",tau=0.9) Rbs.median <- cobs(age,analyte,constraint="increase",tau=0.5) png("cobs.png"); plot(age,analyte, ylim=c(0,2000)) lines(predict(Rbs.9), col = "red", lwd =

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-14 Thread David Winsemius
9 <- cobs(age,analyte,constraint="increase",tau=0.9, nknots=6, > knots=seq(60,85,by=5)) > plot(age,analyte, ylim=c(0,2000)) > lines(predict(Rbs.9), col = 2, lwd = 1.5) -- David. > > > -- > Jan Stanstrup > Postdoc > > Meta

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-14 Thread David Winsemius
On Aug 14, 2014, at 9:06 AM, David Winsemius wrote: > > On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote: > >> Thank you very much for this snippet! >> >> I used it on my data and indeed it does give intervals which appear quite >> realistic (script and

Re: [R] Generating a polygon around points

2014-08-15 Thread David Winsemius
that copied code comes to my console or editor without line-ends. If anyone has a hint on how to avoid that annoyance, I'll be in your debt. http://markmail.org/search/?q=list%3Aorg.r-project.r-help -- David > > might help? > ---

Re: [R] unable to use functions require DLL from package

2014-08-15 Thread David Winsemius
I'm using R3.1.0 on windows 8 and I've never used R before, so I might have > made some terrible newby error (I have programmed quite a bit before, but in > C > and Matlab). > > Thank you! > > Best, David Winsemius Alameda, CA, USA _

Re: [R] Generating a polygon around points

2014-08-15 Thread David Winsemius
On Aug 15, 2014, at 3:11 PM, Rolf Turner wrote: > On 16/08/14 05:10, Jeff Newmiller wrote: >> I use RSiteSearch regularly with no problems. Perhaps I have just had >> a lucky streak? I wonder what the odds are... :-) > > > > >> On August 15, 2014 8:55:40

Re: [R] unable to use functions require DLL from package

2014-08-15 Thread David Winsemius
On Aug 15, 2014, at 2:56 PM, Charlotte de Vries wrote: > David Winsemius comcast.net> writes: > >> >> >> On Aug 15, 2014, at 8:06 AM, Charlotte de Vries wrote: >> >>> Hey there! >>> >>> I'm having problems with the same

Re: [R] unable to use functions require DLL from package

2014-08-16 Thread David Winsemius
On Aug 16, 2014, at 1:54 AM, Lotte de Vries wrote: snipped all of your and my earlier material because you have included everything needed for an answer in your current question.. > > > > Hi David, > > Let me try this again, apologies. > > I'm trying to

Re: [R] Making my own graphics device

2014-08-17 Thread David Winsemius
to the S language (at least on PC's) would be TIBCO. They do list the acronym `hpgl` on one page in the S+ documentation, but it is in the "deprecated functions" section (p 39): http://www.uni-koeln.de/themen/statistik/software/s/v81/functionguide.pdf Good luck. -- Dav

Re: [R] Making my own graphics device

2014-08-17 Thread David Winsemius
tion is xgraph and here is the C code for one implementation: http://xgraph.sourcearchive.com/documentation/12.1-3/hpgl_8c-source.html The other option might be to enlist an external program such as GNUPLOT that has an HPGL output and use it as a driver to which you send an image in a file fo

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-18 Thread David Winsemius
I had that result sometimes when testing as well. You don't offer any code so there's nothing I can do to follow-up. -- David. On Aug 18, 2014, at 4:56 AM, Jan Stanstrup wrote: > The knots are deleted anyway ("Deleting unnecessary knots ..."). It seems to > make no

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https

[R] Fwd: DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
The image file I prepared and attached did not make it through. Trying again. -- David Begin forwarded message: > From: David Winsemius > Subject: Re: [R] DateTime wrong when exporting to csv in R > Date: August 20, 2014 1:48:14 PM PDT > To: Sneha Bishnoi > Cc: r-help &g

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
On Aug 20, 2014, at 1:48 PM, David Winsemius wrote: > > On Aug 20, 2014, at 4:53 AM, Sneha Bishnoi wrote: > >> Hi All! >> >> This seems to be trival but I am not able to find a solution for it. >> I have a dataframe with datetime columns in form of ("%

[R] ggplot2: how to jitter spaghetti plot so slopes are preserved

2014-08-20 Thread David Romano
on so that their slopes are preserved, but so far my attempts to jitter -- within ggplot, as opposed to first jittering toy.df by hand -- seem to always jitter the two points for a given id independently, and thus change the slopes. I'd be grateful for any guidance! Thanks, David ___

Re: [R] Line Graph greater than 2 variables on plot

2014-08-21 Thread David McPearson
You could also try matplot(data_object[, 1], data_object[, -1], ...) ?matplot Cheers. On Thu, 21 Aug 2014 09:55:29 +1000 "Duncan Mackay" wrote > Hi > > Try something like (as you have not given a reproducible example) > > library(lattice) > > xyplot(y1 + y2+ y3 ... ~ x, data = your data.fram

Re: [R] How to view the whole dataset that is imported through sasxport.get

2014-08-21 Thread David Winsemius
79 [2,]2468 10 > attr(x,"dim") [1] 2 5 > attr(x,"dim") <- NULL > x [1] 1 2 3 4 5 6 7 8 9 10 It also appears the there is a `label<-` function, so you could probably use that to NULL them out. -- David Winsemius Alameda, CA, USA

Re: [R] How to view the whole dataset that is imported through sasxport.get

2014-08-21 Thread David Winsemius
On Aug 21, 2014, at 10:59 AM, Jun Shen wrote: > David, > Thanks for your reply. > Here is some of the output of str() > > 'data.frame': 1991 obs. of 5 variables: > $ SID :Class 'labelled' atomic [1:1991] 01018 01018 01018 01018 ... > .. ..- a

Re: [R] Help on installing "R" packages in a Citrix

2014-08-22 Thread David Winsemius
-packages" for help, but was told this was > the correct Forum for info of this type. Have you installed R? Which OS? Which version? -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Help on installing "R" packages in a Citrix

2014-08-22 Thread David Winsemius
On Aug 22, 2014, at 7:37 AM, Chirag Patel wrote: > Hi David > > I have installed R Version 2.15.1 on the image but having problems install > rcom and rscproxy. Those are commercial packages and not maintained or supported by R-Core (That is also a rather old version of R an

Re: [R] Help on installing "R" packages in a Citrix

2014-08-22 Thread David Winsemius
On Aug 22, 2014, at 9:13 AM, David Winsemius wrote: > > On Aug 22, 2014, at 7:37 AM, Chirag Patel wrote: > >> Hi David >> >> I have installed R Version 2.15.1 on the image but having problems install >> rcom and rscproxy. > > Those are commercial pack

Re: [R] converting dataframe into multiple time series

2014-08-23 Thread David Winsemius
> R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA

Re: [R] How can I let the dimension change via the circulation?

2014-08-24 Thread David Winsemius
ou should "learn to search" http://www.rseek.org/ -- David. >> Suppose >> there are 400 observations. The regression starts at the r1th of the >> sequence and ends at r2th. First let the regression sequence start at 1st >> obesrvations and end at 40th. We get the fi

Re: [R] Filled vector contours

2014-08-24 Thread David Winsemius
library(lattice) fm4.env <- locfit(ozone ~ wind * temperature * radiation, env) w.mesh <- with(env, do.breaks(range(wind), 50)) t.mesh <- with(env, do.breaks(range(temperature), 50)) r.mesh <- with(env, do.breaks(range(radiation), 3)) grid <- expand.grid(wind = w.mesh, temperature = t

Re: [R] Preventing loading of user packages

2014-08-25 Thread David Winsemius
ages. Fo me this reports correctly that my base package is not there: > grepl("~/Library/R/3.0/library" , attr(packageDescription('base'), "file") ) [1] FALSE But this raises the question. Why is this happening and why don't you just delete the directory? -- Dav

Re: [R] Plot survreg and intcox

2014-08-26 Thread David Winsemius
list subscribers saying that the HTL version was deleted explains why this is such a mess. Please read the Posting Guide and post in plain text: -- David. > My code shows > below:>mod.reg1=survreg(s_new~type+sex+eye+preopiop+preopva,dist="weibull")>summary(mod.reg1) >

Re: [R] plot for "survreg" and "intcox" (rewritten)

2014-08-26 Thread David Winsemius
that are not in the base or default packages. I have quite a few packages loaded including survival_2.37-7 , coxme_2.2-3, and rms_4.2-0 but I get: > ?intcox No documentation for ‘intcox’ in specified packages and libraries: you could try ‘??intcox’ > -- David. >> cox.fit=int

Re: [R] Mixed sorting/ordering of strings acknowledging roman numerals?

2014-08-26 Thread David Winsemius
= TRUE)) rank.overall <- ifelse(is.na(rank.character), rank.numeric, rank.character) order.frame <- as.data.frame(rank.overall) if (length(which.nas) > 0) order.frame[which.nas, ] <- Inf retval <- do.call("order", order.frame) return(retva

Re: [R] NA's introduced by coercion

2014-08-26 Thread David Winsemius
er_) ) [1] 2 1 NA So it is not the NA's in that character vector but rather values that were coerce to NA because the conversion could not be accomplished. -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.eth

Re: [R] lattice: packet.number() versus panel.number()

2014-08-26 Thread David Winsemius
, but I suspect the packet numbers are sequential increasing. -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/post

Re: [R] Where to find source of C_pbinom?

2014-08-27 Thread David Winsemius
oaded into R. Where can I find the source code of C_pbinom? www.r-project.org/doc/Rnews/Rnews_2006-4.pdf Pages 43-54 -- David Winsemius, MD Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] simple plotting wcor (Rssa) question

2014-08-27 Thread David Winsemius
not show up as F1,F2 in your example. It doesn't make much sense to request the at values of 30 and 40 since you only gave it a matrix that was 20 x 20. -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] Issue with formula conversion

2014-08-27 Thread David Winsemius
, as shown below: > >> as.formula(ranEff) > ~1 + Age > > the "pdCompSymm" is lost in the conversion. Any solutions? as.formula(paste("~",ranEff)) ~pdCompSymm(~1 + Age) -- David Winsemius Alameda, CA, USA __ R-help@r-

Re: [R] Issue with formula conversion

2014-08-27 Thread David Winsemius
On Aug 27, 2014, at 12:44 PM, Gang Chen wrote: > Thanks for the help! However, I just need to get > > pdCompSymm(~1 + Age) That's not a formula in the R sense of the word. You should do a better job of posting a use case. Perhaps you want an expression? -- David. > > wi

Re: [R] Issue with formula conversion

2014-08-27 Thread David Winsemius
ndom=list(Block=eval(tt) )) > fm Linear mixed-effects model fit by REML Data: Oats Log-restricted-likelihood: -296.5209 Fixed: yield ~ nitro (Intercept) nitro 81.8722273.7 snipped rest of output. -- David > > works, I don't know the 'pdCompSymm

Re: [R] Issue with formula conversion

2014-08-27 Thread David Winsemius
yield ~ nitro, data=Oats, random=list(Block=do.call(BlockFunction, list(form=ranEff1) ) )) fm #-- Linear mixed-effects model fit by REML Data: Oats Log-restricted-likelihood: -296.5209 Fixed: yield ~ nitro snipped -- David. > > The above is untested. An example if get()

Re: [R] R packages for power analysis

2014-08-28 Thread David Winsemius
> and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.

Re: [R] dont remenber my password

2014-08-29 Thread David Winsemius
Your password is sent via email every month or so. -- David On Aug 29, 2014, at 7:54 AM, PIKAL Petr wrote: > That is bad, especially if it is password to your bank account. Maybe you > shall write it down somewhere next time. > > Petr > >> -Original Message-

Re: [R] Question regarding the discrepancy between count model parameter estimates between "pscl" and "MASS"

2014-08-29 Thread David Winsemius
=NULL, type="source") (That reported success on a SL Mac R 3.1.0 machine. And there did not appear to be any compiled code so the Mac "tool chain" was not needed. The other way to check for that possibility is to look at the DESCRIPTION file.) -- David. > > Thank y

Re: [R] Unexpected behavior when giving a value to a new variable basedon the value of another variable

2014-08-29 Thread David McPearson
On Fri, 29 Aug 2014 06:33:01 -0700 Jeff Newmiller wrote > One clue is the help file for "$"... > > ?" $" > > In particular there see the discussion of character indices and the "exact" > argument. > <...snip...> > > On August 29, 2014 1:53:47 AM PDT, Angel Rodriguez > wrote: > > >Dear subsc

Re: [R] Bus stop sequence matching problem

2014-08-30 Thread David McPearson
Homework? The list has a no homework policy - but perhaps I'll be forgiven por posting hints. In general terms, this is how I appraoched the problem: * Loop through the rows of stop_onoff - for (idx in ...someething...) {... * For each row, find the first of "ref" in a suitably filtered subset of s

Re: [R] Unexpected behavior when giving a value to a new variable basedon the value of another variable

2014-08-30 Thread David Winsemius
On Aug 29, 2014, at 8:54 PM, David McPearson wrote: On Fri, 29 Aug 2014 06:33:01 -0700 Jeff Newmiller > wrote One clue is the help file for "$"... ?" $" In particular there see the discussion of character indices and the "exact" argument. <...snip

Re: [R] Unexpected behavior when giving a value to a new variable basedon the value of another variable

2014-08-30 Thread David Winsemius
On Aug 30, 2014, at 7:38 PM, David Winsemius wrote: On Aug 29, 2014, at 8:54 PM, David McPearson wrote: On Fri, 29 Aug 2014 06:33:01 -0700 Jeff Newmiller > wrote One clue is the help file for "$"... ?" $" In particular there see the discussion of character i

Re: [R] Depth vs Temp graph for different transects

2014-09-01 Thread David Winsemius
inetype, title="Transect") If nTrans is 22 then you are getting what you ask for. If you subsetted a dataset where TAll$Trans was a factor then it's perfecty possible that the legend would have more items than the subset. Perhaps you should use `length` or length(unique(.))` ra

Re: [R] depth of labels of axis

2014-09-01 Thread David Winsemius
It did not seem to me that padj=0 produced "top alignment". -- David Winsemius, MD Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project

Re: [R] Detect expired RSQLiteConnection?

2014-09-02 Thread David Winsemius
Noodling through the S4 and then the S3 code I found: ?isIdCurrent as the test in `sqliteCloseConnection` > -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Simulating from a Weibull distribution

2014-09-02 Thread David Winsemius
rvreg docs says: # Weibull parametrisation y<-rweibull(1000, shape=2, scale=5) survreg(Surv(y)~1, dist="weibull") # survreg scale parameter maps to 1/shape, linear predictor to log(scale) David Winsemius Alameda, CA, USA __ R-help@r-pr

<    5   6   7   8   9   10   11   12   13   14   >