Re: [R] meaning of lm( y~., data=mydat ), is it a language feature, is it documented, is it supported?

2016-05-23 Thread Bert Gunter
It's about formula syntax, so ?formula documents it. Bert On Monday, May 23, 2016, John Sorkin wrote: > > The syntax > mydat <- data.frame( y,x ) > fit1 <- lm( y~., data=mydat ) > appears to perform a multivariable regression of y on every non-y variable > in the data frame mydat. I can not fin

Re: [R] Mixed model analysis

2016-05-24 Thread Bert Gunter
This has nothing to do with R, per se. This is a statistical issue. You need to work with a statistician, as your statistical background is inadequate (google "mixed effects models") if you really need this. Cheers, Bert On Tue, May 24, 2016 at 7:27 PM Neny Sitorus wrote: > Hi, > > what is exac

Re: [R] R help- fit distribution "fitdistr"

2016-05-26 Thread Bert Gunter
__ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and > more, see > 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-conta

Re: [R] colored table

2016-05-28 Thread Bert Gunter
Hi Naresh: I shall be brief, as discussions of what statistical/graphical techniques to use are largely OT. IMO, this is a bad idea. I think the table entries will be very difficult to read and groc. If the tables are unrelated, use 2 tables. If you think they might be related, plot the entries o

Re: [R] email threads chronology

2016-05-30 Thread Bert Gunter
Inline: Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, May 30, 2016 at 5:51 AM, Fowler, Mark wrote: ... "The preceding replies

Re: [R] Fractional Factorial Design on 4-level factor

2016-05-31 Thread Bert Gunter
Inline. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 31, 2016 at 12:05 AM, Michael Haenlein wrote: > Dear

Re: [R] Variable labels and value labels

2016-05-31 Thread Bert Gunter
I am not sure this is relevant or helpful, but see ?abbreviate, which one can use to abbreviate long strings as labels (but only for English-like languages, I believe). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things in

Re: [R] R getting "Killed" while running VAR model

2016-05-31 Thread Bert Gunter
Standard reply (see posting guide): Update to the current version of R (3.3.0 or so) and retry. Your version is old -- this often leads to incompatibilities with newer software versions. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming alon

Re: [R] Regression and Sub-Groups Analysis in Metafor

2016-05-31 Thread Bert Gunter
Briefly, as this is off-topic, and inline: Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 31, 2016 at 11:32 AM, Dan Kolubinski

Re: [R] SEM GFI

2016-05-31 Thread Bert Gunter
Probably impossible to answer without your following the posting guide and posting your code, etc. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Coun

Re: [R] Extract from a text file

2016-05-31 Thread Bert Gunter
On Tue, May 31, 2016 at 7:05 PM, Jeff Newmiller wrote: > You need to go back and study how I made my solution reproducible and make > your problem reproducible. > > You probably also ought to spend some time comparing the regex pattern to > your actual data... the point of this list is to learn

Re: [R] Making an if condition variable ?

2016-06-02 Thread Bert Gunter
d do better in those languages with their paradigms rather than with R's). For example, you could have a single function that returns the conditional function of your choice by calling the overall function with an appropriate keyword. Etc. Cheers, Bert Bert Gunter "The trouble with

Re: [R] Request for help

2016-06-03 Thread Bert Gunter
files from this info automagically. Finally, google! -- there are many other tutorials on this on the web. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Count

Re: [R] sustring in dependence of values

2016-06-03 Thread Bert Gunter
Use regular expressions: ?grep ?regexp (The answer is simple, but I think it is worthwhile to learn about this on your own. Others may disagree and supply you the exact answer). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] what is the code for trend free prewhitening trend analysis

2016-06-04 Thread Bert Gunter
Please refer to the posting guide (below) to learn how to post questions to this list. In particular, we do not generally write your code for you. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." --

Re: [R] String match

2016-06-04 Thread Bert Gunter
lly is) is to use regular expressions: ?regexp ?regexpr Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Jun 4, 2016

Re: [R] detecting if a variable has changed

2016-06-05 Thread Bert Gunter
. Please correct me if so. I realize that it would be straightforward to write such a function, but I just wondered if it already exists. My google & rseek searches did not succeed, but maybe I used the wrong keywords. Cheers, Bert Bert Gunter "The trouble with having an open mind is that pe

Re: [R] detecting if a variable has changed

2016-06-05 Thread Bert Gunter
Nope, Ted. I asked for a O(log(n)) solution, not an O(n) one. I will check out the data.table package, as suggested. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his &qu

Re: [R] detecting if a variable has changed

2016-06-06 Thread Bert Gunter
Oh, good point! I was thinking only of the comparisons to identify the insertion location. --Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic str

Re: [R] find longest consecutive streak in double

2016-06-06 Thread Bert Gunter
Yes, see ?rle, as Jim indicated. Just wanted to add that there is an rpy2 package that enables you to use R within python, which may mean that you do not need to translate your python code. Or at least not all of it. Cheers, Bert Bert Gunter "The trouble with having an open mind is that p

Re: [R] replace NAs in each column of a matrix with 0 or 1 or 2 with specific proportion

2016-06-06 Thread Bert Gunter
Sidenote: When you do imputation in this way all your inference (error estimates, goodness of fit, confidence intervals, etc.) will be wrong and misleading, as you are creating "information" from nothing. If this comment is irrelevant, please ignore. Cheers, Bert Bert Gunter "T

Re: [R] R programmer/developer part time job

2016-06-06 Thread Bert Gunter
This should be posted on the r-sig-jobs email list. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 6, 2016

Re: [R] Power Calculation:2-sided exact equivalence test for Binomial Proportions

2016-06-07 Thread Bert Gunter
Please search before posting, and if your search fails to get what you want, tell us why. I got what appeared to be many relevant hits on rseek.org using the search term "binomial exact power computations" . -- Bert Bert Gunter "The trouble with having an open mind is t

Re: [R] apply and cousins

2016-06-08 Thread Bert Gunter
beware. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jun 8, 2016 at 9:41 AM, John Logsdon wrote: > Folks > > Is

Re: [R] Tree plot with percentages and hierarchies

2016-06-08 Thread Bert Gunter
I am not really sure what you want, but it sounds like you want the "rpart" package (which is part of the standard R distribution). If that won't do, check the machine learning task view here: https://cran.r-project.org/web/views/MachineLearning.html Cheers, Bert Bert Gunter &q

Re: [R] New installation

2016-06-09 Thread Bert Gunter
I suggest that you post to the r-sig-debian list instead of here. I think you are more likely to get good answers to your query there. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley B

Re: [R] summing up and cut off with looping

2016-06-10 Thread Bert Gunter
if I have misunderstood. See also ?subset and ?cumsum . > set.seed(1021) > y <- runif(10) > y [1] 0.36751828 0.08721951 0.08899027 0.38838635 0.1978 0.72948251 [7] 0.36669151 0.28457792 0.90614056 0.31832515 > y[cumsum(y) < 1.2] [1] 0.36751828 0.08721951 0.08899027 0.38838635

Re: [R] itsadug:: plot_smooth and plot_diff

2016-06-12 Thread Bert Gunter
pear to be confused about the statistical issues, I suggest you post on a statistical site like stats.stackexchange.com or consult a local statistician. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -

Re: [R] Help: How to Convert Binary Data into Text Using R

2016-06-12 Thread Bert Gunter
to refine/clarify your query to get what you want. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Jun 11, 2016 at 6:06 PM,

Re: [R] two difficult loop

2016-06-12 Thread Bert Gunter
of your specification is that you need to search for all rows in map data frame that meet the criterion for each row of ref, and without further information, I don't know how to do this without just repeating the search 560 times. Cheers, Bert Bert Gunter "The trouble with having an op

Re: [R] Assign value to plot variable name (make.group functions)

2016-06-13 Thread Bert Gunter
use a panel function that plots the data and adds a panel.text() call to put text in the plot where you want it. If none of these, maybe someone with better understanding than I can help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along an

Re: [R] strange error message when using rnorm and rbinom

2016-06-14 Thread Bert Gunter
e does not need to "declare" R variables. Have you gone through any R tutorials? -- there are many good ones on the web. Please do so if you haven't before posting here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] Excluding coordinates that fall within a circle

2016-06-17 Thread Bert Gunter
statistics and/or ecology packages that do this: search (e.g. web or rseek.org) on "convert distance to latitude and longitude" or similar (this seemed to yield useful results when I tried it). Then apply David's (and Jeff's) suggestions. Cheers, Bert Bert Gunter "The

Re: [R] patterns in numeric vector

2016-06-20 Thread Bert Gunter
Oops -- neglected to cc the list. Also note the correction at the end, changing "starts" to "begins". -- Bert On Mon, Jun 20, 2016 at 2:33 PM, Bert Gunter wrote: Thanks for the reproducible example -- it made your meaning clear. This is the sort of thing for which rle

Re: [R] Data aggregation

2016-06-20 Thread Bert Gunter
might do well to learn it instead or in addition to the *apply type operations of base R. Finally, I should ask: is this homework? This list tries to implement a no homework policy. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and stick

Re: [R] Subscripting problem with is.na()

2016-06-23 Thread Bert Gunter
of the list ( a "column" in the case of a data frame, which is a specific kind of list). The relevant sections of ?Extract are: "Indexing by [ is similar to atomic vectors and selects a **list** of the specified element(s). Both [[ and $ select a **single element of the list**. &quo

Re: [R] Subscripting problem with is.na()

2016-06-23 Thread Bert Gunter
ics in mind, so the problem doesn't arise. But I think one needs to make the distinction and issue clear. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom C

Re: [R] Subscripting problem with is.na()

2016-06-23 Thread Bert Gunter
quot; (for those who belong to this religious persuasion). One should never say never, but I suspect that there are relatively few circumstances where the conversion the OP requested is actually wise. Feel free to ignore/reject such extraneous comments of course. Cheers, Bert Bert Gunter "T

Re: [R] Subscripting problem with is.na()

2016-06-24 Thread Bert Gunter
rouble to me. As always, contrary views welcome. This discussion still seems on (r-help) topic to me, but if not, please say so. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in

Re: [R] Subscripting problem with is.na()

2016-06-24 Thread Bert Gunter
I would tend to agree. But NA is still preferable for both, no? -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jun 24, 2016

Re: [R] How to do it in R

2016-06-24 Thread Bert Gunter
realize that there is a gray area where these things may overlap. Also see inline below. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic stri

Re: [R] Reading csv file with missing value

2016-06-24 Thread Bert Gunter
Read yesterday's and today's archives. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jun 24, 2016 at 1:55 P

Re: [R] Help please with error from nnet::multinom

2016-06-26 Thread Bert Gunter
Well, for one thing, there is no "probs" method for predict.nnet, at least in my version: nnet_7.3-12 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "

Re: [R] Help please with error from nnet::multinom

2016-06-26 Thread Bert Gunter
object of class 'multinom', which is a nnet object ... " ?? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun

Re: [R] Fw: How I can calculate the value of response variable

2016-06-26 Thread Bert Gunter
how it has failed. Cheers, Bert Gunter Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Jun 26, 2016 at 5:22 PM, rezvan hata

Re: [R] performance of do.call("rbind")

2016-06-27 Thread Bert Gunter
might try issuing the call say, 20 times, over 10k disjoint subsets of the list, and then rbinding up the 20 large frames. Again, caveat emptor. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R] > Understanding strip.default & strip.custom

2016-06-27 Thread Bert Gunter
s the **function** being used to draw the strips in each panel. Generally speaking, you should not have to mess with arguments like which.panel and should probably use strip.custom() instead. Do carefully go through the examples in ?strip and ?xyplot. That may help. Cheers, Bert Bert Gunter "T

Re: [R] Calculating Value at Risk

2016-06-28 Thread Bert Gunter
appropriate mailing list, in this case r-sig-finance, rather than here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jun

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread Bert Gunter
I frankly don't know what the heck you are doing but, (inline below) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jun 28,

Re: [R] Can R read Word fonts and comments?

2016-06-28 Thread Bert Gunter
Did you try searching before posting here? -- e.g. a web search or on rseek.org ? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic stri

Re: [R] > Understanding strip.default & strip.custom

2016-06-29 Thread Bert Gunter
Did you mean: strip.custom(factor.levels...) ? (I know of no "panel.custom()" function) -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County"

Re: [R] Understanding and predict round-off errors sign on simple functions

2016-06-29 Thread Bert Gunter
precision and are very complicated to determine So I would say the answer to your questions is no. But you should probably address such a question to a numerical analyst for an authoritative answer. Maybe try stats.stackexchange.com . -- Bert Bert Gunter "The trouble with having an open mind is

Re: [R] linking vignettes in a man page

2016-06-29 Thread Bert Gunter
Please post this on R-package-devel, not here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jun 29, 2016 at 1:49 P

Re: [R] Bestglm subset analysis

2016-06-29 Thread Bert Gunter
om 21 predictors on 79 cases). Failing that, try asking on a statistics site, like stats.stackexchange.com. Note also: This is a plain text list. Please don't post in HTML. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things in

Re: [R] Command to combine means?

2016-06-30 Thread Bert Gunter
... Time to do your homework. Have you gone through any R tutorials? Some recommendations here: https://www.rstudio.com/online-learning/#R Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] Documenting data

2016-06-30 Thread Bert Gunter
In addition to what others have suggested, see ?history. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 30, 2

Re: [R] Documenting data

2016-06-30 Thread Bert Gunter
work best for you. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 30, 2016 at 8:46 AM, Pito Salas wrote: > Than

Re: [R] Documenting data

2016-06-30 Thread Bert Gunter
I believe Georg's pronouncements are wrong. See inline below. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) "... > Wi

Re: [R] Merge several datasets into one

2016-06-30 Thread Bert Gunter
. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 30, 2016 at 12:26 PM, lily li wrote: > Hi R users, > > I&#x

Re: [R] mvpart package

2016-06-30 Thread Bert Gunter
https://cran.r-project.org/web/packages/mvpart/index.html Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 30, 2016

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-01 Thread Bert Gunter
Inline. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jul 1, 2016 at 7:40 AM, Witold E Wolski wrote: > Hi Will

Re: [R] trouble double looping to generate data for a meta-analysis

2016-07-01 Thread Bert Gunter
set.seed(1122) > samps.norm <- matrix(rnorm(1e5),nrow = 100 ) > dim(samps.norm) [1] 100 1000 ## This was instantaneous on my machine. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berk

Re: [R] Can R read Word fonts and comments?

2016-07-01 Thread Bert Gunter
No, sorry -- all I would do is search. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jul 1, 2016 at 2:33 PM, John wrote

Re: [R] Anybody know the cause of this?

2016-07-01 Thread Bert Gunter
I don't have a clue, but I suspect that those who might would be helped by your providing the output of the sessionInfo() command + perhaps other relevant info on your computing environment. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-02 Thread Bert Gunter
gt; length(test) [1] 365 If this can't be done, sorry for the noise. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-03 Thread Bert Gunter
)ex[reqX[i],reqY[i],] ) > dim(out) [1] 365 5 You might find it useful to go through a (web) tutorial or two to learn more about such R functionality. Useful suggestions can be found here: https://www.rstudio.com/online-learning/#R Cheers, Bert Bert Gunter "The trouble with having an o

Re: [R] regroup row names

2016-07-03 Thread Bert Gunter
1) Please do some more tutorials on your own, as these (not regexp's) are fairly basic R features that all users should be aware of. Incidentally, check out the "stringr" package, which is supposed to make string manipulation tasks like this easier (I have not used it though). Chee

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Bert Gunter
you might need rather than what you and your supervisor think you need. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun,

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Bert Gunter
her way. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Jul 3, 2016 at 2:43 PM, Jeff Newmiller wrote: > There ar

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-05 Thread Bert Gunter
It would help to show your error message, n'est-ce pas? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jul

[R] Fwd: Re: lmer causes R session to terminate

2016-07-07 Thread Bert Gunter
I failed to c.c. the list. And it should be r-sig-mixed-models list. Bert -- Forwarded message -- From: "Bert Gunter" Date: Jul 7, 2016 2:06 PM Subject: Re: [R] lmer causes R session to terminate To: "David Kikuchi" Cc: Off the top, I would guess that y

Re: [R] Troubleshooting Type III SS and drop1()

2016-07-16 Thread Bert Gunter
Omg omg! Search on "type III as R good or bad" or similar for why you should of should not be doing this. As for your specific question, I doubt that you'll get a useful reply until you post the code that elicited the error. Maybe not even then if it is due to estimability/overfitting of your data

Re: [R] Reducing execution time

2016-07-27 Thread Bert Gunter
Not entirely sure I understand, but match() is already vectorized, so you should be able to lose the supply(). This would speed things up a lot. Please re-read ?match *carefully* . Bert On Jul 27, 2016 6:15 AM, "sri vathsan" wrote: Hi, I created list of 3 combination numbers (mycombos, around

Re: [R] Fuzzy variable universe

2016-07-28 Thread Bert Gunter
Below. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jul 28, 2016 at 11:11 AM, Arthur Rodrigues Stilben wrote: > Sor

Re: [R] Converting string to data frame

2016-07-28 Thread Bert Gunter
n escape code such as e.g. "\t" for tab). Example: > gsub("[[:blank:]]+","\\|","a b") [1] "a|b" Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] store result of loop in df

2016-07-29 Thread Bert Gunter
bability of success 0.1500 0.28333333 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jul 29, 2016 at 1:52 AM,

Re: [R] metafor estimates using mods and subset do not match

2016-07-29 Thread Bert Gunter
I think you should consult with a local statistician. Generally speaking, statistical questions like this tend to be OT here, and you appear to be sufficiently confused about the statistical issues that online posts would not be sufficient. Cheers, Bert Bert Gunter "The trouble with havi

Re: [R] %in% with matrix of lists

2016-07-30 Thread Bert Gunter
y noticeable difference seems doubtful, however. There may be special packages that do offer a real improvement, so you should search. rseek.org is a good R search engine, although google often does well also. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] %in% with matrix of lists

2016-07-30 Thread Bert Gunter
Below. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Jul 30, 2016 at 11:38 AM, Neal H. Walfield wrote: > On Sat, 30 Jul 2016

Re: [R] Replace any values in a data frame based on another data frame

2016-07-30 Thread Bert Gunter
atching > first <- with(df1,paste0(col1,col2)) > second <- with(df2,paste0(col1,col2)) > > ## now find the rows of the df1 that match those of df2 > wh <-match(first,second) > > ## Use indexing to substitute > df1[!is.na(wh),] <- df2[na.omit(wh),] > > df1 col1 c

Re: [R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Bert Gunter
?/most?) rng's are vectorized, so e.g. > set.seed(1123) > rnorm(10,mean= runif(10,2,3), sd = runif(10,4,6)) [1] 4.369411 1.944876 3.143913 6.489048 -1.093468 1.330675 -3.936239 11.740755 [9] -2.260413 -1.748759 ... if that's what you meant. Cheers, Bert Bert Gunter "Th

Re: [R] It is possible to use "input parameters" with "standard error" in fitting function nls

2016-08-03 Thread Bert Gunter
independently as "input." I urge that you consult a local statistical expert, take a statistics course or two, and/or do some studying before proceeding further. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] It is possible to use "input parameters" with "standard error" in fitting function nls

2016-08-03 Thread Bert Gunter
at you have and what your purpose is. You need to consult with a local statistician for this. And, in any case, statistical questions are generally OT here, and this appears to be a fairly complicated one. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep comin

Re: [R] Fwd: only plot borders of a region in a scatter plot

2016-08-04 Thread Bert Gunter
... note the typo. It's: contour( basiinID == ID, level=0.5) :-) -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Th

Re: [R] Creating Dummy Var in R for regression?

2016-08-05 Thread Bert Gunter
" for factors as needed. See ?contrasts and ?C for relevant details and/or consult an appropriate R tutorial. Of course, if this is not what you meant, than ignore. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it

Re: [R] Proving (instead of rejecting) that two groups are actually equal

2016-08-10 Thread Bert Gunter
Rejecting a null of "inequality" is the standard setup for equivalence testing in medical contexts. Search on "equivalence testing in R" and you will find what you need. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along an

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Bert Gunter
make_thunk is probably unnecessary and apparently problematic. I think you could use do.call() instead, as do.call(f,list(...)) . -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

Re: [R] glm.fit: fitted probabilities numerically 0 or 1 occurred & glm.fit: algorithm did not converge

2016-08-12 Thread Bert Gunter
full dataset using dput() (see ?dput for how to do this). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Aug 12, 2016 at 7

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-12 Thread Bert Gunter
Try reading ?panel.loess. There is no "subset" argument, so it is of course ignored. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County"

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-14 Thread Bert Gunter
"green") panel.loess(x[old],y[old],col.line = "red") panel.loess(x[!old],y[!old],col.line = "blue") } xyplot(y~x|fac, age=age, panel=pnl, lay=c(2,2)) Note that my prior comments about moviing the creation of the groups to the panel function instead of the data stil

Re: [R] R bug when started in Windows 10

2016-08-14 Thread Bert Gunter
I'm not on Windows and cannot help directly. But you might consider downloading Rstudio ( https://www.rstudio.com/ ) and running R through that. Their website should contain the info you need to get things up and running. Cheers, Bert Bert Gunter "The trouble with having an open mi

Re: [R] R bug when started in Windows 10

2016-08-14 Thread Bert Gunter
I have cc'ed this to r-help. As I said, I am not on Windows and so cannot help directly. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic

Re: [R] glmer and glht

2016-08-15 Thread Bert Gunter
Extensive references are given in the package. I suggest that you consult them. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic stri

Re: [R] Antwort: Accessing an object using a string (SOLVED)

2016-08-15 Thread Bert Gunter
;t already aware of it. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Aug 15, 2016 at 9:41 AM, Jeff Newmiller wrote: &g

Re: [R] Accessing an object using a string

2016-08-16 Thread Bert Gunter
Inline. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Aug 15, 2016 at 11:43 PM, wrote: > Hi Greg > and all others who replie

Re: [R] Regressing the residuals on the country dummies

2016-08-18 Thread Bert Gunter
1. Have you checked out package Rpy/Rpy2? 2. I don't know Python, but as you seem to be trying to get data from the web, see the Rcurl package, maybe, to do these things in R. 3. Hopefully someone who does know Python can give you better answers. Cheers, Bert Bert Gunter "The tr

Re: [R] Intercept in Model Matrix (Parameters not what I expected)

2016-08-22 Thread Bert Gunter
hange.com again. Cheers, Bert ## Note to others. If I have erred in any of the above, PLEASE CORRECT. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip

Re: [R] Estimated Effects Not Balanced

2016-08-22 Thread Bert Gunter
Please! "when I compute the anova R reports that the Estimated Effects are Unbalanced" It does *not* say this. It says that they **may** be unbalanced. They are not. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] Estimated Effects Not Balanced

2016-08-22 Thread Bert Gunter
Thanks, Rich. I didn't notice that! -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Aug 22, 2016 at 1:43 PM, Richard M

Re: [R] Replicate

2016-08-23 Thread Bert Gunter
?rep (to replicate indices) plotdat2[rep(1:3,e=100), ] This seemspretty basic. Have you gone through any R tutorials yet? If not, please do so before posting further. There are many good ones on the web. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep c

<    1   2   3   4   5   6   7   8   9   10   >