Re: [R] Apply function to every 'nth' element of a vector

2012-04-05 Thread ken knoblauch
ken knoblauch inserm.fr> writes: > > Michael Bach gmail.com> writes: > > how do I e.g. square each second element of a > vector with an even > > number of elements? Or more generally to > apply a function to every > > 'nth' element of a vec

Re: [R] Seeking help with LOGIT model

2012-04-12 Thread ken knoblauch
kes with my above implementation? I s it just because, I have too > less number of '0' in my response Variable? > Look at the output of summary, especially the standard errors. You seem to be getting complete separation on X5 and X4 doesn,'t look so hot either. Ken ___

Re: [R] Seeking help with LOGIT model

2012-04-12 Thread Ken Knoblauch
638766 2.141 0.0323 * `X 5`2.134544 2.570756 0.830 0.4064 Good luck. Ken Quoting Christofer Bogaso : Thanks Ken for your reply. No doubt your english is quite tough!! I understand something is not normal with the 5th explanatory variable (se:2872.17069!) However could not unde

Re: [R] Problem Installing R to SuSE 10 via RPM

2012-01-13 Thread Ken Hutchison
convert the deb package to rpm locally to install after downloading the deb, although building from source shouldn't be that challenging unless you have ridiculous Fortran compiler problems like I do with Linux. Hope that helps, Ken On Jan 13, 2012, at 1:13 PM, Marc Schwartz

Re: [R] howto test a package without installation

2012-01-15 Thread Ken Hutchison
install.packages('pathtotargz', repos=FALSE) I believe that will get you going. Hope that's helpful, Ken On Jan 15, 2012, at 8:33 PM, Joshua Wiley wrote: > Hi Jonas, > > Look at Hadley Wickham's devtools package. It is designed with this > sort of thing.

[R] Fwd: Trouble installing packages on R2.14.1

2012-01-15 Thread Ken Hutchison
Begin forwarded message: > From: Ken Hutchison > Date: January 15, 2012 8:54:49 PM EST > To: Ben Bolker > Subject: Re: [R] Trouble installing packages on R2.14.1 > > Check browser proxy settings and run R.exe with the proper flags to use them > from cmd. > Ho

Re: [R] howto test a package without installation

2012-01-15 Thread Ken Hutchison
Did not fully read the without installing it part. Mea Culpa, Ken On Jan 15, 2012, at 8:56 PM, Jeff Newmiller wrote: > I don't believe you can. However, you need not install it into a system-wide > library directory... your personal library (e.g. > /home/jonas/R/x86_6

Re: [R] How to get intersection of multiple vectors?

2012-02-02 Thread ken knoblauch
How can I do then? > > What I know is only for 2 vectors via "intersect" function, but don't know how to deal with multiple vectors. > Reduce(intersect, list(v1 = c("a","b","c","d"), v2 = c("a","b&quo

Re: [R] User defined link function with extra parameters

2012-03-01 Thread ken knoblauch
t; Is there any way to tell glm() to add this > parameter in the estimation or do I have to write my own estimator with > optim()? If the parameter cannot be made into a coefficient of the linear predictor, then I'm afraid that you will have to roll your own. > Thanks, > &g

Re: [R] Replacing cretin value in a file

2012-05-13 Thread Ken Hutchison
Perhaps you are in the first circle of the R Inferno? Ken Hutchison On May 13, 2012, at 9:31 AM, Berend Hasselman wrote: > > On 13-05-2012, at 15:08, Jonsson wrote: > >> Dear All, >> >> I am trying to replace a value of 528.8933 to - in my file >&

[R] Plot timer in a for loop

2008-06-09 Thread Ken Spriggs
Hello, This code works fine but is so fast I can't see anything but the last plot. for (i in nrow(X)){ plot(as.numeric(d[i,])) } I'd like to view a plot every 500 milliseconds, nrow(X) = 400. How? Thanks -- View this message in context: http://www.nabble.com/Plot-timer-in-a-for-loop-

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
e the option of paging back and forth between the plots. > > On Mon, Jun 9, 2008 at 5:02 PM, Ken Spriggs <[EMAIL PROTECTED]> wrote: > >> >> Hello, >> >> This code works fine but is so fast I can't see anything but the last >> plot. >> >

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
So this works... Thanks. My mistake was leaving out seq_len() for (i in seq_len(nrow(Volumes))){ plot(as.numeric(deltas[i,])) Sys.sleep(0.5); } Ken Spriggs wrote: > > I appreciate the response but if this is what you have in mind I didn't > get anything different. &

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
I appreciate the response but if this is what you have in mind I didn't get anything different. Any ideas why? for (i in nrow(Volumes)){ plot(as.numeric(deltas[i,])) Sys.sleep(0.5); } Thanks Jan T. Kim wrote: > > On Mon, Jun 09, 2008 at 02:02:01PM -0700, Ken Spriggs wrote: &

[R] How to extract rows from matrices consistently?

2008-06-12 Thread Feng, Ken
Hi, How do I ensure that I always get a matrix back when I extract rows? The mickey-mouse example doesn't matter much, but if instead of 1:2 or 1, I have a vector which may have 1 or more values, then I'm in trouble. Any way to make this consistently return a matrix? Thx in advan

[R] Convert character string to number

2008-06-20 Thread Ken Liu
Hi, I would like to convert a character vector xxx <- c("1/2", "1/4") to yyy <- c(0.5, 0.25) , but as.numeric didn't work for me. Could anyone give me a hint please? Thanks, Ken __ R-help@r-project.org mailing li

[R] unable to update the matrix values within a function

2008-06-20 Thread Ken Liu
A? How could I fix it? Thanks, Ken __ 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.

Re: [R] grouping values

2008-06-23 Thread Ken Knoblauch
t;[3,] "cc" "C|E" > How about do.call("expand.grid", rep(list(c("u", "l")), 3)) Var1 Var2 Var3 1uuu 2luu 3ulu 4llu 5uul 6lul 7ul

Re: [R] grouping values

2008-06-23 Thread Ken Knoblauch
Ken Knoblauch inserm.fr> writes: > Daren Tan hotmail.com> writes: > > I tried aggregate, apply etc, but can't get the right result. > do.call("expand.grid", rep(list(c("u", "l")), 3)) > Var1 Var2 Var3 > 1uuu > 2l

Re: [R] expand.grid() function

2008-06-23 Thread Ken Knoblauch
Megh Dal yahoo.com> writes: > I have one question on expand.grid() function. > When I write following syntax :expand.grid(c("u", "l"), >c("u", "l"), c("u", "l")) I get following as > desired : > Var1 Var2 Var3 > 1uuu > 2luu > 3ulu > 4llu > 5

Re: [R] building experimental paradigm with R as "Brainard/Pelli PsychToolbox"

2008-07-09 Thread Ken Knoblauch
mple, my own psyphy and MLDS). Ken -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Département Neurosciences Intégratives 18 avenue du Doyen Lépine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 portable: +33 (0)6 84

Re: [R] counting number of "G" in "TCGGGGGACAATCGGTAACCCGTCT"

2008-07-15 Thread Ken Knoblauch
Daren Tan hotmail.com> writes: > Any better solution than this ? > sum(strsplit("TCGACAATCGGTAACCCGTCT", "")[[1]] == "G") Try table(strsplit("TCGACAATCGGTAACCCGTCT", "")) A C G T 5 7 8 5 and get all 4 at once. HTH -- K

Re: [R] Importing an Excel spreadsheet

2008-03-20 Thread ken knoblauch
e-enter the data > (some 98 rows x 26 columns). > Thanks > > Andy read.table deduces that your data set has 34 elements, not 26, according to the error message. Could there be spaces in the column names? ken __ R-help@r-project.org maili

[R] [R-pkgs] new package 'randomLCA'

2008-03-25 Thread Ken Beath
A new package 'randomLCA' is available on CRAN. Its main purpose is to fit latent class models with random effects, such as those used in diagnostic testing. This methodology can also be applied in other areas. It also fits standard latent class and will

[R] operators %/% bug?

2008-03-31 Thread Lo, Ken
to R 2.6.0 running in WinXP (haven't upgraded yet). Best, Ken This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s)

Re: [R] help with R semantics

2008-04-03 Thread Ken Knoblauch
inv <- function(eta) { 1/m + ((m - 1)/m - lambda) * pnorm(eta) } mu.eta <- function(eta) ((m - 1)/m - lambda) * dnorm(eta) valideta <- function(eta) TRUE link <- paste("probit.lambda(", m, ",", lambda, ")", sep = "") str

Re: [R] Conditional ploting with logical vector

2008-04-05 Thread ken knoblauch
,T,F,F,F,T,T,T,F) lv2 <- ifelse(lv, TRUE, NA) text(1:10, (1:10) * lv2, '*', pos = 3) HTH ken __ 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

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-12 Thread Ken Beath
ovariates, which is more than enough for 2 fixed effects, assuming block is the grouping and y the outcome. Ken Best, Federico Calboli [1] So much bog standard that the Zar, IV ed, gives a nice table of how to compute the F-tests correctly, taking into account that one of the 3 effects

[R] as.character(seq(-.35,.95,.1))

2007-11-20 Thread Ken Fullish
> as.character(seq(-.25,.95,.1)) [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" "0.55" "0.65" "0.75" "0.85" "0.95" > as.character(seq(-.35,.95,.1)) [1] "-0.35" "-0.25" "-0.15" "-0.0499" "0.05" [6] "0.15"

Re: [R] Packages - a great resource, but hard to find theright one.

2007-11-21 Thread Ken Knoblauch
en what about http://finzi.psych.upenn.edu/R/doc/html/packages.html which allows you to go in a little deeper and see the help pages of each function and http://cged.genes.nig.ac.jp/RGM2/index.php HTH ken -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Département Neu

Re: [R] color palette from red to blue passing white

2007-12-04 Thread Ken Knoblauch
in ggplot. > > Hadley > It's a good thought. There is some thought going into standardizing, if you look at http://developer.R-project.org/sRGB-RFC.html and by the way, for a previous post, it's inaccurate to call Lab "perceptual", although many people do. It'

[R] [R-pkgs] New version of MBESS released

2007-12-14 Thread Ken Kelley
1.0.0. Detailed information about MBESS is available in the current issue of Behavior Research Methods (http://www.psychonomic.org/BRMIC/contents.htm) as well as Journal of Statistical Software (http://www.jstatsoft.org/v20/i08). Take care, Ken -- Ken Kelley, Ph.D. Indiana University Inquiry

[R] Extending data.frame

2007-12-17 Thread Ken Williams
nyone offer any advice? I'm open to using a different OO system if that's deemed advisable, I'm not very familiar with any of them. Note that in my real (non-toy) application, I'll need arbitrary methods to be able to read & write data to the object, so simple getField(

Re: [R] The R book

2008-01-14 Thread Ken Spriggs
I just looked at "The R Book" book for the first time and am wondering where the code and errata is on the internet. I've found the code for the examples for Crawley's other book "Statistics: An Introduction using R". Is the example code for the new book not available? Anyone know? Tom Back

Re: [R] Some simple questions about neural networks

2008-01-14 Thread Ken Spriggs
Have you ever gotten any response from this post? I have similar questions regarding the AMORE package. Efferz wrote: > > Hi, > > > > I have some "simple" questions and annotations about neural networks: > > > > 1) Which R-package (or which software) would you use to train and valid

Re: [R] using complete.cases() with nested factors

2008-09-04 Thread Ken Knoblauch
Andrew Barr gmail.com> writes: > This maybe a newbie question. I have a dataframe that looks like the sample > at the bottom of the email. I have monthly precipitation data from several > sites over several years. For each site, I need to extract years that have > a complete series of 12 mon

[R] Simulating random draws

2008-10-01 Thread Ken Williams
late.unknowns <- function(pr, probs, expr, trials=1000, labels=colnames(probs)) { isNA <- is.na(pr$label) replicate(trials, { pr$label[isNA] <- runif(sum(isNA)) < probs[isNA] expr(pr) }) } Thanks. -- Ken Williams Research Scientist The

[R] Question about quantile.default

2008-10-03 Thread Lo, Ken
would be much appreciated. Best, Ken Lo __ 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.

[R] Question about quantile.default

2008-10-03 Thread Lo, Ken
would be much appreciated. Best, Ken Lo __ 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.

Re: [R] Fw: It 's correct to do contrasts for a GLM?

2008-10-23 Thread Ken Knoblauch
is not incorrect to use them in GLM? there is a way to do > contrasts between treatments for GLM as a Tukey for the ANOVA? > > Susana see https://stat.ethz.ch/pipermail/r-help/2003-November/041559.html -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Département Neuros

Re: [R] Fw: It 's correct to do contrasts for a GLM?

2008-10-23 Thread Ken Knoblauch
Ken Knoblauch inserm.fr> writes: > > Susana Zuloaga hotmail.com> writes: > > > > > Hi all > > > > I am one recent user of R and have a few doubts > > I did a binomial GLM with 3 - factor and now I have to test contrasts to > > iden

[R] NetCDF within R: installation assistance

2008-12-23 Thread Ken Schmidt
sr/local/lib64/R/library/ncdf/libs/*': No such file or directory ERROR: compilation failed for package 'ncdf' ** Removing '/usr/local/lib64/R/library/ncdf' Thanks in advance, Ken Schmidt National Climatic Data Center Asheville, NC 28801 ___

[R] coercing a list into matrix

2009-01-14 Thread Lo, Ken
2,3),c(6,5)) I'd like to get A so that it is 3 2 3 6 5 NA Best, Ken __ 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 c

Re: [R] Predictions with GAM

2009-01-16 Thread Ken Knoblauch
and the by term, something like model.matrix(~ day:mapID - 1, data = mergeday) in your case. I added the appropriate columns into my data frame and also to the newdata for predict. You can see an example in the appendix of http://www.journalofvision.org/8/16/10/ HTH, Ken -- Ken

Re: [R] Predictions with GAM

2009-01-16 Thread Ken Knoblauch
Ken Knoblauch inserm.fr> writes: > Robbert Langenberg gmail.com> writes: > > I am trying to get a prediction of my GAM on a response type. So that I > > eventually get plots with the correct values on my ylab. > > The problem I am encountering now is that I cannot seem

Re: [R] glm binomial loglog (NOT cloglog) link

2009-01-23 Thread Ken Knoblauch
te a user-specified link and the source of the make.link function can be useful to. Ken -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Département Neurosciences Intégratives 18 avenue du Doyen Lépine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 por

Re: [R] R for Computational Neuroscience?

2009-01-25 Thread Ken Knoblauch
nnectivity in neural systems. There are also packages for analysing psychophysical data which are relevant for behavioral neuroscience, psyphy, MLDS, sdtalt, etc. Would there be enough for CRAN TASK VIEW? Ken -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Département Neurosciences

Re: [R] parsing problem

2009-02-02 Thread Ken Knoblauch
olle is being treated as a factor so you are seeing only the codes of the levels. There is probably something more elegant, but you need something like, as.numeric(sapply(with(dd, strsplit(levels(Placebo)[Placebo], "m")), "[[", 1)) -- Ken Knoblauch Inserm U846 Institut Cellul

Re: [R] parsing problem

2009-02-02 Thread Ken Knoblauch
Ken Knoblauch inserm.fr> writes: > > venkata kirankumar gmail.com> writes: > > I am trying to parse a vector for caliculating minimum in that vector the > > vector having values like > > > > 1Kontrolle > > 2 Placebo > >

Re: [R] Matrix package: band matrix

2009-02-20 Thread Ken Knoblauch
8224 . [4,] . . -1.007848357 -0.1117796 -0.5555834 [5,] . . . -0.6816979 -0.6052127 Ken -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integrative Neurosciences 18 avenue du Doyen Lépine 69500 Bron France te

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Ken Knoblauch
eave spaces around the = than it would be for <-. > > the reason being ...? > > vQ > ergonomy! -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integrative Neurosciences 18 avenue du Doyen Lépine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax:

[R] FW: flow control

2009-03-04 Thread Lo, Ken
if (some_condition == T) i <- i + 2; #want to advance the loop by 2 } Whenever the counter goes to the next step, the next item in the original sequence seq(1, some_number, some_increment) replaces the counter value. Is there a way for me to do this? Be

Re: [R] reliability, scale scores in the psych package

2009-03-10 Thread Ken Knoblauch
Doran, Harold air.org> writes: > > Ista > > There are several functions in the MiscPsycho package that can be sued > for classical item analysis. > Since when is classical item analysis a crime? No wonder the USA is considered such a litigious society! Ken -- Ken

[R] Help with R.oo's Rdoc$compile()

2009-03-17 Thread Ken Feng
icult getting a handle of how I should approach documenting a new class. A sample template would help greatly. Thanks in advance for any assistance. Regards, Ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] How to avoid switching on input type?

2009-03-21 Thread Ken-JP
e two functions below depending on the class() of the item passed in, but that feels very unlike R. What is the proper way to write this code so that it works for all input types? Is a switch depending on the input type really necessary? I am hoping the answer is "no".

[R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
require( zoo ) inp <- c( 5, 9, 4, 2, 1 ); m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1))); dim( m ) # [1] 5 1 dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok dim( lag( m, -1 )) # [1] 4 1 - ok dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NULL - converted from zoo matrix to zoo vector

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
Thank you for your reply, but I am still confused. Let me clarify... ...my problem isn't with zoo-ness per se. With zoo objects, there appears to be zoo-matrices and zoo-vectors. My problem is this - I start with a zoo-matrix: > x <- m[1,,drop=FALSE] > x inp 2003-02-01 5 > is.matr

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
message. I really appreciate your response and fix. Thank you. Regards, Ken -- View this message in context: http://www.nabble.com/Problem-with-zoo-and-rbind%28%29-converting-matrix-to-vector-tp22638959p22642095.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Loop with variable index

2008-01-30 Thread Ken Knoblauch
op I want to find the mean and stnd. dev. > of > all 20 values, so I end up with 19 means and stnd. deviations. > How would I construct such a loop? > Thanks. Just for an alternative to some of the sapply solutions, the means can also be obtained with (cumsum(y)/(1:length(y

[R] Uninformative error msgs w/ svm.default - Error in svm.default ... y must be a vector or a factor -

2008-02-05 Thread Ken Termiso
1647 1235 926 694 520 [13] 390 292 219 164 12392695239292216 [25]12 9 7 5 ...however, the error depends on the matrix size -- > rsvm_output <- RSVM(x=svm_num_mat[,5000:6000], y=m.cl.f, ladder=laddy[laddy &g

[R] When I cbind the POSIXct gets lost

2008-02-08 Thread Ken Spriggs
I would like to create a new dataframe from the DateTime column of an existing dataframe and a numeric vector. When I do cbind(x[,1], y) the result is: [1,] 1199370600 12.500 [2,] 1199371200 69.375 [3,] 1199371800 23.750 where the first column you see used to look like: "2008-01-03

Re: [R] When I cbind the POSIXct gets lost

2008-02-09 Thread Ken Spriggs
tttt.1 > 1 2000-01-01 12:00:00 2000-01-01 12:00:00 > 2 2000-02-01 12:00:00 2000-02-01 12:00:00 > 3 2000-03-01 12:00:00 2000-03-01 12:00:00 > > > On Feb 8, 2008 4:59 PM, Ken Spriggs <[EMAIL PROTECTED]> wrote: >> >> I would lik

Re: [R] When I cbind the POSIXct gets lost

2008-02-09 Thread Ken Spriggs
Ok, thanks guys! I see what you're sayin' now Gabor. :) mkeller wrote: > > Ken, > > not sure, but you might try > > data.frame(whatever1=x[,1],whatever2=y) > > this should maintain the classes of the vectors. I'm guessing that y > and x are of

[R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
Hello, I'm trying to do cor(x1,x2) and I get the following error: Error in cor.default(x1, x2) : missing observations in cov/cor A few things: 1. I've used cor() many times and have never encountered this error. 2. length(x1) = length(x2) 3. is.numeric(x1) = is.numeric(x2) = TRUE 4. which(is

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
I get the following > class(x1) [1] "numeric" > class(x2) [1] "numeric" and: > cor(x1,x2) Error in cor.default(x1, x2) : missing observations in cov/cor > traceback() 2: cor.default(x1, x2) 1: cor(x1, x2) Peter Dalgaard wrote: > > Ken Spriggs wrote: &

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
? Perhaps your calling > of the cor function is not calling the cor function in the stats package? > > > > Ken Spriggs wrote: >> Hello, >> >> I'm trying to do cor(x1,x2) and I get the following error: >> Error in cor.default(x1, x2) : missing observati

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
mplete.obs") Does it too. > > - > cuncta stricte discussurus > - > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Ken Spriggs > Gesendet: Wednesday, February 27, 2008 4:34 PM > An: r-help@r-project.org &

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
Thanks. > find("cor") [1] "package:fUtilities" "package:stats" Rolf Turner-3 wrote: > > > On 28/02/2008, at 11:11 AM, Ken Spriggs wrote: > >> >> I get the following >> >>> class(x1) >> [1] "numeric"

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
What happens if you do > > stats::cor(x1,x2) > > ? > > > > Ken Spriggs wrote: >> I get the following: >> >>> cor >> function (x, y = NULL, use = "all.obs", method = c("pearson", >> "kendall", "spearman&q

Re: [R] [OT] "normal" (as in "Guassian")

2008-03-02 Thread Ken Knoblauch
f Bracewell, 1978, The Fourier Transformation and Its Applications, McGraw-Hill. best, Ken __ 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.

[R] how to iterate through a list using ls

2008-11-01 Thread Lo, Ken
heir names in the list instead of the actual string? Thanks a bunch. Ken __ 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 commente

Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Ken Knoblauch
might try the link mafc.logit(m = 2) defined in the psyphy package. Continuing with your example, library(psyphy) fit <- glm(y ~ x, binomial(mafc.logit(2)), control = glm.control(maxit = 100)) # default didn't converge x.ord <- order(x) lines(x[x.ord], fitted(fit)[x.ord], col = &q

Re: [R] boxplot via plot command

2008-12-02 Thread Ken Knoblauch
abel1",100), rep("label2",50), rep("label3",150)) > df <- data.frame(as.factor(l), x) > plot(df) Just to complete my response, the documentation for plot.data.frame indicates For a two-column data frame it plots the second column against the first by the most a

Re: [R] boxplot via plot command

2008-12-02 Thread Ken Knoblauch
Anywhere(plot.data.frame) You'll see that when the data.frame has only 2 columns, it calls plot with the first two arguments. Since the first argument here is a factor, it dispatches to the plot.factor method getAnywhere(plot.factor) from which you'll see that under your circumstances i

Re: [R] nls fits by groups

2007-09-23 Thread Ken Knoblauch
to add a data argument, too, depending on where your data is. HTH, Ken __ 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.

Re: [R] Sweave and ggplot2

2007-09-25 Thread Ken Knoblauch
t; Thanks in advance for any help. This might be a case of FAQ 7.22 since ggplot(2) like lattice depend on grid. I would try wrapping the ggplot commands in a print statement. HTH, ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

[R] help with mclust

2007-10-03 Thread Lo, Ken
1914,0.16 2051,0.00582,-0.019189,-0.009029,0.001875,0.015273,0.175303,-0.092441,-0 .086738,-0.022871,0.027852,-0.108809,0.005938,-0.016543,-0.019288,0.2105 66,-0.022813,-0.001748,-0.108574,0.164971,-0.075186) If anyone could help me out, I would be extremely grateful. Best,

[R] FW: help with mclust

2007-10-03 Thread Lo, Ken
246,0.003906,-0.218613,0.024902,0.020273,0.011914,0.162051,0.00582,-0.019189,-0.009029,0.001875,0.015273,0.175303,-0.092441,-0.086738,-0.022871,0.027852,-0.108809,0.005938,-0.016543,-0.019288,0.210566,-0.022813,-0.001748,-0.108574,0.164971,-0.075186) If anyone could help me out, I would be extremely grateful. B

[R] Sklyar's inline package: how to return a list?

2007-10-04 Thread Feng, Ken
want to return multiple matrix results. Thanks in advance for any code snipplets/advice! Regards, Ken # -- > my.mat [,1] [,2] [,3] [1,] 1.5 4.5 7.5 [2,] 2.5 5.5

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Ken Knoblauch
ts for most measurements, so one day you may be able to > do that in whatever passes for par() by then. > > Duncan Murdoch For anyone interested, there is a larger selection of units online here, as well as other places, http://en.wikipedia.org/wiki/SI_prefix upon seeing which, I wo

Re: [R] Summary vs fivenum results for Q3

2007-10-09 Thread Ken Knoblauch
uses the quantile function and then looking at fivenum to see that it did not. Looking at the help for fivenum led me to boxplot.stats where I was that it w as not necessarily doing the same thing. HTH -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau Dép

[R] Problems with scan() in a tab-sep .txt file with cells that have '///' (three frontslashes)

2007-10-26 Thread Ken Termiso
grateful. I'd prefer not to have to use make.names() to handle the slashes. Thanks in advance for any help, -Ken _ [[replacing trailing spam]] ilnews [[alternative HTML version deleted]] _

[R] question about fitted values from geoR - results 'too good'

2007-11-08 Thread Ken Nussear
spatial=FALSE), td$Crotaphytus) [1] 0.2522837 So I don't get how the spatial model with only a delta AIC of 1 can have a correlation with the dependent variable that is this high. Am I mis-interpreting the values I'm getting from the fitted call, or is something amis. I've tried

Re: [R] Plot segments with different colors

2007-11-13 Thread Ken Knoblauch
for points but if you want to vary the properties of segments of lines, then you need the segments() function. x <- 1:3 y <- c(1, 5, 2) plot(x, y) segments(x[1:2], y[1:2], x[2:3], y[2:3], col = c("blue", "red"), lwd = c(1, 4), lty = 1:2) > > Thanks > > -- best, Ken __ 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.

Re: [R] Quelplot

2011-09-22 Thread Goldberg, Ken [JRDUS]
t may be a few weeks though until I can get started on any of this though, but I will keep you informed. Regards, Ken Kenneth M. Goldberg, Ph.D. Associate Director, Nonclinical Statistics Johnson & Johnson Pharmaceutical Researc

[R] Memory errors using lmer

2012-09-10 Thread McCall, Ken (CMG-Dayton)
help(memory.size) 3: In model.matrix.default(mt, mf, contrasts) : Reached total allocation of 2187Mb: see help(memory.size) 4: In model.matrix.default(mt, mf, contrasts) : Reached total allocation of 2187Mb: see help(memory.size) Thanks in advance, Ken Ken McCall | Database reporter Dayton D

[R] problem with Rcpp and boost threadpool

2015-12-15 Thread Ken Gosier via R-help
I'm having a problem calling a local library through Rcpp with R Studio Server. It's a bit perplexing, since I have no issues when I call it from R at the command line. I've written an analytics library which uses boost's threadpool functionality for running multiple threads. I've stripped eve

[R] Aggregate Help

2010-08-19 Thread Hall, Ken (CDC/OSELS/NCPHI)
would be appreciated. Thanks. Ken Hall Computer Scientist Division of Healthcare Information (DHI) (proposed) Public Health Surveillance Program Office (proposed) Office of Surveillance, Epidemiology, & Laboratory Services (OSELS) (proposed) Centers for Disease Control & Prevention (CDC)

Re: [R] Aggregate Help

2010-08-20 Thread Hall, Ken (CDC/OSELS/NCPHI)
The first one worked great. Thanks for the quick response. The second one, with the "with" statement, gave me the following error: Error in aggregate.date.frame(as,dat.frame(x), ...): arguments must have same length Ken PS. What is the proper etiquette? Should I respond to you indivi

Re: [R] Aggregate Help

2010-08-20 Thread Hall, Ken (CDC/OSELS/NCPHI)
Both of these worked great. Thanks for the quick response. Question: which of the three codes (these two and Phil's) would be preferred from a "performance in R" perspective? They all ran extremely fast. Ken -Original Message- From: Gabor Grothendieck [mailto:ggrothen

Re: [R] Aggregate Help

2010-08-20 Thread Hall, Ken (CDC/OSELS/NCPHI)
was another problem. Now, all suggestions by all three posts to solve this aggregation work perfectly. Thanks to all. Ken -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, August 20, 2010 11:12 AM To: Hall, Ken (CDC/OSELS/NCPHI) Subject: Re: [R] Aggreg

[R] rollmean help (or similar function)

2010-08-20 Thread Hall, Ken (CDC/OSELS/NCPHI)
2006 - 1/9/2006] 1/13/2006 DERM 355 239.7142857 [1/4/2006 - 1/10/2006] Ken Hall Computer Scientist Division of Healthcare Information (DHI) (proposed) Public Health Surveillance Program Office (proposed) Office of Surveillance, Epidemiology, & Laboratory Services (OSELS) (propo

<    1   2   3