Re: [R] Presence/ absence data from matrix to single column

2012-10-06 Thread David L Carlson
) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jim Lemon Sent: Saturday, October 06, 2012 7:36 PM

Re: [R] modified Ward method

2012-10-01 Thread David L Carlson
. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of eliza botto Sent: Saturday, September 29, 2012

Re: [R] Drawing asymmetric error bars

2012-09-27 Thread David L Carlson
) arrows(2.5, x2[2], 2.5, c(x2[1], x2[3]), angle=90, length=1/8) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] rows extraction

2012-09-26 Thread David L Carlson
0.41806588 0.40839968 14 PKB123 5 0.16914593 0.17565094 15 PKB22 4 0.13450181 0.14681555 16 PKB23 3 0.05703352 0.04438428 17 PKB32 2 0.07606024 0.07606045 -- David L Carlson Associate Professor of Anthropology Texas AM

Re: [R] specifying arguments in functions and calling functions, within functions

2012-09-26 Thread David L Carlson
0.9370754 Scale(ex, hist) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Sarah

Re: [R] Simple Question About Exporting Back to Excel

2012-09-26 Thread David L Carlson
set before sending it back to Excel: xnew - x[outp$order,] -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] how can I give same name to column and row?

2012-09-19 Thread David L Carlson
) [1] A B C D E y - cor(x) colnames(y) [1] A B C D E -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] plotting points on a map, assigning vectors to values from dataset

2012-09-15 Thread David L Carlson
(as.numeric(map$number)), col=black, bg=bg(as.numeric(map$number)), cex=1.5) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org

Re: [R] plotting points on a map, assigning vectors to values from dataset

2012-09-15 Thread David L Carlson
] On Behalf Of David L Carlson Sent: Saturday, September 15, 2012 1:33 PM To: 'Neele'; r-help@r-project.org Subject: Re: [R] plotting points on a map, assigning vectors to values from dataset You didn't include the data so we can't really test anything, but you can simplify things quite a bit

Re: [R] Plotting US States: Issue with filled colors cycling

2012-09-12 Thread David L Carlson
(resolution=1), there are some gaps in the shared boundaries between a few states. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r

Re: [R] PCA legend outside of PCA plot

2012-09-09 Thread David L Carlson
Try adding the parameter xpd=TRUE to your legend() statement. Without reproducible code it is pretty hard to be sure what the problem is. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] Using predict() After Adding a Factor to a glm.nb() Model

2012-09-08 Thread David L Carlson
- data.frame(py2, p2) plot(count~year, data=data, pch=as.character(site)) x - unstack(py2, py2$year~py2$site) y - unstack(py2, py2$fit~py2$site) matlines(x, y) legend(topright, letters[1:4], col=1:4, lty=1:4) -- David L Carlson Associate Professor

Re: [R] creating a symmetric matrix

2012-09-07 Thread David L Carlson
21 -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Erin Hodgess Sent

Re: [R] Recoding categorical gender variable into numeric factors

2012-09-05 Thread David L Carlson
to a factor just use the command: data$sex - factor(data$sex) By default, R orders the character strings alphabetically before converting to factors so Female becomes 1 and Male becomes 2. -- David L Carlson Associate Professor of Anthropology Texas AM

Re: [R] using sqldf's read.csv.sql to read a file with NA for missing

2012-09-05 Thread David L Carlson
. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of David Reiner Sent: Wednesday, September 05, 2012 4:40 PM To: r

Re: [R] Adding summary title to table

2012-09-04 Thread David L Carlson
69 81 50 -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf

Re: [R] binary data

2012-09-04 Thread David L Carlson
This is a pretty vague question. Ecologists work quite a bit with distance matrices and binary data. You will find some options in packages vegan and ecodist for example. I'm sure there are many others -- David L Carlson Associate Professor

Re: [R] Comparing Von Bertalanffy Growth Curves

2012-09-04 Thread David L Carlson
=LMB)) Error: could not find function vbStarts Now you've left out loading one or more packages with library() commands. I'll stop here. If you want help, provide minimal, self-contained, reproducible code. -- David L Carlson Associate Professor

Re: [R] Histogram to KDE

2012-08-31 Thread David L Carlson
) This will give you a plot of the kde estimate: xkde - density(rep(bins, counts), bw=SJ) plot(xkde) As for the standard error or the confidence interval, you would probably need to use bootstrapping. -- David L Carlson Associate Professor of Anthropology Texas AM

Re: [R] K-Means clustering Algorithm

2012-08-29 Thread David L Carlson
for choosing starting seeds. In R you would have to use or create a function to compute those starting seeds and then pass them to kmeans. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original

Re: [R] ?nchar ?strsplit

2012-08-27 Thread David L Carlson
with it. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Sapana Lohani Sent: Monday, August

Re: [R] error type

2012-08-26 Thread David L Carlson
Look at your plot command. You included type=o twice. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] error type

2012-08-26 Thread David L Carlson
You are still using html - you need to tell hotmail to use plain text only. I can't replicate your error with the following: dados - c(44, 40, 39, 38, 0, 7, 7, 1030, 57, 37, 5146, 40, 41, 4737, 34, 36, 2636, 28, 33, 3738, 26, 28, 2742, 38, 36, 3636, 27, 22, 2853, 43, 33, 40)

Re: [R] Aligning barplot

2012-08-26 Thread David L Carlson
How about this? grps - unique(c(BagA, BagB)) BagA - factor(BagA, levels=grps) BagB - factor(BagB, levels=grps) layout(c(2,1)) barplot(table(BagB)) barplot(table(BagA)) -- David L Carlson Associate Professor of Anthropology Texas AM University

Re: [R] Turning of source echo

2012-08-25 Thread David L Carlson
This is not an RStudio issue. The RConsole echoes commands and then the output. If you want to open a window to display the output of a command, you might look at package tcltk. -- David L Carlson Associate Professor of Anthropology Texas AM University

Re: [R] TukeyHSD output

2012-08-23 Thread David L Carlson
)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jinsong Zhao Sent: Thursday, August 23, 2012 9:40 PM To: r-help@r

Re: [R] Entering a table

2012-08-22 Thread David L Carlson
0 109 108.6701738 1 65 66.2888060 2 22 20.2180858 33 4.1110108 41 0.6269291 -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] Iterative sampling with restrictions

2012-08-22 Thread David L Carlson
-- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Daniel Nordlund Sent: Tuesday, August 21, 2012 2:58 AM To: r-help@r-project.org

Re: [R] Iterative sampling with restrictions

2012-08-22 Thread David L Carlson
/1/3 2/3/1 3/1/2 3/2/1 101010101010 --- David -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of David L Carlson Sent: Wednesday, August 22, 2012 5:11 PM To: 'Daniel Nordlund'; r-help@r-project.org

Re: [R] Beside Barplot

2012-08-20 Thread David L Carlson
)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of darnold Sent: Monday, August 20

Re: [R] Beside Barplot

2012-08-20 Thread David L Carlson
- project.org] On Behalf Of David L Carlson Sent: Monday, August 20, 2012 2:15 PM To: 'darnold'; r-help@r-project.org Subject: Re: [R] Beside Barplot Sure but which way? dput(mydata) structure(list(opinion = structure(c(4L, 5L, 1L, 2L, 3L), .Label = c(50-50 Chance, A good chance, Almost

Re: [R] Plot multiple variables: label points

2012-08-17 Thread David L Carlson
, ...) points(x, y, pch=as.numeric(variable$group))) The first one plots the group instead of a point and the second one plots a symbol for each group. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX

Re: [R] Unequal splits from a column

2012-08-17 Thread David L Carlson
(sapply(tmp2, length)) datnew - data.frame(t(sapply(tmp2, function(x) c(x, rep(0, maxlen-length(x)) datnew X1 X2 X3 X4 1 60 25 15 0 2 90 10 0 0 3 40 35 15 10 4 40 25 25 10 -- David L Carlson Associate Professor of Anthropology Texas AM

Re: [R] prevalence of R in publications and institutions

2012-08-17 Thread David L Carlson
(28 volumes). -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Travis Perry

Re: [R] Column Extraction from matrix

2012-08-16 Thread David L Carlson
You could also use a 3d array instead of a list: m - matrix(1:400, ncol=100, byrow=TRUE) a - array(m, dim=c(2, 2, 100), dimnames=list(row=c(1, 2), col=c(1, 2), tbl=c(paste0(a, 1:100 a[,,1] # First table by index col row 1 2 1 1 201 2 101 301 a[,,a1] # First table by

Re: [R] Apply a function according to factor levels.

2012-08-16 Thread David L Carlson
?tapply -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of li li Sent

Re: [R] question about A2R

2012-08-16 Thread David L Carlson
francoisrom...@free.fr Description: Some functions of Romain Francois collection License: GPL version 2 or newer Depends: R (= 2.1.1), grid URL: http://addictedtor.free.fr/packages Built: R 2.2.1; ; 2006-01-04 23:25:37; unix -- David L Carlson Associate Professor

Re: [R] Reading one column .csv file

2012-08-15 Thread David L Carlson
On the Mac try pipe(pbpaste) instead of clipboard. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] to remove columns and rows

2012-08-14 Thread David L Carlson
, function(x) any(diff(x)))] file2 V6 V8 V9 1 1 1 1 2 1 1 1 3 2 2 2 4 1 1 1 5 0 0 2 6 1 1 0 There is a typo in your message. Columns 1, 2, 3, 4, 5, 7, and 10 have all elements duplicated and 6, 8, and 9 do not. -- David L Carlson Associate

Re: [R] named character question

2012-08-13 Thread David L Carlson
)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Erin Hodgess Sent: Sunday, August 12, 2012 10:34 PM

Re: [R] merge counts from table()

2012-08-13 Thread David L Carlson
4 5 1 2 2 2 1 table(x) + table(y) x 1 2 3 4 5 1 2 2 2 1 -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces

Re: [R] translating HTML character entities to accented characters

2012-08-12 Thread David L Carlson
an all-R solution for this, because the author.csv file is exported from a database that enforces the HTML encoding and the import into R may have to be repeated several times as the database is updated. -Michael On 8/10/2012 12:40 PM, David L Carlson wrote: It's not quite an R solution

Re: [R] Function definition: where is the error in the for loop?

2012-08-11 Thread David L Carlson
There is no command For in R. It is for and R is case sensitive. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] How do I find the apparent magnitude of a galaxy from a FITS file?

2012-08-11 Thread David L Carlson
/). -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of David Winsemius Sent: Friday, August 10, 2012 8:36 PM To: andrej

Re: [R] Trouble with Spatial Data Example Script

2012-08-11 Thread David L Carlson
lattice_0.20-6 Many thanks Lorenzo On Sat, 11 Aug 2012 17:18:43 +0200, David L Carlson dcarl...@tamu.edu wrote: Can you get other plotting commands to work? E.g. plot(1:5, 1:5) -Original Message- From: Lorenzo Isella [mailto:lorenzo.ise

Re: [R] replace funcion

2012-08-11 Thread David L Carlson
Or if you want to use recode (which you forgot to mention is in package car): set.seed(1) df1- c(sample(1:12, 50, replace=TRUE)) # sample data library(car) recode(df1, c(1, 2, 3, 4, 11, 12)='invierno'; 5:10='verano') -- David L Carlson Associate

Re: [R] Fill pattern for Boxplots?

2012-08-10 Thread David L Carlson
stripes to the legend) Original Message-- From: David L Carlson dcarl...@tamu.edu To: meyfa...@uni-potsdam.de, 'John Kane' jrkrid...@inbox.com Date: 09.08.2012 22:10 Subject: Re: [R] Fill pattern for Boxplots? It's not too hard to use rect() to add shading to the boxplots

Re: [R] help error histograma

2012-08-10 Thread David L Carlson
: Re: [R] help error histograma Hello, David L Carlson already suggested to you to check the range of your data. Did you do it? Regards Le 10/08/2012 09:36, aprendiz programa a icrit : Hi, My error isErro em

Re: [R] translating HTML character entities to accented characters

2012-08-10 Thread David L Carlson
. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Michael Friendly Sent: Friday

Re: [R] Density

2012-08-09 Thread David L Carlson
be zero.   We can also check this using the code below.   X - rnorm(100) density(X)- den0 den0 X[1:10] (den0$x)[1:10] (den0$y)[1:10] round(dnorm((den0$x)[1:10]), 6) round(dnorm(X[1:10]), 6)   Thank you. Hannah      2012/8/8 David L Carlson dcarl...@tamu.edu The numbers are there, they just

Re: [R] Fill pattern for Boxplots?

2012-08-09 Thread David L Carlson
, outstat$stats[4,], density=dval, angle=aval)# draw the rectangles You can also play with lty= and lwd= but that will affect the box border as well. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station

Re: [R] help hist some 'x' not counted; maybe 'breaks' do not span range of 'x'

2012-08-09 Thread David L Carlson
Use summary(dados[[1]]). The error message is telling you that the data include values outside the 0 to 20 range you have specified. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] indexing in data frames

2012-08-09 Thread David L Carlson
(rep(G1988, 3), rep(G1989, 2)), d = c(1985, 1982, 1984, 1988, 1980)) ab - merge(a, b) ab - data.frame(ab, diff=ab$year-ab$d) new - split(ab$diff, ab$group) new $G1988 [1] 3 6 4 $G1989 [1] 1 9 -- David L Carlson Associate Professor of Anthropology

Re: [R] indexing in data frames

2012-08-09 Thread David L Carlson
-Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Thursday, August 09, 2012 5:17 PM To: dcarl...@tamu.edu Cc: 'jimi adams'; r-help@r-project.org Subject: Re: [R] indexing in data frames On Aug 9, 2012, at 2:43 PM, David L Carlson wrote: You have not defined

Re: [R] Adjusting coordinates in raster plots

2012-08-08 Thread David L Carlson
Like this? r - raster(ncol=10, nrow=10, xmn=0, ymx=0) values(r) - mat plot(r) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org

Re: [R] Density

2012-08-08 Thread David L Carlson
provides information about what values are returned by the function. str(den0) den0$x den0$y plot(den0$x, den0$y, typ=l) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message

Re: [R] Re-grouping data in R

2012-08-07 Thread David L Carlson
Your first command erases all the data in that column: dat$final_purchase_amount- NA so when you refer to it later, it consists of only NAs. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] issue with nzchar() ?

2012-08-06 Thread David L Carlson
TRUE TRUE TRUE [25] TRUE TRUENA FALSE -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org

Re: [R] test if elements of a character vector contain letters

2012-08-06 Thread David L Carlson
FALSE -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Marc Schwartz Sent

Re: [R] Density plots

2012-08-03 Thread David L Carlson
to exist - sm.densityplot.compare - plus you copy the error message but not your function call. How can we possibly tell you what you did wrong? Is this really function sm.density.compare() in package sm? -- David L Carlson Associate Professor

Re: [R] Multiple Comparisons-Kruskal-Wallis-Test: kruskal{agricolae} and kruskalmc{pgirmess} don't yield the same results although they should do (?)

2012-08-03 Thread David L Carlson
There are no significant differences between the groups, so there is no reason to use a multiple comparison test. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun

Re: [R] Different results between lda(mass) and spss discriminant analysis

2012-08-01 Thread David L Carlson
I don't see anything obviously wrong, but I seem to remember that SPSS uses equal prior probabilities as the default whereas lda() uses the class proportions for the training set. That might explain the difference. -- David L Carlson Associate Professor

Re: [R] sub setting a data frame with binomial responses

2012-08-01 Thread David L Carlson
5 0 5 2 5 3 5 0 0 3 5 1 5 0 5 4 5 3 5 0 0 idx - sapply(mydata[,-1], function(x) all(x %in% c(0, 5))) idx - c(TRUE, !idx) # add TRUE to include the first column mydata[, idx] n x1 1 5 2 2 5 3 3 5 1 4 5 3 -- David L Carlson Associate

Re: [R] distance matrix and hclustering

2012-07-30 Thread David L Carlson
several group sizes to see what makes the most sense for your data. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] How can I use IPF function correctly?

2012-07-30 Thread David L Carlson
(mytable, margins=c(1,2,0,1,3,0,2,3), eps = 1e-04, maxits = 50, showits = TRUE) #no 3 way interaction Where and how should I input/set my target value here? Any sugguestions? or I have to write my own function?   Manythanks,   Mandy   On Fri, Jul 27, 2012 at 5:11 PM, David L Carlson dcarl...@tamu.edu

Re: [R] Appending the column names

2012-07-30 Thread David L Carlson
might find that one of these is what you need. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] Thinning Lattice Plot

2012-07-30 Thread David L Carlson
You might also check ?pdf on your system. On Windows the default is for compression. Your code creates a 186K file although it is slow to load reflecting the overhead from decompressing the file. -- David L Carlson Associate Professor of Anthropology

Re: [R] Nearest Neighbors

2012-07-29 Thread David L Carlson
-- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Petr Savicky Sent: Sunday, July 29, 2012

Re: [R] Reverse order of x-axis

2012-07-29 Thread David L Carlson
) and then specified a log axis would you? Since log(0) is -Inf, that could create problems. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org

Re: [R] puzzling classical Mahalanobis distances from covMcd() {robustbase}

2012-07-28 Thread David L Carlson
includes observations 2, 3, 4, 5, 6, 8, and 10. Given that the raw.center and raw.cov are based on a subset of the original data, the mahalanobis distances will not be the same either. -- David L Carlson Associate Professor of Anthropology Texas AM University

Re: [R] How can I use IPF function correctly?

2012-07-27 Thread David L Carlson
. Note that the number of iterations is 0 because in a 2 way model the values are directly computed. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun

Re: [R] density

2012-07-26 Thread David L Carlson
). Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. New York: Springer. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r

Re: [R] Plotting LDA results

2012-07-26 Thread David L Carlson
between the groups in a plot of the original variables. Time to provide provide commented, minimal, self-contained, reproducible code [including data] as called for at the bottom of your message. -- David L Carlson Associate Professor of Anthropology Texas AM

Re: [R] Query

2012-07-26 Thread David L Carlson
Actually you probably want the full manual. It is here http://cran.r-project.org/doc/manuals/fullrefman.pdf -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r

Re: [R] Counting frequency within each range

2012-07-26 Thread David L Carlson
table(cut(numbers, c(0, 10, 20, 30, . . .), include.lowest=TRUE)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

[R] On Reproducible Code

2012-07-25 Thread David L Carlson
advantage in making the statement more prominent and adding a reproducible example using dput(). -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 __ R-help@r

Re: [R] Simple question on finding duplicates

2012-07-25 Thread David L Carlson
duplicate - ifelse(c(0, a$col[-length(a$col)])==c(a$col), 1, 0) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] Simple question on finding duplicates

2012-07-25 Thread David L Carlson
Minor correction: duplicate - ifelse(c(0, a$col[-length(a$col)])==a$col, 1, 0) --- David -Original Message- From: David L Carlson [mailto:dcarl...@tamu.edu] Sent: Wednesday, July 25, 2012 3:23 PM To: 'Jeff'; 'r-help@r-project.org' Subject: RE: [R] Simple question on finding

Re: [R] Regular Expression

2012-07-24 Thread David L Carlson
) This assumes MONTH and QUARTER are character strings and not dates. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] Nearest Neighbors

2012-07-24 Thread David L Carlson
to the nearest neighbors and a matrix of distances to the nearest neighbors. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r

Re: [R] Create a Pivot

2012-07-24 Thread David L Carlson
? -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of namit Sent: Tuesday, July 24, 2012 12:53 PM To: r-help

Re: [R] Wilcoxon V = 0

2012-07-24 Thread David L Carlson
It all depends on which order you put the values. Try this wilcox.test(x=b$x,y=a$x,paired=TRUE) Either one is an extreme. A non significant value would be in the middle. -- David L Carlson Associate Professor of Anthropology Texas AM University

Re: [R] contingency tables in R

2012-07-23 Thread David L Carlson
be able to accomplish what you want without making separate data.frames. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] EM for missing data

2012-07-23 Thread David L Carlson
. Allison to be useful. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of ya Sent

Re: [R] Excel file Import - to Matrix format

2012-07-23 Thread David L Carlson
and then change fname.csv to clipboard-128 and R will read the data from the Windows clipboard. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r

Re: [R] combined EM dataset for missing data?

2012-07-21 Thread David L Carlson
. See the Official Statistics Survey Methodology Task View: http://cran.r-project.org/web/views/OfficialStatistics.html -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message

Re: [R] Control y axis

2012-07-21 Thread David L Carlson
Using x/yaxp also works: plot(x, y, type =o, xlab=Panelist, ylab=T value, lwd=1.5, xaxp=c(0, 18, 9), yaxp=c(-8, 8, 8), las=1) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] two questions re: the use of lattice

2012-07-21 Thread David L Carlson
Run this before the bwplot() command: z$Method - factor(z$Method, levels = c(BIC, ICL, s_v, Q_v, sig-q, s_lsk, s_lML, s_mlsk, s_mlML, s_la8, s_haar)) I don't have an answer for the 2nd question. Seems like it must be possible. -- David L Carlson

Re: [R] two questions re: the use of lattice

2012-07-21 Thread David L Carlson
Take a look at useOuterStrips() in package latticeExtra. --- David -Original Message- From: David L Carlson [mailto:dcarl...@tamu.edu] Sent: Saturday, July 21, 2012 6:51 PM To: 'jim holtman'; 'Ranjan Maitra' Cc: 'r-help@r-project.org' Subject: RE: [R] two questions re: the use

Re: [R] Crosstab with Average and Count

2012-07-20 Thread David L Carlson
There are lots of possibilities. Here's one using only xtabs(): dframe - na.omit(data.frame(x, y, z)) zsum - xtabs(z~x+y, dframe) zcount - xtabs(~x+y, dframe) zmean - ifelse(is.nan(zsum/zcount), 0, zsum/zcount) -- David L Carlson Associate Professor

Re: [R] function for inverse normal transformation

2012-07-20 Thread David L Carlson
), tmp.qnorm) # compare to scale(tmp) not tmp -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org

Re: [R] 3-d kernel smooth by the kde function

2012-07-19 Thread David L Carlson
/packages/StatDA/vignettes/StatDA.pdf -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf

Re: [R] Line chart with a double matrix

2012-07-19 Thread David L Carlson
() but both plot columns instead of rows so we transpose your data with t() matplot(t(mymatrix[,2:7]), type=l, xaxt=n) axis(1, 1:6, colnames(mymatrix)[-1]) legend(bottomright, legend=mymatrix$Label, lty=1:4, col=1:4) -- David L Carlson Associate Professor

Re: [R] median comparison tests

2012-07-19 Thread David L Carlson
Look at kruskalmc() in package pgirmess. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org

Re: [R] Changing ungrouped cases to grouped cases

2012-07-19 Thread David L Carlson
- dtagroup[order(dtagroup$y, decreasing=TRUE),c(4, 1:3)] -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r

Re: [R] double for cycle

2012-07-18 Thread David L Carlson
1.8280826 [7,] 1.893875 1.8666787 3.2146747 [8,] 3.511522 2.6359504 3.8951935 [9,] 1.905341 1.7157471 1.5695309 [10,] 4.018424 -0.6564554 1.7427306 -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352

Re: [R] Entering Data Files

2012-07-18 Thread David L Carlson
You can do this using only xtabs. Using Rui's data.frame, d: x - xtabs(Count~Live+Age, d) barplot(x, beside=T, legend.text=TRUE, args.legend=list(x=topleft)) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station

Re: [R] box plot and plot whiskers

2012-07-13 Thread David L Carlson
The whiskers will not be symmetrical if 1.5*IQR extends beyond the maximum or minimum values. In that case, the whisker stops at the maximum or minimum. - David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77840-4352

Re: [R] Fitting data and removing outliers

2012-07-13 Thread David L Carlson
. - David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77840-4352 - Original Message - From: Lauren Vogric lvog...@grahamcapital.com To: r-help@r-project.org Sent: Friday, July 13, 2012 1:36:43 PM Subject: [R

Re: [R] Fitting data and removing outliers

2012-07-13 Thread David L Carlson
If not linear, then perhaps nlrob() in package robustbase. - David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77840-4352 - Original Message - From: Stephen Sefick ssef...@gmail.com To: Lauren Vogric lvog

<    3   4   5   6   7   8   9   10   >