> Philipp A
> on Wed, 14 Jan 2015 14:02:40 + writes:
> Hi,
> creating a matrix from two vectors a, b by multiplying each combination
can
> be done e.g. via
> a %*% t(b)
> or via
> outer(a, b) # default for third argument is '*'
really the best (most e
Thanks Prof Ripley.
For anybody else wondering about this, see:
http://stackoverflow.com/questions/26728289/extracting-orthogonal-polynomial-coefficients-from-rs-poly-function
=
The polynomials are defined recursively using the alpha and norm2
coefficients of the poly obje
I set up Rstudio, and can access it from within my lan using
http:/192.168.108:8787.
I looked up my external IP address using one of the websites that returns an ip
addresses and tried to connect from outside my LAN using
http://73.213.144.65:8787
and received a message:
Safari cannot open the pa
Hi John,
This isn't a question about R, and so is off-topic here. Try a web search
for "home server port forwarding" or similar.
Best,
Ista
On Jan 15, 2015 7:30 AM, "John Sorkin" wrote:
> I set up Rstudio, and can access it from within my lan using
> http:/192.168.108:8787.
> I looked up my ext
Is there any way VIA R to download all available intraday data for stocks
at once (for example, all the data available at the Indian stock exchange)?
I need to make a comparative analysis and downloading the data by ticker is
too time consuming, besides I want to know if there is any website that
s
Hi
Following scenario: I have a function fun
--8<---cut here---start->8---
fun <- function(A, B, C, ...){paste(A, B, C, ...)}
--8<---cut here---end--->8---
and x defined as follow
--8<---cut here---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
For what it's worth, you can use either nlminb (directly) or optimx
within the mle2 wrapper by specifying the 'optimizer' parameter ...
this gives you flexibility in optimization along with the convenience
of mle2 (likelihood ratio tests via anova(),
It x is a list...
do.call(fun,x)
You should keep external data input away from this code construct to avoid
intentional or unintentional misuse of your fun.
If your toy example were your actual usage I would suggest the collapse
argument of paste.
--
Thanks for the reply. I have datapoints.
What I actually want to do is to estimate a joint density function.
I used npudens() to estimate the kernel density of two vectors and got the
densities at the evaluation points. Now I want an approximation for this so
I can have an estimate for different po
Hi,
I tried your problem with optimx package. I found a better solution than that
found by mle2.
?library(optimx)
# the objective function needs to be re-written
LL2 <- function(par,y) {
lambda <- par[1]
alpha <- par[2]
beta <- par[3]
R = Nweibull(y,lambda,alpha,beta)
-sum(log(R))
}
Dear David,
str_split_fixed calls str_locate_all, which gives
str_locate_all("ab", "")
## [[1]]
## start end
## [1,] 1 0
## [2,] 2 1
##
in your example, since "" is a character of length 1. substring() is
probably more intuitive to get your expected result:
substring("ab", 1:2
A more important point that want to make is that I find few people taking
advantage of the "comparative evaluation" or benchmarking ability of optimx.
There is no "uniformly best" optimizer for all problems. Different ones turn
out to perform better for different problems and it is quite diffi
FWIW this is fixed in the dev version of stringr which uses stringi
under the hood:
> stringr::str_split_fixed('ab','',2)
[,1] [,2]
[1,] "a" "b"
> stringr::str_split_fixed('ab','',3)
[,1] [,2] [,3]
[1,] "a" "b" ""
Hadley
On Wed, Jan 14, 2015 at 12:47 PM, David Barron wrote:
> I'm p
thanks, that sounds good!
Martin Maechler schrieb am Thu Jan 15 2015 at
09:07:04:
> > Philipp A
> > on Wed, 14 Jan 2015 14:02:40 + writes:
>
> > Hi,
> > creating a matrix from two vectors a, b by multiplying each
> combination can
> > be done e.g. via
>
> > a %*%
Hi all, I have a question about the arules package in R. I hope the example
tables are readable in your email, otherwise you can view it in the
question.txt in the attachment.Within the apriori function in the arules
package, I want the outcome to only contain these two variables in the LHS
Hou
Is there a generalized linear mixed-effects model implementation for R that
could handle misclassified binary data? Unless I have overlooked something
in the documentation, glmer with family=binomial(link="probit") does not
handle misclassification. Closest to what I have found was misclass, which
Dear Friends,
I am trying to program a forecasting method in R. The predictors are
weather variables in addition to lag measured Power values. The accuracy of
data is one minute and their corresponding time and date are available.
To add lag values of power to the predictors list, I am aiming to
I have installed R version 3.1.2. I tried to install RTools32.exe which is
the latest version (using this link -
http://cran.r-project.org/bin/windows/Rtools/) ! However on using the function
find_rtools() an error message was displayed which said ---
"Rtools is required to build R packages, b
Hello all,
Sorry about the first post, I forgot to mention that I am using R on Linux. As
Brian suggested I looked closely into the R help and tried the verbose option
(> install.packages("ggplot2", verbose = 'true')) but it wasn't very helpful.
But after checking 'help(download.file)' I found
Dear R users,
1) My problem in short:
Mlogit cannot calculate certain conditional models.
2) My database:
The target was a logistical regression analysis and a probability function
which should include generic coefficients and alternative-specific ones. The
database was a survey, the dependent
On Thu, Jan 15, 2015 at 9:27 AM, PRAMEET LAHIRI
wrote:
> I have installed R version 3.1.2. I tried to install RTools32.exe which is
> the latest version (using this link -
> http://cran.r-project.org/bin/windows/Rtools/) ! However on using the
> function find_rtools() an error message was dis
I don't have time to look at your example in detail, but there are couple
of things that caught my eye.
Use as.POSIXct() instead of as.POSIXlt()
I don't see anything that requires POSIXlt, and POSIXct is simpler.
If everything in
Total_Zone1
is numeric, then leave it as a matrix, do not convert
Hi R experts!
I would like to have a scripted solution that will iteratively subset data
across many variables per factor level of each variable.
To illustrate, if I create a dataframe (df) by:
variation <- c("A","B","C","D")
element1 <- as.factor(c(0,1,0,1))
element2 <- as.factor(c(0,0,1,1))
re
There are lots of ways to do this. You have to decide on how you want to
organize the results.
Here are two ways that use only core R packages. Many people like the plyr
package for this
split-data/analyze-parts/combine-results sort of thing.
> df <- data.frame(x=1:27,response=log2(1:27),
Dear Elizabeth,
A correction to my suggestion:
scaled <- scale(mydata)
wts <- f4$weights
scores <-t( apply(scaled,1,function(x) colSums(x*wts,na.rm=TRUE))) #you need
the colSums not the sum function
Also, your confusion in getting the NAs with missing data was due to a bug in
the fa function
Thank you, Chris and Martin!
On Wed Jan 14 2015 at 7:31:12 AM Andrews, Chris
wrote:
> Your definition of p-value is not correct. See, for example,
> http://en.wikipedia.org/wiki/P-value#Misunderstandings
>
> -Original Message-
> From: Monnand [mailto:monn...@gmail.com]
> Sent: Wednesday
How can we have the Interactive Decision in R, I want a variable which is
of Business importance to be injected in the Tree (Rpart specifically).
R tree is not picking up the variable, we have this functionality in SAS
and Statistica where we can force a variable to be injected in a branch and
fur
Hello everyone. I'm checking a package in Windows 8.1, and when the
program starts to create the PDF manual, exits with status 1, printing
the following message:
# End(Not run)
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
! You can't use `macro
You didn't show your code, so this is a guess.
My guess is that the \dontrun{} is outside the \examples{} section.
It must be inside the \examples{} section.
This is right
\examples{
abc <- 123
\dontrun{
def <- 456
}
ghi <- 789
}
This is my guess as to what you did.
\examples{
abc <- 123
ghi <-
Hi, Richard. I was putting some piece of code in a wrong section
(description). After correcting that, I have no more errors.
Many tanks for your help,
Leandro.
2015-01-16 1:59 GMT-03:00 Richard M. Heiberger :
> You didn't show your code, so this is a guess.
>
> My guess is that the \dontrun{}
30 matches
Mail list logo