Re: [R] Printing vector

2019-07-23 Thread Michael Friendly
Nice to see William Dunlap take the trouble to mimic the classic Fortran behavior of printing for numbers that don't fit in the given width :) -Michael On 7/22/19 6:33 p.m., William Dunlap via R-help wrote: The following mimics Fortran printing with format F.. print1 <- function (x,

Re: [R] Using options(max.print = 1000000) to read in data

2019-07-09 Thread Michael Friendly
confusion, I was expecting the whole dataset to load into my > console and was concerned that perhaps if I had to set the data in the > data frame as a matrix (if not already), then I would not achieve this > result. > > Thanks, > > Spencer > > On Tue, Jul 9, 2019 at

Re: [R] Using options(max.print = 1000000) to read in data

2019-07-09 Thread Michael Friendly
Why do you need it to be a matrix? A data.frame is like a matrix, but allows columns of mixed types. as.matrix() will coerce your data frame to a matrix if you really need this. On 7/08/19 4:43 p.m., Spencer Brackett wrote: Using str(GBM.txt) produced the same output as last time, which lists

Re: [R] R 3.6.1 is released

2019-07-05 Thread Michael Friendly
On a nice summer day in the Fitou region of France, I feel like asking all R-help folks to raise a glass of their favorite beverage in a toast to the R / CRAN maintainers. Thanks for your efforts! -Michael -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept

Re: [R] Structuring data for Correspondence Analysis

2019-03-30 Thread Michael Friendly
In SAS I would simply do this: proc corresp data=table dim=2 outc=_coord; table Preference, Sex Age Time; run; I don't know how convert in R a data frame to a frequency table to execute properly this function: ca <- ca(, graph=FALSE) [[alternative HTML version deleted]]

Re: [R] Tinn-R: new website under https protocol / fortune nomination

2019-01-19 Thread Michael Friendly
... the height of your flight depends only on you! -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, ASA Statistical Graphics Section York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http://www.datavi

Re: [R] Printing a list of simultaneous equations

2019-01-19 Thread Michael Friendly
stics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing)

[R] ANNOUNCE: ASA Data Challenge Expo, 2019

2018-11-14 Thread Michael Friendly
ortion of the New York City Housing and Vacancy Survey data, but can also combine other data sources in the analysis. If you have any questions on the Data Challenge Expo 2019 please reach out to Wendy Martinez. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psycholog

Re: [R] Genuine relative paths with R

2018-10-11 Thread Michael Friendly
Olivier: Readers of R-Help generally are patient and try to be helpful. Numerous solutions to your initial query were proposed, but for some reason you either reject them or take the discussion down some different rabbit hole of claims about R vs. other software environments, to which kind

Re: [R] Strange paradox

2018-10-06 Thread Michael Friendly
uare. Yet the p-value associated with the deviance statistic is highly significant (p=0.0047), suggesting that the confounders (x3 and x4) account for the prediction of the dependent variable. Does anyone have an explanation of this strange paradox? Thank you for any suggestion. Anne -- Mic

Re: [R] Smallest Space Analysis (SSA) in R

2018-09-23 Thread Michael Friendly
er: http://whatzcookinlab.blogspot.com/2013/05/spinning-3d-mds-plot.html The vegan and ade4 packages also have a variety of plots and related methods. -Michael Thank you again, and to all of those who responded. Best wishes Andrew On 21/09/18 14:07, Michael Friendly wrote: Smallest space ana

Re: [R] Smallest Space Analysis (SSA) in R

2018-09-21 Thread Michael Friendly
Smallest space analysis (SSA) is just the name given to software developed by Guttman & Lingoes around the time the various versions of multidimensional scaling were being developed. Call it Israeli MDS or Falafel MDS if you prefer. The reason you encountered it in your course is presumably

Re: [R] Automate running files in R

2018-07-23 Thread Michael Friendly
Hi Serena I'll add one more "in addition" to this list of suggestions. It may not be what you were thinking of, but may be far simpler in the long run. The complexity of your approach comes from having separate data files for each subject and trial, for which you have to have a convention

Re: [R] TukeyHSD for multiple response

2018-05-26 Thread Michael Friendly
t implemented for multiple responses So this has to do with the fact that I have a multivariate independent variable. Is there an alternative function to this? Thanks in advance, Sérgio. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, ASA Sta

Re: [R] Linear regression with tranformed dependant variable

2017-10-24 Thread Michael Friendly
Step back a minute: normality is NOT required for predictors in a multiple regression model, though the sqrt(x) transformation may also make the relationship more nearly linear, and linearity IS assumed when you fit a simple model such as y ~ x + w + z. (Normality is only required for the

Re: [R] How long to wait for process?

2017-07-27 Thread Michael Friendly
Rather than go to a penalized GLM, you might be better off investigating the sources of quasi-perfect separation and simplifying the model to avoid or reduce it. In your data set you have several factors with large number of levels, making the data sparse for all their combinations. Like

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread Michael Friendly
It was suggested to quote your string with *backticks* (` ... `) rather than single quotes. String <- ` ... ` On 7/18/2017 1:05 PM, Christofer Bogaso wrote: Thanks for your pointer. Is there any way in R how to replace " ' " with " /' " programmatically? My actual string is quite

Re: [R] label sunflower point

2017-07-17 Thread Michael Friendly
On 7/16/2017 9:36 AM, Nada Gh wrote: Hi, I create a plot using sunflowerplot, I need to highlight one point to show its importance. What suggestion you have to accomplish this? Thanks, In general, the way to answer such a question for yourself is to read the documentation for arguments

Re: [R] R and UBUNTU startup

2017-07-04 Thread Michael Friendly
On 7/04/17 11:15 AM, PIKAL Petr wrote: Dear all I have 3 questions. Due to some reason I switched from Vista to Ubuntu on home PC. I was used to start with Rgui.exe. However I am not able to find it under Ubuntu and R starts as terminal (probably Rterm). Question 1. Is Rgui.exe available on

Re: [R] R package for scorecard development

2017-06-29 Thread Michael Friendly
Hi I'm sure there are valid reasons for wanting to use a scorecard model, but a more straightforward approach would just be a logistic regression or logistic discriminant analysis. Compared to that, a scorecard model can be considered to be throwing away information by binning the predictors.

Re: [R] Help : glm p-values for a factor predictor

2017-06-29 Thread Michael Friendly
On 6/29/17 11:13 AM, Benoît PELE wrote: My question is about the factor predictors with several levels. R provides only the pvalues for each level whereas i need an overall pvalue for testing the predictor. What you ask is provided by anova() -- type I tests, and car::Anova() -- Type II & III

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Michael Friendly
5/9/2017 10:20 AM, Ralf Goertz wrote: Am Sat, 6 May 2017 11:17:42 -0400 schrieb Michael Friendly <frien...@yorku.ca>: On 5/5/2017 10:23 AM, Ralf Goertz wrote: Am Fri, 05 May 2017 07:14:36 -0700 schrieb Jeff Newmiller <jdnew...@dcn.davis.ca.us>: R normally prompts you to sav

Re: [R] loading edited functions already in saved workspace automatically

2017-05-06 Thread Michael Friendly
etwd(), "]\n"),sep=" ") } } .Last <- function() if(interactive() && .Platform$GUI == "Rgui") { histfile <- if (file.exists(".Rhistory")) ".Rhistory" else "c:/R/.Rhistory" try(utils::savehistor

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Michael Friendly
Try: tools:::showNonASCIIfile(file) On 3/10/2017 5:52 AM, Marc Girondot via R-help wrote: Based on the message, "Note: found 4 marked UTF-8 strings", it seems that "4 marked UTF-8 strings" are present in the package and it is a problem... Is there any solution to know in which file?

Re: [R] testing whether clusters in a PCA plot are significantly different from one another

2017-01-07 Thread Michael Friendly
for this, AFAIK. The cluster "group" assignment was also chosen to optimize some (other) criterion. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele

Re: [R] Principle Component Analysis: Ranking Animal Size Based On Combined Metrics

2016-11-13 Thread Michael Friendly
Salvatore, I won't comment on whether to use log weight "to increase the correlation" -- that depends on whether that makes sense, and whether the relationships with other variables is more nearly linear. Try this with your pca of the correlation matrix: biplot(pca_morpho) You'll see that

Re: [R] How to plot predicted probabilities with 95% CIs

2016-10-03 Thread Michael Friendly
Why not use the effects package -- designed for this task. library(effects) plot(allEffects(mfit)) ?plot.eff # for details On 10/3/2016 3:15 AM, Faradj Koliev wrote: Dear all, I need a little help with plotting predicted probabilities (values). Consider the following example **

Re: [R] R-specific Software Requirement Specification

2016-09-08 Thread Michael Friendly
\\file\\test.R') > And gives same error -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb:http://www.datavis.ca Toronto, ONT M3J

Re: [R] R-specific Software Requirement Specification

2016-09-08 Thread Michael Friendly
You might also or instead look at the roxygen way of doing things, which maps to Rd files, but are much easier to write. In R Studio, Code -> Insert Roxygen skeleton does this for you from an existing function. See: http://r-pkgs.had.co.nz/man.html #' title goes here #' #' description goes

[R] [R-pkgs] Lahman package v. 5.0.0 released to CRAN

2016-09-07 Thread Michael Friendly
additional analyses and visualizations. -- Team Lahman: Chris Dalzell (maintainer), Michael Friendly (author), Denis Murphy, Martin Monkman, Sean Lahman -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice:

[R] [R-pkgs] statquotes package released to CRAN

2016-09-07 Thread Michael Friendly
github.com/friendly/statquotes/. Please report any problems or bugs at https://github.com/friendly/statquotes/issues. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5

Re: [R] Importint stata file and using value labels

2016-08-27 Thread Michael Friendly
str() to see the class of what you've read. Then try as.data.frame() on the resulting object read from the .dta file. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-

Re: [R] Three way correspondence analyses?

2016-08-04 Thread Michael Friendly
You haven't supplied any data, and we can only guess which cca() function you are using (ade4::cca, ..., vegan::cca(), yacca::cca), and the term 'cca' generally refers to canonical correspondence analysis, which is not quite the same thing as 'three-way correspondence analysis'. For three-way

Re: [R] dependent p.values in R

2016-07-10 Thread Michael Friendly
Hello Fernando First, ask yourself what Gosta Ekman would have said if you asked him this question. He would have asked "does it make any difference to your conclusion?" He might also have asked you "Did you do a visual test?" Plot your data as a QQ plot or density plot? If the test

Re: [R] biplot

2016-06-23 Thread Michael Friendly
On 6/22/2016 8:39 AM, Shane Carey wrote: Hey, Does anyone know how to remove labels from a biplot? I want to input them manually as they are currently overlapping. Rather than doing them manually, you might have better luck with ggbiplot, and the ggrepel package designed to 'repel' point

Re: [R] inverse table

2016-06-16 Thread Michael Friendly
://stat.ethz.ch/pipermail/r-help/2009-January/378521.html If memory serves, that code has made its way into one or more packages on CRAN but I don't recall which at the moment. Regards, Marc Schwartz -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & C

[R] [R-pkgs] New versions of heplots, candisc, mvinfluence and matlib on CRAN

2016-06-09 Thread Michael Friendly
- added argument `error.sphere` to `plot.regvec3d()` [JF] - remove use of `lengths()` in `corner()` to avoid R version dependency -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax:

Re: [R] colored table

2016-05-29 Thread Michael Friendly
for (x = -1, y = -1) will be -20. This will be printed with a light color background. And so on. Thanks for your help, Naresh -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66

Re: [R] Change sum of squares type for ANOVA

2016-05-20 Thread Michael Friendly
Use car::Anova() for type II and type III sums of squares and F-tests. The sequential type I tests computed by anova() are rarely sensible On 5/20/2016 3:11 AM, michael.eisenr...@agroscope.admin.ch wrote: Dear R-list members, I compared my statistics with my supervisor yesterday. He is using

Re: [R] R simulation help pls

2016-05-11 Thread Michael Friendly
On 4/06/16 11:54 AM, tan sj wrote: Hi, i am student from malaysia, i am new in r programming field, now i am trying to conduct a robustness study on 2 sample test under several combination of factors such as sample sizes ,standard deviation ratio and also distribution.. but now i am

Re: [R] web scraping tables generated in multiple server pages / Best of R-help

2016-05-11 Thread Michael Friendly
ob Rudis. Not only did he point me to RSelenium, but he wrote a complete solution to the problem, and gave me the generated data on a github link. It was slick, and I learned a lot from it. best, -Michael -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept.

[R] web scraping tables generated in multiple server pages

2016-05-10 Thread Michael Friendly
267.075,77 3 0,00 624,99 70.212,93 4 0,00 395,64 44.447,18 5 0,00 719,68 41.764,46 6 0,00 446,52 85.152,92 thanks, -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psyc

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-06 Thread Michael Friendly
On 4/4/2016 9:15 PM, tan sj wrote: hi, i am new in this field. do favorite If I wish to conduct a simulation on the robustness of two sample test by using R language, is that

Re: [R] Is there dpois equivalent for zero-inflated Poisson?

2016-03-24 Thread Michael Friendly
Neat! It would be nice to complete dzipois() with the corresponding rzipois() and pzipois() functions. I would have found these useful in my new book, http://ddar.datavis.ca -Michael On 3/23/2016 11:27 AM, Martin Maechler wrote: Thierry Onkelinx on Tue, 22

Re: [R] Best Regression Technique to Use

2016-03-14 Thread Michael Friendly
On 3/13/2016 6:42 PM, Ajay Andrews wrote: I have a set of independent variables that are all BINARY, and my dependent variable is also BINARY. Should I use the logistic regression for this - using the glm function? [[alternative HTML version deleted]] glm(..., family=binomial) will

Re: [R] Statistical analysis of olive dataset

2016-03-13 Thread Michael Friendly
On 3/12/2016 12:39 PM, Axel wrote: The main goal of my analysis is to determine which are the fatty acids that characterize the origin of an oil. As a secondary goal, I wolud like to insert the results of the chemical analysis of an oil that I analyzed (I am a Chemistry student) in order to

Re: [R] Predicting correlated responses using canonical correlations in multivariate least squares

2016-02-27 Thread Michael Friendly
On 2/27/2016 1:34 PM, Michael Friendly wrote: You might also find that an HE plot (library (heplots)) is illuminating. Follow-up: Try the following with your example library(heplots) hs.mod <- lm(cbind(y1, y2) ~ x1 + x2, data=hs.r) heplot(hs.mod, fill=TRUE) uv.mod <- lm(cbind(u1, u2

Re: [R] Predicting correlated responses using canonical correlations in multivariate least squares

2016-02-27 Thread Michael Friendly
Hi Alex, Thanks for the detailed explanation and the reproducible example. But it is still not clear exactly what you wish to accomplish. You know how to calculate the scores on the canonical variates. These could be considered 'predicted scores', but in canonical space. What's wrong with

Re: [R] Specify order of groups negative binomial (glm.nb)

2016-02-26 Thread Michael Friendly
On 2/25/2016 1:53 PM, Katharine Miller - NOAA Federal wrote: The dependent variable is catch per unit effort (CPUE), and the independent variable is the the tributary (Trib_cat). CPUE is derived from the fish counts divided by the effort, so the response is not a count per se, but I think the

Re: [R] How to merge two tables

2016-02-23 Thread Michael Friendly
Hi Xiyan, You don't show your original data, so * If you produced `cross` and `age` tables by summing the counts from a single larger data set, go back to that and do it again. but now include age/ * Otherwise, you can use vcdeExtra::expand.dft()` on both of these data sets to expand to

Re: [R] Multivariate multiple linear regression question

2016-02-22 Thread Michael Friendly
Hi Vivendra A few suggestions: * You will get more interpretable tests by using Type II (partial) tests of terms in your model via library(car) Manova(MRI_model) as opposed to the Type I (sequential) tests available from manova() * You will be able to understand the results better by making

Re: [R] [R-pkgs] New Package: stripless (V. 1.0)

2016-02-03 Thread Michael Friendly
Hi Burt This looks like an interesting package. However, you should know that 'strucplot()' might not be the best choice for your generic, because vcd::strucplot() is now well-established as the general name for functions plotting structured multi-way frequency tables, like mosaic plots and

Re: [R] R-help mailing list activity / R-not-help?

2016-01-24 Thread Michael Friendly
ave" button and think better of their replies. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb

[R] [R-pkgs] matlib package for linear algebra and multivariate statistics

2015-11-20 Thread Michael Friendly
etc. are invited there. best, -Michael -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb:http://www.datav

Re: [R] R wont accept my zero count values in the GLM with quasi_poisson dsitribution

2015-07-28 Thread Michael Friendly
On 7/28/2015 3:05 AM, Göran Broström wrote: On 28/07/15 08:33, Charlotte wrote: Hello I have count values for abundance which follow a pattern of over-dispersal with many zero values. I have read a number of documents which suggest that I don't use data transforming methods but rather than

Re: [R] calculate adjacent log odds for a table

2015-07-22 Thread Michael Friendly
On 7/21/2015 11:14 AM, Michael Friendly wrote: More generally, for an I x J x K table, where the last factor is the response, my desired result is a data frame of IJ(K-1) rows, with adjacent log odds in a 'logodds' column, and ideally, I'd like to have a general function to do this. Note

[R] calculate adjacent log odds for a table

2015-07-21 Thread Michael Friendly
of frequencies shown by ftable(), the calculation is essentially log(T) %*% matrix(c(1, -1, 0, 0, 1, -1)) followed by reshaping and labeling. Can anyone help with this? -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative

Re: [R] Usage of vcd packages.

2015-06-24 Thread Michael Friendly
On 6/23/15 4:07 PM, My List wrote: All, I am new to the vcd package and new to R too. Welcome to R and glad you found the vcd package. 1) I have a lickert analysis based data set. 2) I am doing a hypothesis tests on the variables ( like, is there a relationship between the choice of a Doctor

Re: [R] Joining two datasets - recursive procedure?

2015-03-18 Thread Michael Friendly
I'm not sure I understand completely what you want to do, but if the data were frequencies, it sounds like task for fitting a loglinear model with the model formula ~ V1*V2 + V3 On 3/18/2015 2:17 AM, Luca Meyer wrote: Hello, I am facing a quite challenging task (at least to me) and I was

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

2015-03-05 Thread Michael Friendly
to include only those that occur with frequency greater than a given value, or the top 10 (say) in frequency, or the highest frequency categories accounting for 80% (say) of the total. I'm not sure how to do any of these in R. Can anyone help? -- Michael Friendly Email: friendly AT yorku DOT ca

Re: [R] Fitting Legend to Matrix Plot

2015-03-05 Thread Michael Friendly
Why not make the legend fit on one line above or below the plot matrix? ?legend -- look at ncol=, horiz= and xpd= args On 3/4/2015 4:39 PM, Rich Shepard wrote: I have a matrix plot of ternary diagrams (pdf attached) generated with these commands: opar - par(xpd=NA,no.readonly=T)

Re: [R] How to analyse nonlinear response to categorical and quantitative explanatory variables?

2015-02-20 Thread Michael Friendly
You want to use a generalized linear model of some sort glm(count ~ flow + gravity + group, data=mydata, family=poisson) would be a start, however, the effects of flow rate are nonlinear, so you might use a natural spline term like ns(flow,5) to allow nonlinearity, and there also seem to be

Re: [R] how to draw paired mosaic plot?

2015-02-08 Thread Michael Friendly
/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. [[alternative HTML version deleted]] -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair

[R] poor man's scree plot for SVD: multiline labels and total lines

2015-02-06 Thread Michael Friendly
0.2087727 89.4 89.4 ** 2 0.149086 0.066 9.5 98.9 *** 3 0.050975 0.0025984 1.1 100.0 -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814

[R] simplify code for dummy coding of factors

2014-12-30 Thread Michael Friendly
0 1 -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb:http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA

Re: [R] simplify code for dummy coding of factors

2014-12-30 Thread Michael Friendly
, removing intercept, including haireye data haireye.df - as.data.frame(haireye) haireye.df - cbind( haireye.df, model.matrix(Freq ~ Hair + Eye, data=haireye, contrasts.arg=list(Hair=diag(4), Eye=diag(4)))[,-1] ) haireye.df -- Michael Friendly Email: friendly AT yorku DOT ca

[R] merge coefficients from a glmlist of models

2014-10-28 Thread Michael Friendly
coefficient names, with NA filled in where a term is missing. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb:http://www.datavis.ca Toronto

Re: [R] merge coefficients from a glmlist of models

2014-10-28 Thread Michael Friendly
...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Michael Friendly Sent: Tuesday, October 28, 2014 11:47 AM To: R-help Subject: [R] merge coefficients from a glmlist of models In the vcdExtra package, I have a function glmlist to collect a set of glm() models as a glmlist object

[R] get names of glm and related families from an object

2014-10-04 Thread Michael Friendly
with glm.nb -- I get, e.g., nmes.nbin2$family$family [1] Negative Binomial(1.2354) and the countreg functions don't return a family component. I think I have to also use class(object), and a more complicated computation of family, but maybe there's a simpler way? -Michael -- Michael Friendly

Re: [R] R Markdown (Rstudio) Limit Results in knit Pdf

2014-10-04 Thread Michael Friendly
=correlation) ``` I have tried using {r, message=1:9}, {r, Hide=1:9} and similar. Please let me if you have a solution. Best, Teis Moeller Kristensen School of Communication and Information Rutgers University Office ANX A - 103 [[alternative HTML version deleted]] -- Michael Friendly

[R] plots on log=y scale with smooths

2014-09-17 Thread Michael Friendly
: library(ggplot2) ggplot(CPpos, aes(x=length, y=intensity)) + geom_jitter(position=position_jitter(height=.1), alpha=0.25) + scale_y_log10(breaks=c(1,2,5,10,20,50,100, 200)) + stat_smooth(method=loess, color=red, size=1.5) + stat_smooth(method=lm) -- Michael Friendly Email

[R] [R-pkgs] Announce: Lahman baseball database archive package, v 3.0

2014-09-15 Thread Michael Friendly
. In particular: o HallOfFame$hofID is now HallOfFame$playerID o managerID is now playerID in all tables o Removed from Master: managerID, hofID, holtzID, lahmanID, lahman40ID, lahman45ID, nameNote, nameNick, and college -Michael -- Michael Friendly Email: friendly AT yorku DOT ca

Re: [R] frequencies of a discrete numeric variable, including zeros

2014-09-03 Thread Michael Friendly
- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Michael Friendly Sent: Tuesday, September 02, 2014 1:29 PM To: R-help Subject: [R] frequencies of a discrete numeric variable, including zeros The data vector, art, given below using dput(), gives a set

[R] frequencies of a discrete numeric variable, including zeros

2014-09-02 Thread Michael Friendly
, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 9L, 9L, 10L, 11L, 12L, 12L, 16L, 19L) -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair

[R] shading cells in a latex table by value

2014-07-23 Thread Michael Friendly
} # -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA

Re: [R] shading cells in a latex table by value

2014-07-23 Thread Michael Friendly
) according to a function of the cell value is useful in the same way as visual attributes in plots, but, at present, far more difficult. best, -Michael On 07/23/2014 11:31 AM, Duncan Murdoch wrote: On 23/07/2014, 9:31 AM, Michael Friendly wrote: I want to create latex tables of values where

Re: [R] canonical correlation

2014-07-14 Thread Michael Friendly
Perhaps what you are looking for is the visualization methods for canonical correlation provided in the candisc package. see ?candisc::cancor ?heplot.cancor -Michael On 13/07/2014 4:39 PM, Monaly Mistry wrote: Dear John, In my final model I have 10 independent variables that account for

Re: [R] Cansisc: Error in eigen(eHe, symmetric = TRUE)

2014-07-10 Thread Michael Friendly
, cuando encajas tan armónicamente que cualquier cosa que hagas es una alegría para ti. De repente lo sabrás y la meditación te seguirá. Si amas el trabajo que haces, si amas la manera como vives, entonces ya estás meditando y nada puede distraerte. Osho -- Michael Friendly

Re: [R] Package 'effects' plotting allEffects question

2014-06-07 Thread Michael Friendly
is useless. -- View this message in context: http://r.789695.n4.nabble.com/Package-effects-plotting-allEffects-question-tp4691817.html Sent from the R help mailing list archive at Nabble.com. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative

Re: [R] \ escape sequence and windows path

2014-05-21 Thread Michael Friendly
the possibility to use f.e path=C:\foo1\foo2\ I can import those paths with path = readline() but not directly in a script Regards Knut -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100

Re: [R] ggplot2: using coord_trans for logit - probability

2014-04-17 Thread Michael Friendly
not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Michael Friendly Verzonden: donderdag 17 april 2014 4:03 Aan: R-help Onderwerp: [R] ggplot2

[R] ggplot2: using coord_trans for logit - probability

2014-04-16 Thread Michael Friendly
(pred2, aes(x=Age, y=prob)) + geom_line(size = 2) + theme_bw() + geom_ribbon(aes(ymin = lower, ymax = upper), alpha = 0.2, color = transparent) + labs(x = Age, y = Probability (Better)) gg2 -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept

Re: [R] The explanation of ns() with df =2

2014-04-15 Thread Michael Friendly
% 8 attr(,Boundary.knots) [1] 1 15 attr(,intercept) [1] FALSE attr(,class) [1] ns basis matrix -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street

[R] adding a frequency variable to a data frame

2014-04-11 Thread Michael Friendly
to create a new variable, family.size, where all the Breens have 9, the Donners, 14, and so on... -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street

Re: [R] adding a frequency variable to a data frame

2014-04-11 Thread Michael Friendly
Bingo! That's exactly the idiom I was looking for. Thanks, Andrija. -Michael On 4/11/2014 4:57 PM, Andrija Djurovic wrote: another: ave(as.numeric(Donner$family), Donner$family, FUN=length) -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair

Re: [R] Sweave files into LaTex

2014-04-05 Thread Michael Friendly
(ggplot2) data(diamonds) head(diamonds) @ 2) Then, in the master.tex file add the following line: \include{Rcode.Rnw} But of course, that didn't work.Any help would be much appreciated. Best, Axel. [[alternative HTML version deleted]] -- Michael Friendly Email: friendly AT yorku

[R] ggplot: add points selectively to curves

2014-04-02 Thread Michael Friendly
to geom_point(), with Level indexed by Improved, or some such. How can I do this? -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http

Re: [R] ggplot: add points selectively to curves

2014-04-02 Thread Michael Friendly
) + geom_point(color=black, size=1.5) + facet_grid(Sex ~ Treatment, labeller = function(x, y) sprintf(%s = %s, x, y) ) Dennis On Wed, Apr 2, 2014 at 7:43 AM, Michael Friendly frien...@yorku.ca wrote: I'm working on an example of plotting predicted probabilities

[R] bi-monthly time series

2014-02-20 Thread Michael Friendly
names(vect) - seq(as.Date('2005/01/01'),as.Date('2013/01/01'),by=14) but that's awkward to work with. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street

Re: [R] association of multiple variables

2014-02-19 Thread Michael Friendly
, i.e. to have a matrix of statistics and/or p-values as an output. Many thanks! Zdenek - - Zdenlk Skala INCOMA GfK [[alternative HTML version deleted]] -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University

[R] fitting structured conditional (subset) models with loglm

2014-02-10 Thread Michael Friendly
secondary high 15-24 4.639061 0.08066111 0.09354563 25-39 10.441996 0.96287690 0.48273162 40-12.680802 6.71016542 3.58752829 -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249

Re: [R] fitting structured conditional (subset) models with loglm

2014-02-10 Thread Michael Friendly
) loglm(Freq ~ memory + attitude, data=x) )) -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http://www.datavis.ca Toronto, ONT

[R] parallel coordinate plot showing density of curves

2014-02-03 Thread Michael Friendly
) ) ) -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA

[R] keep track of variables created in each chapter of a knitr book

2014-01-24 Thread Michael Friendly
, quietly = TRUE, warn.conflicts = FALSE) @ content ... cleanup2,results='hide'= remove(list=objects(pattern=array|mat|my|\\.tab|\\.df)) remove(list=c(A, B, age, count, ds, n, passed, sex, tab, tv.data, TV2, TV)) ls() @ -- Michael Friendly Email: friendly AT yorku DOT ca Professor

[R] recoding table dimensions interactively

2014-01-09 Thread Michael Friendly
353 120 138 53 22 Rejected:Female 19 8 391 244 299 317 Rejected:Male 313 207 205 279 138 351 But maybe there is a simpler, more elegant and general way to do this. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York

Re: [R] recoding table dimensions interactively

2014-01-09 Thread Michael Friendly
0 0 0 0 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Friendly Sent: Thursday, January 09, 2014 7:14 AM To: R-help Subject: [R] recoding table dimensions

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-05 Thread Michael Friendly
(25, 60, by = 5) mod - lm(lodds ~ poly(age,2)) lines(fitted(mod), col = red, lwd=2) Tests of the coefficients in mod give the tests of linear and quadratic changes in the odds ratio with age. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative

[R] robust definition of \code{} for a knitr-produced document

2014-01-03 Thread Michael Friendly
~ (A + B)^2} \item Underscored names-- code: \code{str_length()}; verb: \verb|str_length()|; url: \url{str_length()} \item \$ names-- code: \code{Arthritis$sex}; verb: \verb|Arthritis$sex|; url: \url{Arthritis$sex} \end{itemize} \end{document} --- end code-test.tex -- Michael

[R] format a matrix as fractions?

2013-12-31 Thread Michael Friendly
0.167 0.111 should print as 1 1/2 1/3 1/21/4 1/6 1/31/6 1/9 TIA -Michael -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736

Re: [R] Categorial data analysis

2013-12-26 Thread Michael Friendly
-- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele StreetWeb: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA

  1   2   3   4   5   >