search for: huffer

Displaying 20 results from an estimated 20 matches for "huffer".

Did you mean: buffer
2009 Jul 07
6
how to count number of elements in a vector that are not NA ?
Hi, is there a simpler way to count the number of elements in a vector that are not NA than this: countN <- function (v) { return (Reduce(function (x, y) x + y, ifelse(is.na(v), 0, 1))) } ? - Godmar
2009 Jun 30
2
Sweave: multiline Sexpr?
Is there any way to have Sexpr span multiple lines? -- David ? ----------------------------------------------------- David Huffer, Ph.D. Senior Statistician CSOSA/Washington, DC david.huffer at csosa.gov -----------------------------------------------------
2008 Aug 29
1
Most common level of a factor by
I'm looking for something along the lines of which ( table ( x ) == max ( table ( x ) ) ) to find the most common level of one factor by several other factors. For instance, I've got > X <- data.frame ( + x = factor ( sample ( c ( "A" , "B" , "C" , "D" ) , 20 , r = T ) ) + , z1 = factor ( sample ( c ( "Before" ,
2008 Oct 28
1
Repository missing hmisc
I'm trying to install the Hmisc package, however it doesn't appear in the list after "utils:::menuInstallPkgs()". Any help? -- David
2009 Jul 15
1
problem with merging matrices
Dear all, I'm a relative new user of R and I have a problem with merging a collection of matrices. All matrices in this collection have the same dimension (532 rows and 532 columns), but can differ in the row and columns names. I'd like to merge these matrices in such a way that the resulting matrix only contains unique row- and column-names and that in case of a match between the row or
2009 Jul 22
3
time difference
Dear R People: I am looking at the ctime attribute of two different files. It contains the year, month, day, time of creation and time zone. Is there a way to determine the difference between the ctimes of two files, please? I looked in the chron package and nothing seemed to work. Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and
2009 Aug 03
3
if confusion
Simple question: Why doesn't the following work? Or what 'R' rule am I missing? tclass <- "Testing 1 2 3" if(tclass == "Testing 1 2 3") { cat("Testing", tclass, "\n") } else { cat(tclass, "\n") } I get an error 'else' is unexpected. Thank you. Kevin
2009 Jul 20
2
assign question
Dear R People: I have several vectors, sa1, sa2,...sa27 of varying lengths. I want to produce one vector xener[1:27] which has the minimum of each sa[i]. I'm trying to set up a loop and use the assign statement, but here are my results: > for(i in 1:27) { + xener[i] <- min(assign(paste("sa",i,sep=""))) + } Error in assign(paste("sa", i, sep =
2009 Jul 08
2
Formatting a Table
I've created a short program to print a table of learning curve factors. However, I cannot figure out how to format the table to: 1) Get rid of the [1]s in the first column and replace it with the values of N. 2) Line up the first row with the factors (decimal fractions). Thanks for any help. The complete program and output is as follows: > Lc<-seq(0.70,0.95,0.05) #Specify learning
2009 Aug 26
3
changing equal values on matrix by same random number
Dear all, I have about 30,000 matrix (512x512), with values from 1 to N. Each value on a matrix represent a habitat patch on my matrix (i.e. my landscape). Non-habitat are stored as ZERO. No I need to change each 1-to-N values for the same random number. Just supose my matrix is: mymat<-matrix(c(1,1,1,0,0,0,0,0,0,0,0, 0,0,0,0,2,2,2,0,0,0,0, 0,0,0,0,2,2,2,0,0,0,0, 3,3,0,0,0,0,0,0,0,4,4,
2009 Jun 23
4
SAS Macro Variable in R
Hi I'm new to R and would like to implement a SAS-like macro variable in R. What I'd like to do is take the simple R code below and change the "=TEF" to different letters to refer to different companies' data for download. # DOWNLOADS FILES FROM YAHOO INTERNET
2009 Jul 08
3
matching each row
I have two dataframes, the first column of each dataframe is a unique id number (the rest of the columns are data variables). I would like to figure out how many times each id number appears in each dataframe. So far I can use: length( match (dataframeA$unique.id[1], dataframeB$unique.id) ) but this only works on each row of dataframe A one-at-a-time. I would like to do this for all of
2009 May 06
6
by-group processing
Given a dataframe like > data ID Type N 1 45900 A 1 2 45900 B 2 3 45900 C 3 4 45900 D 4 5 45900 E 5 6 45900 F 6 7 45900 I 7 8 49270 A 1 9 49270 B 2 10 49270 E 3 18 46550 A 1 19 46550 B 2 20 46550 C 3 21 46550 D 4 22 46550 E 5 23 46550 F 6 24 46550 I 7 > containing an identifier (ID), a
2003 Jun 25
0
Rcmd SHLIB on Windows
Hi all, I would like to preform an autologistic regression analysis on my thesis data. This is a form of logistic regression that accounts for spatial autocorrelation within and between predictor variables. To this end I have received some script from Dr. Fred Huffer which will allow for the analysis in R. It consists of an R script (autolog.R) that calls a compiled Fortran script (combo.o). I am supposed to use "dyn.load' to load the fortran script. To do this in R I realize that I need to create a dll for combo.o and that this is supposed to be do...
2009 Aug 13
1
Adding logical vectors
When adding several logical vectors I expect each vector will be coerced to integers and these vectors will then be added. That doesn't always seem to be the case. For example: > ( f1 <- as.factor ( sample ( "x" , 25 , rep = T ) ) ) [1] x x x x x x x x x x x x x x x x x x x x x x x x x Levels: x > ( f2 <- as.factor ( sample ( "y" , 25 , rep = T ) ) )
2010 Aug 05
4
A %nin% operator?
Sometimes I write code like this: > qf.a <- subset(qf, pubid %in% c(104, 106, 107, 108)) > qf.b <- subset(qf, !pubid %in% c(104, 106, 107, 108)) and I get a little worried that maybe I've remembered the precedence rules wrong, so I change it to > qf.a <- subset(qf, pubid %in% c(104, 106, 107, 108)) > qf.b <- subset(qf, !(pubid %in% c(104, 106, 107, 108))) and pretty
2010 Nov 20
0
Fwd: Festival of Pacific Arts web cast
...leeming-consulting.com>, alano at sibc.com.sb, andrewlano at gmail.com, Pacific Islands Chapter of the Internet Society Discussion List < picisoc at picisoc.org>, solomon-islands-indigenous-music-foundation at googlegroups.com, wikieducator at googlegroups.com, c.moore at uq.edu.au, Elise Huffer < EliseH at spc.int>, culturetalk at lists.spc.int, tufftumas at hotmail.com, jack-devel at lists.jackaudio.org Hi All, In my Ph D thesis in the Music Department, at the University of Otago I am exploring how traditional ecologically inspired music can be foregrounded in ICT contexts. On...
2009 Jul 09
2
How to Populate List
...  (Whit Armstrong)   43. #INCLUDE (Idgarad)   44. Re: Reading from Google Docs (Duncan Murdoch)   45. Re: #INCLUDE (Godmar Back)   46. Comparing GAMMs (Paul Simonin)   47. Re: Passing arguments to with() (Duncan Murdoch)   48. Re: Formatting a Table (Godmar Back)   49. Re: Formatting a Table (David Huffer)   50. Re: Comparing GAMMs (Gavin Simpson)   51. Randomizing a dataframe (Mark Na)   52. Re: error: no such index at level 2 (David Huffer)   53. Re: error: no such index at level 2 (Godmar Back)   54. Re: Reading from Google Docs (Gabor Grothendieck)   55. Re: Uncorrelated random vectors (Greg Sno...
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...ogram-like plot - multiple bars side by side (J?rg Gro?) 68. x axis label overlap (CLERC Thomas) 69. Re: histogram-like plot - multiple bars side by side (Greg Snow) 70. Re: persistence of model in R to a file (Sharma, Dhruv) 71. quantile (liujb) 72. Re: replicating dataframe rows (David Huffer) 73. Re: quantile (jim holtman) 74. box-whisker plot from pre-summarized data? (Avram Aelony) 75. Re: quantile ( (Ted Harding)) 76. count data with a specific range (sandsky) 77. Re: adding labels to tapply results (Dieter Menne) 78. Re: Hazard plot (Dieter Menne) 79. Re: Double inte...
2008 Jun 17
0
Rpart description of tree groups
I'm making a few functions to generate latex files describing rpart objects that are then \input-ed into a larger document. So far, the functions I have generate paragraphs containing enumerations of the predictors in pruned trees and the number of formed groups. Its easy enough to recover these. For instance, R> print ( tree ) n= 878 node), split, n, loss, yval, (yprob) *