The method of setting the initial values given lambda, alpha1, etc. should
not depend on the exact values of lambda, alpha1, etc. in my situation,
i.e. it does not depend on my data.
On Mar 22, 2017 04:30, "David Winsemius" wrote:
> On Mar 21, 2017, at 5:04 AM, Michael Dayan
wrote:
>
> Hi,
>
>
Hi Joe,
you could also rethink your pattern:
grep("x1 \\+ x2", test, value = TRUE)
grep("x1 \\+ x", test, value = TRUE)
grep("x1 \\+ x[0-9]", test, value = TRUE)
HTH
Ulrik
On Wed, 22 Mar 2017 at 02:10 Jim Lemon wrote:
> Hi Joe,
> This may help you:
>
> test <- c("x1", "x2", "x3", "x1 + x2 +
> On Mar 21, 2017, at 5:04 AM, Michael Dayan wrote:
>
> Hi,
>
> I would like to fit a mixture of two beta distributions with parameters
> (alpha1, beta1) for the first component, (alpha2, beta2) for the second
> component, and lambda for the mixing parameter. I also would like to set a
> maximu
> On Mar 21, 2017, at 6:31 PM, Bert Gunter wrote:
>
> It is not clear to me what you mean, but:
>
>> grep ("x1 \\+.* \\+ x3",test, value = TRUE)
> [1] "x1 + x2 + x3"
>
> ## This will miss "x1 + x3" though.
So then this might be acceptable:
grep ("x1\\ \\+.* x3", test, value = TRUE)
>
> se
It is not clear to me what you mean, but:
> grep ("x1 \\+.* \\+ x3",test, value = TRUE)
[1] "x1 + x2 + x3"
## This will miss "x1 + x3" though.
seems to do what you want, maybe. Perhaps you need to read up about
regular expressions and/or clarify what you want to do.
Cheers,
Bert
Bert Gunter
"
Hi Joe,
This may help you:
test <- c("x1", "x2", "x3", "x1 + x2 + x3")
multigrep<-function(x1,x2) {
xbits<-unlist(strsplit(x1," "))
nbits<-length(xbits)
xans<-rep(FALSE,nbits)
for(i in 1:nbits) if(length(grep(xbits[i],x2))) xans[i]<-TRUE
return(all(xans))
}
multigrep("x1 + x3","x1 + x2 + x3")
Hi Folks,
Is there a way to find "x1 + x2 + x3" given "x1 + x3" as the pattern?
Or is that a ridiculous question, since I'm trying to find something
based on a pattern that doesn't exist?
test <- c("x1", "x2", "x3", "x1 + x2 + x3")
test
[1] "x1" "x2" "x3" "x1 + x2 +
He offered two solutions, and I want to second the vote against the first one.
I often put large numbers of configuration variables in a few CSV files
organized by topic area and read them in. The resulting data frames are capable
of holding multiple cases if desired and I just specify which ca
That worked perfectly!
This makes using a large number of values for programming and their
documentation significantly easier.
Thank you
Shawn Way, PE
-Original Message-
From: Enrico Schumann [mailto:e...@enricoschumann.net]
Sent: Tuesday, March 21, 2017 4:40 PM
To: Shawn Way
Cc: r-h
On Tue, 21 Mar 2017, Shawn Way writes:
> I have an org-mode table with the following structure
> that I am pulling into an R data.frame, using the
> sfsmisc package and using xtable to print in org-mode
>
> | Symbol | Value | Units |
> |--+---+---|
> | A
Note that the recently released package nlsr by Duncan Murdoch and I has a slight update in the functions nlxb() and
nlfb() as well as a lot of features for symbolic derivative calculation.
JN
On 2017-03-21 06:57 AM, DANIEL PRECIADO wrote:
Dear list,
I want to use nlxb (package nlmrt) to fit
I have an org-mode table with the following structure that I am pulling into an
R data.frame, using the sfsmisc package and using xtable to print in org-mode
| Symbol | Value | Units |
|--+---+---|
| A | 1 | kg/hr|
Thanks, Bill.
Sooo... taking the error literally,
temp1 = array(NA, c(3,2,1))
dimnames(temp1)[[3]] = list( "test" )
works, even though
mode( dimnames(temp1)[[3]] )
yields
"character".
Setting all the dimension names simultaneously still feels way better.
--
Sent from my phone. Please excu
It happens because dimnames(originalArray) is NULL and when [[<- extends
NULL it turns it into a list if the size of the new element is not one
but into a vector with the type of new element if the new element's
size is one.
> str( `[[<-`(NULL, 3, value="One") )
chr [1:3] NA NA "One"
> str(
While I generally agree that it is better to design code that sets all of the
dimension names simultaneously, the discrepancy between behavior when the
dimensions are longer than 1 and when they are equal to 1 seems irregular.
Someone went to some lengths to make it possible to set dimnames indi
When you use the data= argument in glm(), the function looks in the data.frame
for a variable first. You have created two versions of stype, one in the
data.frame and one outside it. So your first glm() selects all the cases
apistrat since apistrat$stype always equals apistrat$stype. You can see
This one was actually clear enough to those exposed to the econometric lingo:
Panel = "repeated measurements", VAR = Vector AutoRegression (not to be
confused with var() or VaR).
-pd
> On 20 Mar 2017, at 17:44 , Bert Gunter wrote:
>
> Excuse my denseness, but huh??
>
> If you receive no sati
Hello,
I am experiencing odd behavior with the subset parameter for glm. It appears
that the parameter uses non-standard evaluation, but only in some cases. Below
is a reproducible example.
library(survey) # for example dataset
data(api)
stype <- "E"
(a <- glm(api00~ell+meals+mobility, data =
Hi,
This mail is in regards with a query we have in usage of Cubist package in R.
We are using the CRAN package - "Cubist" for predicting sales. We have a large
training dataset which in turn gives a huge specification result file.
(Note: Independent variables consists of both character and numer
Dear R users,
I am pleased to announce the release on CRAN of brant 0.1-1:
https://cran.r-project.org/package=brant. I implemented the brant test
(Brant, Rollin 1990) in R together with Prof. Marco Steenbergen at our
Institute.
The function brant() tests the parallel regression assumption for ord
> On Mar 20, 2017, at 4:46 PM, Douglas Ezra Morrison
> wrote:
>
> Dear R-Help readers,
>
> I am writing to ask about some behavior of base::dimnames() that surprised
> me. If I create an array with one of its dimensions = 1, and then try to
> assign names to that dimension, I get an error unle
You can use wrapnls from the nlmrt package to get an nls object. Run
it instead of nlxb. It runs nlxb followed by nls so that the output is
an nls object.. Then you can use all of nls' methods.
On occiasion that fails even if nlxb succeeds since the nls
optimization can fail independently of nlx
Hi,
I would like to fit a mixture of two beta distributions with parameters
(alpha1, beta1) for the first component, (alpha2, beta2) for the second
component, and lambda for the mixing parameter. I also would like to set a
maximum of 200 iterations and a tolerance of 1e-08.
My question is: how to
Dear list,
I want to use nlxb (package nlmrt) to fit different datasets to a gaussian,
obtain parameters (including standard error, t-and p-value) and confidence
intervals.
nlxb generates the parameters, but very often results in NA standard
error,t-and p-values. Furthermore, using confint() t
Below are samples from a kernel density estimated "data" with gaussian
kernel.
I really like this solution of estimation of a kernel because it is nice
and elegant.
fit<-density(data)
rnorm(N, sample(data, size = N, replace = TRUE), fit$bw) #samples from
kernel density estimation
I am however in
> Gerrit Eichner
> on Tue, 21 Mar 2017 10:45:13 +0100 writes:
> Hi, Tal,
> in print.default it says:
> digits:
> a non-null value for digits specifies the __minimum__
> number of __significant__ digits to be printed in values.
> Maybe this clarifies your obs
I'd say it's about equivalent to suggesting to Vladimir Putin that he
stop trying to take over territories bordering Russia.
Jim
On Tue, Mar 21, 2017 at 8:30 PM, Tal Galili wrote:
> This may have been asked before, but I don't understand the behavior
> of options(digits = 1) for vectors contain
Hi, Tal,
in print.default it says:
digits:
a non-null value for digits specifies the __minimum__
number of __significant__ digits to be printed in values.
Maybe this clarifies your observation.
Hth -- Gerrit
-
Dr. Gerrit
This may have been asked before, but I don't understand the behavior
of options(digits = 1) for vectors containing values such as 0.01
For example, why is this happening:
options(digits = 1)
> 0.01
[1] 0.01
More examples:
> options(digits = 7)
> 0.1
[1] 0.1
> 0.01
[1] 0.01
> 0.11
[1] 0.11
> c(0.
Hi Alicia,
If I understand this, perhaps:
df<-data.frame(VALUE=c("<60","Positive","Negative","Less than 0.30",
"12%","<0.2","Unknown"),
DESCRIPTION = c("A","A", "B","C","D","E","E"),
NUMERIC_VALUE=c(9,9,9,9,9,9,9))
df$NUMERIC_VALUE[df$VALUE == "Positive" & df$DESCRIPTION == "A"]<-
9
30 matches
Mail list logo