Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Ken-JP
-exported code. Thx! - Ken Rolf Turner-3 wrote: > > > On 7/04/2009, at 3:34 PM, Ken-JP wrote: > > > >> Using NAMESPACE, I was able to hide my globals behind a >> "." (eg .myGlobal >> <<- 72) and use exportPattern("^[^\\.]*"

Re: [R] parse_Rd() Version 2 on Japanese Vista 32 (encoding problems)

2009-04-07 Thread Ken-JP
as passing R CMD Check. - Ken -- View this message in context: http://www.nabble.com/parse_Rd%28%29-Version-2-on-Japanese-Vista-32-%28encoding-problems%29-tp22922309p22926641.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-p

[R] rnorm() converted to daily

2009-04-17 Thread Ken-JP
yearly 8% drift, 25% sd why are x and y so different (x and z look ok)? Does this have something to do with biases due to the relationship between population and sample-estimates as a function of n samples and sd? Or am I doing something wrong?

Re: [R] rnorm() converted to daily

2009-04-17 Thread Ken-JP
I think I got it... I assumed that n=10 would be big enough to give me a sample mean which converges on the population mean, but this was a bad assumption. Using sigma / sqrt(n) for the standard error of the sample mean, I get... - se.x.m

Re: [R] rnorm() converted to daily

2009-04-17 Thread Ken-JP
Hi Karl, Your comment is very interesting. Do you mean I should favor: rnorm(n, 0, 1) * b + a over rnorm(n, a, b) ? What is the proper/safe way to use rnorm()? FWIW, set.seed( 1 ); yy <- mean( rnorm( 10 ) * (0.25/sqrt(252

Re: [R] Tinn-R (Version 2.2.0.2) dose not support R 2.9.0 very well

2009-04-17 Thread Ken-JP
Hi, I used Tinn-R for a long time, but had real headaches on Vista (commands not being sent, etc...) that were not resolved since R 2.8 or so. Since then, I have switched to Eclipse/StatET. The setup requires more effort, but it is much easier to manage your own packages. With the Eclipse IDE

[R] Need Help with R.oo and "multiple inheritance"

2009-04-17 Thread Ken-JP
ay of multiply inheriting like this, so if someone else reads my code, the concept of HasPersistence is more obvious? In other words, could I actually have a HasPersistence class and have C inherit from A and implement HasPersistence also? - Ken -- View this message in context: http://www.nabbl

[R] n-dimensional vector operations

2009-04-20 Thread Ken-JP
Let's start with a concrete case of n=3 dimensions. Along dimension x, I have a matrix of 5 vectors (each with ten rows) Along dimension y, I have a matrix of 3 vectors (each with ten rows) Along dimension z, I have a matrix of 2 vectors (each with ten rows) I am trying to write a: function(..

Re: [R] n-dimensional vector operations

2009-04-20 Thread Ken-JP
ave 7 matrices. 2. I hate to do it, but memory usage can blow up really fast, so it looks like I need to do some nested looping to get the job done - maybe I can change these to xapply() later. - Ken -- View this message in context: http://www.nabble.com/n-dimensional-vector-opera

[R] How to get rid of loop?

2009-04-24 Thread Ken-JP
y doable without looping. # # How do I do 3.-5. without looping? The problem is, I need to run this algorithm over gigs of data, so I # need to avoid looping, if at all possible... # # - Ken -- View this message in context: http://www.nabble.com/How-to-get-rid-of-loop--tp23226779p23226779.htm

Re: [R] Out of memory issue

2009-04-24 Thread Ken-JP
untu (8GB on my machine). - Ken Neotropical bat risk assessments wrote: > > Hi all, > > I am trying to run some plots on data, but when loading he CSV data > file R is stopping and I am getting an out of memory error. > > Anyway to tweak this somehow to get it to run? >

Re: [R] How to get rid of loop?

2009-04-26 Thread Ken-JP
The code below shows what I'm trying to get rid of. If there is no way to get rid of the loop, I will try to use package( inline ). I'm just curious as to whether there is a "vector way" of doing this algorithm. # -

Re: [R] How to get rid of loop? [SOLVED]

2009-04-27 Thread Ken-JP
Thanks, Uwe, Peter, and Ray, for taking the time to look into this. Just to wrap up this thread, and so that others may benefit, I tried writing both a R code version and an inline C version. Tested on a 8GB Ubuntu 64amd box, R 2.81, the speed difference was: 104secs vs 0.534secs, or the C versi

[R] term.formula error when updating an nls object

2010-01-27 Thread Ken Knoblauch
onInfo() R version 2.10.1 Patched (2010-01-25 r51051) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base Thanks, in advance, for any help. Ken -- Ken Knoblauch Ins

Re: [R] term.formula error when updating an nls object

2010-01-27 Thread Ken Knoblauch
Thanks, I hadn't thought of that. It works fine, now. I'll look out for that in the future. Ken Quoting Peter Ehlers : Ken, You just need to wrap the rhs of your formula in I() to get around update()'s parsing of terms. m2 <- update(m1, . ~ I(Rm * Contra

Re: [R] color blending and transparency

2010-02-03 Thread Ken Knoblauch
and in R, it is some uncalibrated combination of frame buffer values that is being used. > Best, > > baptiste > Ken -- 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)

Re: [R] Fast way to determine number of lines in a file

2010-02-08 Thread Ken Knoblauch
Hadley Wickham rice.edu> writes: > > Hi all, > > Is there a fast way to determine the number of lines in a file? I'm > looking for something like count.lines analogous to count.fields. > > Hadley How about something like

Re: [R] Error with RMySQL

2021-10-28 Thread Ken Peng
It seems like mysql server doesn't open the right authentication for your access, such as user or host permissions. Thanks. On Thu, Oct 28, 2021 at 1:42 PM Ashim Kapoor wrote: > Dear R - users, > > I have 2 databases on a MySQL server. I am able to access the old one > but not the freshly creat

[R] generate random numeric

2021-10-28 Thread Ken Peng
I saw runif(1) can generate a random num, is this the true random? > runif(1) [1] 0.8945383 What's the other better method? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see h

Re: [R] generate random numeric

2021-10-29 Thread Ken Peng
That's all right. Thanks. On Sat, Oct 30, 2021 at 12:29 AM Marc Schwartz wrote: > Ken Peng wrote on 10/29/21 2:39 AM: > > I saw runif(1) can generate a random num, is this the true random? > > > >> runif(1) > > [1] 0.8945383 > > > > What's

[R] startup loading issue

2022-10-25 Thread ken eagle
happens upon starting R. I’ve also created a new .Rprofile that successfully executes but does not prevent the load problem unless the .Rprofile includes a quit() command. Any suggestions? Ken [[alternative HTML version deleted]] __ R-help@r

Re: [R] MLE Estimation of Gamma Distribution Parameters for data with 'zeros'

2023-01-19 Thread Ken Kleinman
There's at least one package that can do zero-inflated gamma regression (Rfast2::zigamma). I'm not sure it's ML, though. On Thu, Jan 19, 2023 at 10:17 AM Jeff Newmiller wrote: > Beware of adding a constant... the magnitude of the constant used can have > an outsized impact on the answer obtain

Re: [R] import function without overwriting function with the same name

2013-08-03 Thread Ken Knoblauch
Martin Batholdy googlemail.com> writes: > I have to import multiple R-files. > Each file consists of several functions with the same function name across the R-files. > When I import all files one by one (with source()) I overwrite the function definition of the previous file > until only the ve

[R] Wrong bin count number with hist() ?

2013-01-13 Thread ken . mailinglist
ght gray",main="wrong - hist()") truehist(c(1:15,B,50),breaks=c(0,15,A,50),main="correct - truehist()") # I was not able to find an explanation online or in the R documentation.  # The option "include.lowest" doesn't help in such cases. # Any

Re: [R] how to suppress the intercept in an lm()-like formula method?

2013-01-29 Thread Ken Knoblauch
; method fails when called > > normally, but works if I explicitly use -1 in the formula. I could hack > > the result of model.matrix(), > > but maybe there's an easier way? Have a look at the polr function in MASS where this same problem is handled, I think, around lines 1

[R] R intermittently crashes across cluster

2013-02-07 Thread Ken Weiss
as to what might be going on? I have run this code successfully many times when I do not use the loop. I have a lot of data to process and recreating the cluster every time that I want to run my function is a waste of time. Thanx, Ken "For I know the plans I have for you," declares

Re: [R] plotting CIE chromaticity diagram?

2013-03-18 Thread Ken Knoblauch
ishi soichi gmail.com> writes: > Has anyone plotted or is it possible to plot > > CIE *xy* chromaticity diagram > > http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg > > I need this plot in color. > > ishida > I think that plotting the spectral locus and the line of purples is trivial,

Re: [R] plotting CIE chromaticity diagram?

2013-03-18 Thread Ken Knoblauch
ishi soichi gmail.com> writes: > Has anyone plotted or is it possible to plot > > CIE *xy* chromaticity diagram > > http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg > > I need this plot in color. > > ishida And following up on my previous mail (diatribe), after having contemplated th

Re: [R] plotting CIE chromaticity diagram?

2013-03-18 Thread Ken Knoblauch
an interpolation algorithm, to reproduce what is on the wikipedia page. Of course, I'm kicking myself for encouraging this be done given the opportunity it provides for misguidance and misrepresentation. Ken Quoting Bryan Hanson : I am, unfortunately, well-aware of the limitations tha

[R] Using Rscript in version 3.0.0

2013-05-06 Thread Ken Weiss
Greetings, I have just installed version 3.0.0. I am trying to use code that I have used numerous times in previous versions of R. My code executes correctly until I try to call makePSOCKcluster. I issue the following command and get the following error: > cluster <- makePSOCKcluster(nodes, p

Re: [R] measuring distances between colours?

2013-05-30 Thread Ken Knoblauch
so should be better at finding the nearest color, I would think. Untried though. Don't forget that these are based on a standard color calibration, sRGB, I think in the case of R and your display may or may not be close to that, so expect some error from that as well. best, Ken >

Re: [R] measuring distances between colours?

2013-06-01 Thread Ken Knoblauch
Hi John, Out of curiosity and if it is not much trouble, I would be curious if Luv worked any better than Lab. I think that Luv is supposed to be preferred for monitors and Lab for surfaces but they are generally pretty similar. Best, Ken Sent from my iPhone ___ Ken Knoblauch Inserm U846

Re: [R] measuring distances between colours?

2013-06-01 Thread Ken Knoblauch
I'd have to look it up and I'm not home at the moment. Can see later on. I would have thought that it would be normalized to have a jnd equal to 1 but I'm not sure. Ken Sent from my iPhone ___ Ken Knoblauch Inserm U846 Stem-Cell and Brain Research Institute 18 av du Doyen Lé

Re: [R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Ken Knonlauch
Z are tristimulus values and xyY are chromaticity coordinated and the luminance which is the Y tristimulus value for the CIE 1931 standard observer. Ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Ken Knoblauch
uot;XYZ", to = "sRGB") [,1] [,2] [,3] [1,]1 11 Quoting Bryan Hanson : Ken, I followed your suggestion and perhaps I don't understand what to expect from convertColor or maybe I'm not using it correctly. Consider the following tests: D65 <- c(0.3127,

Re: [R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Ken Knoblauch
If they sum to 1 then they are one and the same. Look at how chromaticity coordinates are defined in terms of the tristimulus values. Quoting Bryan Hanson : Thank you Ken. 90% of my problem was missing the factor of 100. I was just inputing xyY as a test, I wasn't sure whether the

Re: [R] blank plot----how do I make symbols appear

2012-09-28 Thread Ken Knoblauch
Jessica da Silva gmail.com> writes: > I am trying to create a scatterplot, coding each point to one of 5 > populations. I was successful when I did this for one set of data, yet > when I try plotting other data a blank plot appears (although the axes are > labelled and I can fit the regression

Re: [R] Calculating the mean in one column with empty cells

2012-10-05 Thread Ken Takagi
blank cells with NA before importing. If you try to import an data frame with empty cells, you usually get an error using read.table(). But since you seem to have already got you data into R, that may not be the problem. HTH, Ken __ R-help@r-project.o

Re: [R] history and readline, Mac OSX

2012-10-17 Thread Ken Knoblauch
vice? Try looking at http://R.research.att.com/libs/ > > TIA -- Christian > -- 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: +33 (0)4 72 91 34 61 portable: +33

Re: [R] Generate Binary Matrix

2014-04-09 Thread ken knoblauch
t; > table(rowSums(dimMat)) Wht don't you sample from the distribution of row sums for each row and then distribute that many 1's randomly among the columns. Ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] outer() problem

2014-05-01 Thread Ken Knoblauch
Marc Girondot yahoo.fr> writes: > > outer(0:1, 0:1, FUN=function(x, y) {1}) > Erreur dans outer(0:1, 0:1, FUN = function(x, y) { : >dims [produit 4] ne correspond pas à la longueur de l'objet [1] Because whatever the dimensions of your 2 input vectors, this function simply returns the value

Re: [R] [lattice] how to label panels with variable value (not name)?

2012-11-18 Thread Ken Knoblauch
lattice with the _value_ of the level (an > atmospheric pressure), rather than the name or index of the level. > How to do that? > > TIA, Tom Roche pobox.com> maybe, see ?strip.custom in lattice -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integ

Re: [R] [lattice] how to label panels with variable value (not name)?

2012-11-18 Thread Ken Knoblauch
list. I think by selecting the one with which.panel, it may have been looking for the second one in the vector, but each time the vector was of length 1. Just idle speculation though... Ken Quoting Bert Gunter : Ken: I would have thought so, too. However: x <- 1:10; y <- runif(1:10)

Re: [R] How do I perform conditional annotation of lattice panel plots?

2014-01-07 Thread Ken Knoblauch
Chen, George roswellpark.org> writes: > My apologies for asking this question that may have been asked before. I am trying to plot activity > dependent on time conditioned by the subject. Code for sample data below. > So I have something like this > xyplot(Activity~Time|Subject). > This works fi

[R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Hi, I'm looking for an R function/package that will let me solve problems of the type: 13 = 2^x + 3^x. The answer to this example is x = 2, but I'm looking for solutions when x isn't so easily determined. Looking around, it seems that there is no algebraic solution for x, unless I'm mistaken. Do

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Thanks! That's just what I needed. __ 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, reproducibl

Re: [R] speeding up

2013-10-21 Thread Ken Knoblauch
Bos, Roger rothschild.com> writes: > I am using a sum of squared differences in the objective function of an optimization problem I am doing and I > have managed to speed it up using the outer function versus the nested for loops, but my suspicion is that > the calculation could be done even q

Re: [R] speeding up

2013-10-21 Thread Ken Knoblauch
Ken Knoblauch inserm.fr> writes: > > Bos, Roger rothschild.com> writes: > > I am using a sum of squared differences in the > objective function of an optimization problem I am > doing and I > > have managed to speed it up using the > outer function ve

Re: [R] colour code areas of a plot

2013-10-22 Thread Ken Knoblauch
Martin Batholdy googlemail.com> writes: > I would like to colour different areas of a plot. > But I don't know how to do this efficiently. > > here an example: > (t = time) > > t <- 1:100 > bg_colors <- c(rep('green',20), rep('yellow',10), rep('green',20), rep('red',5), > rep('yellow',45)) >

Re: [R] Select fixed number of elements

2013-10-30 Thread Ken Knoblauch
Alaios yahoo.com> writes: > I have in my code some vectors that are not of equal size. I would like to be able for each of these vectors > select 6 elements that are (almost) equally spaced. So the first one would be at (or close) to the beginning > the last one at (or close) to the end and the

Re: [R] Adding the complementary log-link to binomial() and make.link()

2013-11-07 Thread Ken Knoblauch
Roland Deutsch tuwien.ac.at> writes: > in my research I frequently work with binomial response models, which > are of course part of the generalized linear models. While I do use > common link functions such as the logit, probit and cloglog, I often > have the need of invoking the lesser-kno

Re: [R] Trimming in R

2010-07-07 Thread Ken Takagi
function in package gdata. The code is > quite similar to yours. > You could also use the substr() function, assuming that you know a priori how many spaces are before and after the text: str = " this is random text" nchar(str) substr(str, 8, 26) # 7 spaces before an

Re: [R] Multiple Ploting Colors

2010-07-12 Thread Ken Takagi
Richardson, Patrick vai.org> writes: > > I'm trying to use multiple plotting colors in my code. My first "ifelse" statement successfully does what I > want. However, now I want anything less than -4.5 to be green and the rest black. I want another "col" > argument but can only use one. How could

Re: [R] How do I move axis labels closer to plot box?

2010-07-12 Thread Ken Takagi
chen jia fisher.osu.edu> writes: > Check out the ?par(). Specifically mgp. 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.ht

Re: [R] Multiple Ploting Colors

2010-07-12 Thread Ken Takagi
Richardson, Patrick vai.org> writes: > > I'm trying to use multiple plotting colors in my code. My first "ifelse" statement successfully does what I > want. However, now I want anything less than -4.5 to be green and the rest black. I want another "col" > argument but can only use one. How could

Re: [R] Several Lattice plots in one Plot

2010-09-30 Thread Ken Knoblauch
s to do this but how about DTA <- cbind(day = dta$day, stack(dta[, -1])) xyplot(values ~ day | ind, DTA, type = "b", layout = c(2, 6)) for which you can add additional annotations as desired. By the way, do you realize that you have repeated column names in your data frame?

[R] Roxygen not truncating files

2010-10-04 Thread Ken Williams
sage{adddots.pr(pr)} \name{adddots.pr} \alias{adddots.pr} \title{adddots.pr} \usage{adddots.pr(pr)} \name{adddots.pr} \alias{adddots.pr} \title{adddots.pr} \usage{adddots.pr(pr)} ... I also get the same behavior for the DESCRIPTION file. Is this a known gotcha that someone's found a work

[R] Globbing inconsistencies, dir() vs. unlink()

2010-10-04 Thread Ken Williams
ot;u0048513/p4/r-packages/IREval/Read-and-delete-me" [4] "u0048513/p4/r-packages/IREval/tests/general.R" > (unlink(Sys.glob("~/p4/r-packages/IREval/Users"), recursive=TRUE)) [1] 0 > dir("~/p4/r-packages/IREval/Users", recu

[R] tools:::fetchRdDB can't allocate memory block?

2010-10-08 Thread Ken Williams
i386, darwin9.8.0 status major 2 minor 11.1 year 2010 month 05 day31 svn rev52157 language R version.string R version 2.11.1 (2010-05-31) Thanks. -Ken __ R-help@r-project.org mailing l

Re: [R] tools:::fetchRdDB can't allocate memory block?

2010-10-08 Thread Ken Williams
On Oct 8, 11:32 am, Prof Brian Ripley wrote: > (1) Package development is an R-devel topic -- please see the posting > guide. I'll repost there, thanks. -Ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] [R-SIG-Mac] Error: package 'pcvsuite' was built before R 2.10.0: please re-install it

2010-11-17 Thread Ken Beath
how I can use the pcvsuite package running on R > 2.12.0 for Mac? > I would suggest going to the page from which you downloaded the software, presumably http://labs.fhcrc.org/pepe/dabs/software.html and click on the contact tab and tell them your problem. Either they will rebuild or suppl

Re: [R] Still confused with lapply

2010-11-19 Thread Ken Knoblauch
eturn(c(v,w)) > } > > # The following for loop works > result<-data.frame() > for (i in 1:length(df1[,1])) { > result<-rbind(result,fcttest(df1[i,1],df1[i,2],df1[i,3])) why bother with lapply when you can just do this with(df1, cbind(df1[[1]] * df1[[2]], df1[[2]] + df1[[3]

Re: [R] Deselect one of the array's matrix

2011-01-06 Thread Ken Knoblauch
> How can I do that? > > I would like to thank you in advance for your help > Best Regards > Alex > > > [[alternative HTML version deleted]] Read section 2.7 of An Introduction to R that comes with the distribution. -- Ken Knoblauch Inserm U846 Stem-cell a

Re: [R] sensitivity logical operators in R

2011-01-23 Thread Ken Knoblauch
ou all! This list is pleasure!!! > > Marc > But, try all.equal(tt, t) [1] TRUE and see the R FAQ 7.31 -- 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: +33 (0

[R] A %nin% operator?

2010-08-05 Thread Ken Williams
ction (x, table) match(x, table, nomatch = 0L) == 0L and then I'm happy again. I wonder, would something like this find a home in core R? Or is that too much syntactic sugar for your taste? -- Ken Williams Sr. Research Scientist Thomson Reuters Phone:

Re: [R] A %nin% operator?

2010-08-05 Thread Ken Williams
Ha! Thanks. I should have a closer look at Hmisc in general. -Ken On 8/5/10 10:25 AM, "David Huffer" wrote: > See Harrell's Hmisc package > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of

Re: [R] A %nin% operator?

2010-08-05 Thread Ken Williams
Yeah, and %w/o% seems to have reinvented setdiff(). =) -Ken On 8/5/10 10:53 AM, "David Winsemius" wrote: > The examples in the help page for "%in%" (shared by "match") has the > definition of a "%w/o%" binary operator. > > "%w/

Re: [R] R package to identify model

2010-09-07 Thread Ken Knoblauch
Peng, C gmail.com> writes: > > > what is ESP package? Thanks. I've heard that It's only available over from a repository accessible through a next-generation wifi system call oui-ja. (Beware humor travels poorly over the internet and across linguistic differences!).

[R] Using plyr and segmented together - output problem

2010-05-12 Thread Ken Minns
I am using the package segmented to fit a simple breakpoint regression to a large number of sets of x,y data. I have used ddply in the package plyr to allow me to run many data sets and gather the results into a data.frame. When I run it I get 3 rows inserted in the output data.frame for each s

Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-06-01 Thread Ken Williams
to a bytecode file). Finally, I do agree with the general tone implied in your post - it is a major major hassle that Apple's overlords control the distribution channel for software on non-jailbroken iDevices. I don't like it at all, for the exact reason that people like you & me &

Re: [R] reading a matlab file

2011-02-18 Thread Ken Knoblauch
in the documentation of the R.matlab package. -- 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: +33 (0)4 72 91 34 61 portable: +33 (0)6 84 10 64 10 http:

Re: [R] how to incorporate prior base probabilities into binomial glmm

2011-02-18 Thread Ken Knoblauch
you describe, the subjects are nested in this, i.e., some had a high effort of 5 and others of 3. Perhaps, the following would work then glmer(y ~ EffortLevel/(effort + costs + scr) + (1 | id), family = binomial) I think that if each observer has a unique id, that the nesting will be automatic for

Re: [R] Efficient way of creating a shifted (lagged) variable?

2011-08-04 Thread Ken H
x,-1) object with one lead. Hope this answers your question, Ken On Thu, Aug 4, 2011 at 4:19 PM, Dimitri Liakhovitski < dimitri.liakhovit...@gmail.com> wrote: > Thanks a lot for the recommendations - some of them I am implementing > already. >

Re: [R] Loop: noob question

2011-08-05 Thread Ken H
ry good. Electronic copies are available. Good luck! Ken On Fri, Aug 5, 2011 at 11:35 AM, UnitRoot wrote: > Hi, > Can someone help me out to create a (for?) loop for the following > procedure: > > x=rnorm(250,0,0.02) > library(timeSeries) > x=timeSeries(x) >

Re: [R] Loop: noob question

2011-08-05 Thread Ken H
R is pretty good if you're into that kind of thing... Did not know about the data manipulation or graphics books, I'll definitely be checking those out. Thanks for the info, Ken On Fri, Aug 5, 2011 at 1:16 PM, Joshua Wiley wrote: > On Fri, Aug 5, 2011 at 9:20 AM, Ken

[R] Clustering Large Applications..sort of

2011-08-10 Thread Ken Hutchison
on for 'Bigkmeans' unless there exists a 'findbigkmeansnumberofclusters' function also. Thank you in advance for your assistance, Ken [[alternative HTML version deleted]] __

Re: [R] Getting bootstrap statistic to work

2011-08-12 Thread Ken Hutchison
ple=sample(data, n.data.to.compute.from,replace=T) ##Insert code here to compute statistic stat.holder[count]=computed.statistic } It may be overtly simplistic, but you may find it helpful. Thanks, Ken On Fri, Aug 12, 2011 at 10:10 AM, Alex Olssen wrote: > Hi R-help, > >

Re: [R] Automating an R function call

2011-08-12 Thread Ken Hutchison
seconds (and don't need to run another process in said console) Ken On Fri, Aug 12, 2011 at 3:41 PM, peter dalgaard wrote: > > On Aug 12, 2011, at 21:26 , Duncan Murdoch wrote: > > > On 12/08/2011 2:03 PM, RobertJK wrote: > >> Any way to run an R functi

[R] require(dataset) for example.

2011-08-19 Thread Ken Hutchison
Thank you, Ken [[alternative HTML version deleted]] __ 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 com

[R] Fwd: help with "by" command

2011-08-24 Thread Ken Hutchison
-- Forwarded message -- From: Ken Hutchison Date: Wed, Aug 24, 2011 at 6:06 PM Subject: Re: [R] help with "by" command To: amalka ?tapply or more specifically ?ave Hope this helps, Ken On Wed, Aug 24, 2011 at 2:51 PM, amalka wrote: > Hello, > > I

[R] Fwd: Importing data from MS EXCEL (.xls) to R XXXX

2011-08-24 Thread Ken Hutchison
-- Forwarded message -- From: Ken Hutchison Date: Wed, Aug 24, 2011 at 6:27 PM Subject: Re: [R] Importing data from MS EXCEL (.xls) to R To: Dan Abner save as csv. ?read.csv Ken On Wed, Aug 24, 2011 at 6:20 PM, Dan Abner wrote: > Hello everyone, > > Wh

Re: [R] Weibull point process

2011-09-14 Thread Ken Hutchison
ogLambda) Point.Process.Counts=rpois(T,Lambda) return(Point.Process.Counts) } I haven't actually tried this code (may contain clerical errors) but I hope it gets you on the right track. Good luck, Ken Hutchison 2011/9/14 Torbjørn Ergon > Dear list, > > I'm looking for a fun

Re: [R] open source editor for r for beginners

2011-09-20 Thread Ken Hutchison
Rstudio and Rcmdr are very popular and for good reason, find a good book while the latter is installing though. IF you are using linux, rkward is fantastic to woRk with. Ken Hutchison On Tue, Sep 20, 2011 at 11:21 AM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: &g

[R] [R-pkgs] new package MPDiR version 0.1-11

2012-08-07 Thread Ken Knoblauch
es several data sets from published psychophysical experiments using detection and rating scale measures for estimating signal detection parameters, psychometric functions, classification images, etc. Best, Ken -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of I

Re: [R] self-starter functions for y = a + b * c^x

2012-08-14 Thread ken knoblauch
this. It was designed to fit gamma functions to the luminance vs frame buffer values measured on CRT screens. But the functional form is similar. > thx > Christof > > best, Ken -- Kenneth Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integrative Neuro

[R] NA handling in tree package

2011-11-19 Thread Ken Hutchison
r and possibly more robust ways to handle NAs within tree objects? Note: I only would like information on tree( ) objects,random forest imputation et cetera are not wanted in this application. Thank you in advance, Ken [[alternative HTML version de

Re: [R] boot.ci: [Error: cannot allocate vector of size 1.5 Gb]

2011-12-20 Thread Ken Hutchison
the maxreps that are right for your machine. Ken Hutchison 2011/12/20 Uwe Ligges > > > On 20.12.2011 06:47, Vikram Bahure wrote: > >> Dear R users, >> >> I am getting following error while using boot.ci. I have int.inc function >> with 2000

Re: [R] R on Android

2012-01-01 Thread Ken Hutchison
you, I'd advise looking for food; else be prepared to name your phone Wilson. Ken Hutchison On Jan 1, 2012, at 11:28 AM, David Winsemius wrote: > > On Jan 1, 2012, at 11:07 AM, David Winsemius wrote: > >> >> On Jan 1, 2012, at 10:05 AM, Federico J. Villatoro w

Re: [R] clear plot linear mixed model

2012-01-02 Thread ken knoblauch
me) and > seperate colors for the measurements (nr). > > How would you do that? > > thx > Christof > see plot.augPred in the nlme package -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integrative Neurosciences 18 avenue du Doyen Lépine

Re: [R] quadratic programming-maximization instead of minization

2012-01-02 Thread Ken Hutchison
I don't have experience with this in R and I'm not sure I understand the question that well but maybe something like nearPD()? Ken Hutchison On Jan 2, 2012, at 6:36 AM, riccardo24 wrote: > Hi, I need to maximize a quadratic function under constraints in R. > For minimization

Re: [R] clear plot linear mixed model

2012-01-05 Thread ken knoblauch
Christof Kluß email.uni-kiel.de> writes: > Am 02-01-2012 10:54, schrieb ken knoblauch: > > Christof Kluß email.uni-kiel.de> writes: > >> lme<- lme(conc ~ name/time - 1, > >> random=conc~time|nr,method="ML",data=measurements) > > see pl

Re: [R] Plotting a polygon with xyplot

2011-10-04 Thread Ken Knoblauch
ot;http://r.789695.n4.nabble.com/file/n3870788/111004_Lode_Outlines.csv";, header = TRUE,sep = ",",) par(mfrow = c(1, 2), pty = "s") plot(z ~ y, Data_poly, type = "l") fh <- with(Data_poly, which(z > 240)) D_poly <- rbind(Data_poly[fh, ], Data_poly[-rev(fh), ]) D_

Re: [R] Permutation or Bootstrap to obtain p-value for one sample

2011-10-08 Thread Ken Hutchison
will let you know) you should be able to make inference from that using parametric methods (once) which will fit the truth a bit better than a t.test. Hope that's helpful, Ken Hutchison On Sat, Oct 8, 2011 at 10:04 AM, francy wrote: > Hi, > > I am having troubl

Re: [R] aov(variable~group*(speed*person)) but How to get 95% confidence intervals ?

2011-10-14 Thread Ken Hutchison
Hey, If I understand correctly, library(gplots) plotmeans(). You might also try TukeyHSD() to see if that gets you where you are trying to go. Good luck! Ken Hutchison On Fri, Oct 14, 2011 at 12:11 PM, Jebb Remelius wrote: > Greetings and gratitude, > > I have 19 person

Re: [R] Party package: varimp(..., conditional=TRUE) error: term 1 would require 9e+12 columns

2011-10-14 Thread Ken Hutchison
rtance for each variable when the others are held out (inferential only) Weak I know, but I hope it helps! Ken Hutchison On Fri, Oct 14, 2011 at 12:06 PM, Jason Roberts wrote: > I would like to build a forest of regression trees to see how well some > covariat

Re: [R] p value in R - beginners question

2011-10-18 Thread Ken Hutchison
data as you saw it: than that's not so exciting after all. Hope that was helpful, Ken Hutchison On Tue, Oct 18, 2011 at 2:35 PM, B77S wrote: > This is just scientific notation, so > 8.15e-01 is the same as: > > 8.15*10^-1 > [1] 0.815 > > > > > > niki wrote:

Re: [R] ar() - AIC and BIC

2011-10-19 Thread Ken Hutchison
gaRds, Ken Hutchison On Wed, Oct 19, 2011 at 7:22 PM, J Toll wrote: > Hi, > > I'm slowly working through Tsay's "Analysis of Financial Time Series" > 3rd ed. I'm trying to replicate Table 2.1 on p.47, which gives PACF, > AIC, and BIC for the mont

Re: [R] palettes for the color-blind

2011-11-03 Thread Ken Knoblauch
ibm.com/dx/proceedings/ pravda/truevis.htm who was (is) quite concerned with this issue, as well, as the excellent article by Zeileis, Hornik and Murrell http://statmath.wu.ac.at/~zeileis/papers/ Zeileis+Hornik+Murrell-2009.pdf HTH, Ken -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research

Re: [R] installing java on ubuntu 11.10 installation

2011-11-09 Thread Ken Hutchison
Which is better is a matter of opinion: Try: sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts if it doesnt work, update/add repos. Also, miss google knows this; lastly: not really a geRmaine topic for the R-list. HTH Ken Hutchison On Wed, Nov 9, 2011 at 4:40 PM, ravi

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

2012-04-05 Thread ken knoblauch
example: > v <- c(1, 2, 3, 4) > mysquare <- function (x) { return (x*x) } > w <- applyfun(v, mysquare, 2) > then w should be c(1, 4, 3, 16) > Michael Bach Hi Michael, v^(2 - seq_along(v) %% 2) [1] 1 4 3 16 Ken -- Ken Knoblauch Inserm U846 Stem-cell and Brain Research

<    1   2   3   >