If you need to solve a nonlinear system of equations you could have a look at
the
CRAN Task View: Numerical Mathematics:
https://cran.r-project.org/view=NumericalMathematics
Specifically look in the subsection "Root Finding and Fixed Points".
Berend Hasselman
> On 19 Jan 2
other solvers. Such as nleqslv like this
library(nleqslv)
nleqslv(q.start,f.mod,m=m) # uses Broyden
nleqslv(q.start,f.mod,m=m,method="Newton") # uses Newton
The second call of nleqslv uses less iterations that multiroot.
You can check the answers.
Berend Hasselman
> On 17 Nov 2020, at
> On 21 Sep 2020, at 20:24, Gonçalo Ferraz wrote:
>
> Hello,
>
> I’ve been using R-studio for a while and today I needed to try something
> directly on the R-GUI.
>
> But when I try to open any *.R file I get a spinning wheel and R freezes. I
> can only shut it down with ‘force quit’.
>
>
hz.ch/pipermail/r-sig-mac/2020-June/013575.html
and the solution: https://stat.ethz.ch/pipermail/r-sig-mac/2020-July/013641.html
Berend Hasselman
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-
Luigi,
Try format = "%d/%m/%y"
Berend Hasselman
> On 10 Jun 2020, at 10:20, Luigi Marongiu wrote:
>
> ISO 8601
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
Just read the complete thread.
That will clarify.
Nothing wrong with R or RGUI; the virus checker is wrong.
regards,
Berend Hasselman
> On 10 Feb 2019, at 15:57, Murris Johnson wrote:
>
>
>
> Hi,
>
>
> I have a quick question for you about a page on your site th
s there a function in R for solve it or i have to programme it
>
What is the relation between the function argument x and variables X2 and X3?
As it stands this is incomprehensible. The function argument x is not used
anywhere in the function body.
Berend Hasselman
>
>
R package Ryacas may be what you want.
Berend
> On 20 Nov 2018, at 09:42, Engin Yılmaz wrote:
>
> Dea(R)
>
> Do you know any system solver in R ?
>
> For example, in matlab, is very easy
>
> syms a b c x eqn = a*x^2 + b*x + c == 0; sol = solve(eqn)
>
> How can I find this type code in
> On 25 Jul 2018, at 08:17, Naresh Gurbuxani
> wrote:
>
> I have a list whose components are data frames. My goal is to construct a
> data frame by merging all the list components. Is it possible to achieve
> this using apply and without a for loop, as used below?
>
> Thanks,
> Naresh
>
lse
exit_show_tool_tip "Save file first!"
fi
R CMD BATCH --encoding=UTF-8 --no-save --no-timing ${TM_FILENAME}
mate ${TM_FILENAME}out
Berend Hasselman
> On 4 Feb 2018, at 01:23, Martin Batholdy via R-help
> wrote:
>
> Dear R-users,
>
> This question might not be
; questions
>
Google with the phrase "opensource why" and start reading.
Berend Hasselman
__
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 gui
> On 14 Dec 2017, at 20:01, Ista Zahn wrote:
>
> On Thu, Dec 14, 2017 at 1:58 PM, Berend Hasselman wrote:
>>
>>> On 14 Dec 2017, at 19:36, lily li wrote:
>>>
>>> Hi R users,
>>>
>>> I have a question about reading from tex
> On 14 Dec 2017, at 19:36, lily li wrote:
>
> Hi R users,
>
> I have a question about reading from text files. The file has the structure
> below:
>
> TimeColumn1 Column2
> 01.01.2001-12:00:00
This line does not contain 3 elements; only one.
You'll have to fix t
mydf, mydf$type), function(Z)
sum(Z$speed*Z$n_vehicles)/sum(Z$n_vehicles))
Calculations are done on the elements of the list provided by split.
The result now is:
car light_duty heavy_duty motorcycle
36.39029 38.56522 37.5 36.08696
Obviously now the same as the dplyr method.
B
(!is.numeric(x[[1]]){
> gsub(",", ".", x[[1]])
> }else{
> x[[1]]
> }
> })
>
> and got the unwelcome error
>
> Error: unexpected '{' in:
> "adply(AX, 2, function(x){
> if(!is.numeric(x[[1]]){"
>
Missing ) in if(!is.numeric
referably with the --as-cran
option).
In addition I would also insist that packages have been sent to the winbuilder
and passed all checks without error or warning.
Berend Hasselman
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s
mess.
Do NOT post in html. This is a plain text mailing list.
Read the Posting Guide (https://www.r-project.org/posting-guide.html).
Berend Hasselman]
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.eth
n data into a zoo timeseries and an xts timeseries
library(zoo)
z.zoo <- as.zoo(zts)
z.zoo
library(xts)
z.xts <- as.xts(zts)
z.xts
Berend Hasselman
> Yadawananda Neog
> Research Scholar
> Department of Economics
> Banaras Hindu University
> Mob. 9838545073
>
> [[
> On 15 Sep 2017, at 16:35, Berend Hasselman wrote:
>
>>
>> On 15 Sep 2017, at 11:38, yadav neog wrote:
>>
>> hello to all. I am working on macroeconomic data series of India, which in
>> a yearly basis. I am unable to convert my data frame into time seri
ame(year=c(2000,2002,2003), x=c(1,2,3),y=c(10,11,12))
xy.ts <- as.ts(tsdata)
library(zoo)
as.zoo(xy.ts)
Berend Hasselman
> $ wlth: num 60.3 60.5 60.2 60.1 60.7 ...
> --
> Yadawananda Neog
> Research Scholar
> Department of Economics
> Banaras Hindu Un
ccept ISO C89... none needed
> configure: error: Need GSL version >= 1.12
> ERROR: configuration failed for package �gsl�
>
Why don't you send an email to the maintainer of the package?
Berend Hasselman
__
R-help@r-project.org mailing li
already pointed out how to resolve the error.
Berend Hasselman
__
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.
inal values of x and y.
R cannot read your mind and know that x and y are part of the return list.
Why does the function return x and y? Isn't returning test_data sufficient?
Berend Hasselman
>
> Wrong output :
> [1] "Passed Values"
> [
st_data)
> return(test_data)
> return(c(x,y))
> }
>
> for ( i in 1:1) {
> test_data <- Logic_fn(c(x,y))
Use Logic_fn(x,y) instead of c(x,y), which is wrong.
> test_data[1]
> test_data[2]
> test_data
>
> }
You'll get other errors but you should really try to
E FALSE
> [2,] FALSE TRUE TRUE
>> !b &&TRUE
> [1] TRUE
>
Read the help for &&. You can see it like this: ?`&&`
Try
!b[1] && TRUE
and
!b[2] && TRUE
Berend hasselman
> Best regards,
>
> Jeremie
>
> ___
approximate without too much harm. But not always.
Berend
> Best,
> Bernhard
>
> -----Ursprüngliche Nachricht-
> Von: Berend Hasselman [mailto:b...@xs4all.nl]
> Gesendet: Donnerstag, 13. Juli 2017 10:53
> An: OseiBonsu, Frances
> Cc: Pfaff, Bernhard Dr.; r-help@r-proje
You can then include identities naturally.
You would have to make the model dynamic but that shouldn't be too difficult
using vector indexing.
Berend Hasselman
> On 13 Jul 2017, at 10:06, Pfaff, Bernhard Dr.
> wrote:
>
> Hi Frances,
>
> I have not touched the system.fit
> On 13 May 2017, at 20:10, David Winsemius wrote:
>
>>
>> On May 13, 2017, at 5:47 AM, Ranjan Maitra wrote:
>>
>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund
>> wrote:
>>
>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
Hi,
Is it possible to display double dot (umlaut)
Your code looks needlessly complicated and inefficient in my view.
Even if you don't need or use nested for loops it can still be simplified.
1: First define some new constants to avoid the the M? stuff in your function
pME <- ME[2:9]/ME[1]
pMI <- MI[2:9]/MI[1]
pMA <- MA[2:9]/MA[1]
pMAE <- (M
homebrew? You homebrewed your R?
Please: do not post in html as the Posting guide requests.
Berend Hasselman
> On 2 May 2017, at 20:51, Assa Yeroslaviz wrote:
>
> Hi,
>
> I am running R under Rstudio for the analysis of single-cell RNA-Seq data.
>
> When trying to ana
elp me to solve this annoying situation.
>
This should have been sent to the R-SIG-Mac mailinglist.
If you look on CRAN for the packages Rmpfr and gmp you will see that both
packages are not available in binary form for OS X El Capitan. You'll have to
wait or try to compile
icial help.
Apparently to no avail.
Seems like a good idea to give these mails the same treatment as stuff from
nabble.
Berend Hasselman
> cheers,
>
> Rolf Turner
>
> --
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-3
> On 17 Apr 2017, at 18:39, BR_email wrote:
>
> Bill, part II:
>
>> source(echo=TRUE, ""C:/Users/BruceRatner/Documents/.Rprofile.site")
> Error: unexpected symbol in "source(echo=TRUE, ""C"
>
You have a double quote sign ("") preceding C:/.
Make it a single double quote so that you get "C:/.
> On 31 Mar 2017, at 19:28, John McKown wrote:
>
> On Fri, Mar 31, 2017 at 12:15 PM, Berend Hasselman wrote:
>
> I have noted a difference between R on macOS en on Kubuntu Trusty (64bits)
> with complex division.
> I don't know what would happen R on Windows
/(0+0i)
[1] NaN+NaNi
KubuntuTrusty
-
> (1+2i)/0
[1] Inf+Infi
> (-1+2i)/0
[1] -Inf+Infi
>
> 1i/0
[1] NaN+Infi
> 1i/(0+0i)
[1] NaN+Infi
Interesting to see what R on Windows delivers.
Berend Hasselman
__
R-help@r-project.org mailing l
t.
> Assistance would be appreciated.
mean_decc_0 is a matrix? No it isn't.
Use str(mean_decc_0) to see what it actually is.
Then try setting the required element to NULL. And ponder your goal.
Berend Hasselman
> Bruce
> --- Code ---
>
> yhat <- seq(1, 0.05, length.out =
There is also a package imputeTS, which may be able to do what you want.
It has a nice Introduction vignette and also appears to have nice plot
functions
Berend Hasselman
> On 24 Mar 2017, at 02:11, David Winsemius wrote:
>
> There's also an irts-package "irregular tim
e method for 'round_any' applied to an object of class
> “data.frame"
>
Did you read the Posting Guide.
DO NOT post in html.
Your data are mangled.
Your code is incomprehensible.
Reproducible example please.
Where does percent come from?
Berend Hasselman
> My code loo
.Q1 : int 47 53 75 97 NA NA 23 NA 43 NA
>
> Does anyone know how to do that?
Have you tried looking in the help for mean?
?mean
Berend Hasselman
> Thanks for any help
> Elahe
>
> __
> R-help@r-project.org mailing list -- To
whether you have same outputs as mine? And does anyone
> know what is wrong with these? My guess is that R has a bug in processing
> double numbers. Thanks!
>
Not a bug. See the R FAQ section 7.31.
Berend Hasselman
> TZ
> __
> R
rn(ssqres)}# parameter fitting using
> levenberg marquart#initial guess for
> parametersmyparms=c(k1=0.5,k2=0.5,k3=3,1)cinit=c(A=unname(myparms[4],B=0,C=0))print(cinit)#fittingfitval=nls.lm(par=par!
ms,fn=ssq)#summary of fitsummary(fitval)
Totally unreadable code because you did not read the Posting Guid
/cran.r-project.org/web/checks/check_results_largeVis.html)
and you will see that on most systems the same error is generated.
So it may be best to send an email to the maintainer.
Berend hasselman
__
R-help@r-project.org mailing list -- To UNSUBSCRIB
Why don't you just try the function whittaker from the pracma R package?
There is an example which should be adequate for finding out what to do.
Berend Hasselman
> On 2 Feb 2017, at 03:44, Percival Bueser wrote:
>
> Good day everyone!
>
> I would appreciate if anyone c
10-26 r71594). It has been doing this since 3.3.2
> has been released. Is there a real patched version somewhere?
>
Send this message to the R-SIG-Mac mailinglist. More likely to get response.
Berend Hasselman
> David Watson
> NASA - MSFC
> Mail Code ES62
> Phone 256-544-
> On 15 Dec 2016, at 13:34, Brijesh Mishra wrote:
>
> Dear Mr Hasselman,
>
> I missed you mail, while I was typing my own mail as a reply to Mr.
> Barradas suggestion. In fact, I implemented your suggestion even
> before reading it. But, I have a concern that I have noted (though its
> only hyp
ition has length > 1 and only the first element will be used
> (repeated a few times).
>
> # I have searched for a solution, but somehow couldn't get one. Hope
> that some kind soul will guide me here.
>
In your case use ifelse() as explained by Rui.
But it can be done more
21
2006 632
2007 34.1
2007 44.4
", header=TRUE)
df
aggregate(flow~year, data=df, sum)
I get a correct answer. So you are likely doing something weird and not showing
us all.
> [[alternative HTML version deleted]]
>
Plan text mail. Has be
mething wrong? Will a binary appear eventually? Would I have to
> make it myself?
>
Indeed you did something wrong.
nls is part of the stats package in R.
Just do ?nls to see the help.
Berend Hasselman
> Best wishes
>
> Troels Ring
>
> Aalborg, Denmark
>
> ___
In addition to Petr's remarks:
- why are you doing sum(mtcars)[1]? Do you want the sum of first column of
mtcars? In that case you should do sum(mtcars[,1]).
- similar remarks apply to your use of mean and sd.
Have you read an introduction to R?
Berend
> On 14 Nov 2016, at 04:01, moku...
> On 4 Nov 2016, at 19:27, Berend Hasselman wrote:
>
>>
>> On 4 Nov 2016, at 16:41, Jeff Newmiller wrote:
>>
>> Sara wins on memory use.
>>
>> Rui wins on speed.
>>
>> Bert wins on clarity.
>>
>> library(microbench
> On 4 Nov 2016, at 16:41, Jeff Newmiller wrote:
>
> Sara wins on memory use.
>
> Rui wins on speed.
>
> Bert wins on clarity.
>
> library(microbenchmark)
>
> N <- 1000
> x <- matrix( runif( N*N ), ncol=N )
> y <- seq.int( N )
>
> microbenchmark( { t( y * t(x) ) }
> , { x %*% d
> On 21 Oct 2016, at 06:00, Mike meyer <1101...@gmx.net> wrote:
>
> Let's take a different view of the problem.
> Given f=(f_1,...,f_m):R^n -> R^m we want to minimize ||f(x)||.
>
> What distinguishes this from a general minimization problem is that you know
> the structure of the
> objective fu
> On 19 Oct 2016, at 19:12, Mike meyer <1101...@gmx.net> wrote:
>
>> From my reading of the above cited document I get the impression that the
>> algorithm
> (algorithm 3.16, p27) can easily be adapted to handle the case m In this case the Jacobian Jf(x) is mxn and the matrix A(x)=Jf(x)'Jf(x) is
> On 19 Oct 2016, at 14:09, Mike meyer <1101...@gmx.net> wrote:
>
> @pd: you know that a System of equations with more variables than equations
> is always solvable
> and if a unique solution is desired one of mimimal norm can be used.
>
Not true.
Take the system with 3 variables and 2 equati
> On 19 Oct 2016, at 14:09, Mike meyer <1101...@gmx.net> wrote:
>
> @pd: you know that a System of equations with more variables than equations
> is always solvable
> and if a unique solution is desired one of mimimal norm can be used.
>
You won't get a minimum norm solution by using a least
Follow up on my previous mail.
See the FAQ for OS X :https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html
Read the section "3.2 Installation of packages". It tells it all.
(reachable from the contents entry "How to install packages").
Berend
> On 23 Aug 2016, at
> On 22 Aug 2016, at 22:17, KMNanus wrote:
>
> I’m a newbie running 3.2.4 on a mac equipped with Yosemite (10.10.5).
>
> I want to update to 3.3.1 and have downloaded the package, but have not been
> able to install it. I’ve tried install.packages("R-3.3.1.tar.gz”) and
> install.packages("R-
How about
for (i in 1:nrow(df)){
df$VAR[i] <- (binom.test(df[i,1],df[i,2],0.065))$estimate[[1]]
}
Berend Hasselman
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
You don't need the function K.
From the image you need this:
Well at last.
You don't need the function K.
From the image you only need this:
G <- as.numeric(1+t(Alpha) %*% Omega %*% Alpha)
G
delta <- (Omega %*% Alpha) / sqrt(G)
delta
Berend Hasselman
> On 20 Jul 201
be a number. What I need is a way to find the
> vector delta as a function of the elements of omega.
>
This make your problem incomprehensible (at least to me).
I really haven't got a clue of what you want.
Berend Hasselman
>
> Da: Berend Hasselman
> Inviato: mercoledì 20 l
> On 20 Jul 2016, at 20:07, Berend Hasselman wrote:
>
>
>
> This functions a scalar not a function
Correction. This should have been
This function returns a scalar not a vector.
Berend Hasselman
__
R-help@r-project.org mai
2), 3)
x
Omega <- forceSymmetric(x)
Omega
# and run the function
K1(Omega,Alpha)
The result is a scalar: 0.8149383
Depending on the contents of Omega the result of K1 may be NaN.
You will have to redefine your function if you want it to return a vector.
You have not given enough information
> On 16 Jun 2016, at 21:04, Eduardo M. A. M.Mendes wrote:
>
>
>> On Jun 16, 2016, at 3:50 PM, Berend Hasselman wrote:
>>
>>
>>> On 16 Jun 2016, at 20:02, Eduardo M. A. M.Mendes
>>> wrote:
>>>
>>> Thanks Bill for pointing th
> On 16 Jun 2016, at 20:02, Eduardo M. A. M.Mendes wrote:
>
> Thanks Bill for pointing this out. I haven’t noticed it.
>
> Vineetha, try as.double(rep(0,n)) or as.matrix(rep(0,n)),
>
Why not simply numeric(n)?
Berend Hasselman
_
en -a Rstudio
or
MRT_DATA_DIR= open -a R
Try it and see what happens.
It may even be possible to put something in .Rprofile setting your environment
variables.
Berend Hasselman
> HTH,
>
> -Roy
>
>> On Jun 4, 2016, at 11:59 AM, J Payne wrote:
>>
>> I’ve post
ckage can be found on CRAN:
https://cran.r-project.org
Follow the link "Packages" and then "Table of available packages, sorted by
name".
Direct address for tempdisagg:
https://cran.r-project.org/web/packages/tempdisagg/index.html
The source for the full package will be in
iable name. It is a builtin function.
Do not use T for TRUE; it will lead to tears at some point.
Berend Hasselman
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
> On 20 Apr 2016, at 13:22, A A via R-help wrote:
>
>
>
>
> I have a situation in R where I would like to find any x (if one exists) that
> solves the linear system of equations Ax = b, where A is square, sparse, and
> singular, and b is a vector. Here is some code that mimics my issue with
Please do NOT post in html as the posting guide tells you. Post in plain text.
Your R code is a complete mess and unreadable.
Berend
> On 10 Apr 2016, at 01:51, Mohamed Benahmed via R-help
> wrote:
>
> hi all ,
> i have an problem in script R . But when I execute the script R I face this
>
> On 10 Mar 2016, at 08:56, Sunny Singha
> wrote:
>
> Hi,
> I got a problem. Using loop, I'm trying to feed data frames, returned from
> the function, into the list but not all data frames are getting captured.
>
> I have vector with some string values which I want to pass to the function.
>
> On 4 Mar 2016, at 08:51, MAURICE Jean - externe
> wrote:
>
> Hi Berend,
>
>
>> The question belongs on the R-devel mailinglist.
> I try to find this mailing-list ...
>
See https://www.r-project.org/mail.html
>> You are calling your Fortran routines directly from an R file with .Fortran,
> On 3 Mar 2016, at 13:57, MAURICE Jean - externe
> wrote:
>
> Hi,
> I am 'translating' R functions in FORTRAN subroutines.
>
> Very often, an R function gives an 'array' as result and you don't have to
> bother with the dimension of the array : R creates automatically an array
> with the g
> On 2 Mar 2016, at 22:22, David L Carlson wrote:
>
> Another way would be to use matplot() or matlines():
>
>> lx<-c(0.4, 0.5, 0.6, 0.7)
>> x <- seq(1, 8, length.out=100)
>> myfun <- function(x, k) {(log(k)-(0.37273*log(x)-1.79389))/0.17941}
>> y <- sapply(lx, function(k) myfun(x, k))
>> matpl
> On 24 Feb 2016, at 22:12, Santosh wrote:
>
> Thanks all for your response.
> I didn't realize I posted in HTML.. I just typed an email as I usually
> do... how do I know whether it was sent in HTML? I had not changed any
> settings to send out in HTML format..
> Seems like you got the impressi
> On 1 Feb 2016, at 08:03, PIKAL Petr wrote:
>
> Hi
>
> Maybe I am completely wrong but do you really need regular expressions?
>
> You say you want to compare first nine characters of id?
>
>> substr(id, 1,9)==cusip
> [1] TRUE
>>
>
> or the last six?
>
>> substr(id, nchar(id)-6, nchar(id)
> On 21 Jan 2016, at 19:06, Duncan Murdoch wrote:
>
> On 20/01/2016 1:28 PM, Duncan Murdoch wrote:
>> On 20/01/2016 1:22 PM, Christofer Bogaso wrote:
>> > Hi,
>> >
>> > Could you please suggest a good R editor for Mac OS X (10.7.5)
>> > Previously my operating system was Windows and there I used
> On 20 Jan 2016, at 20:22, Franklin Bretschneider wrote:
>
> Dear Christofer Bogaso,
>
>
> Re:
>
>
>> Could you please suggest a good R editor for Mac OS X (10.7.5)
>
>
>
> Indeed, as Roy Mendelssohn wrote, the editor built into "R.app", the GUI
> program which is part of the standard R
> On 16 Jan 2016, at 12:22, Sandeep Rana
> wrote:
>
> Hi,
> I want to perform non-negative featurised Matrix factorisation in ‘R’. Is
> there any ‘R' package or documentation that explains on this ?
>
Well I don't know about the "featurised" but googling on (you didn't do that?)
non-negativ
> On 14 Jan 2016, at 22:36, Lorenzo Isella wrote:
>
> Dear All,
> Perhaps I am drowning in a cup of water, since I am positive that the
> answer will be a one-liner.
> Consider the following short script
>
>
>
> library(forecast)
>
> ts
Have a look at the midasr package available on CRAN.
It might provide what you need.
Berend
> On 12 Jan 2016, at 17:16, Lorenzo Isella wrote:
>
> Dear All,
> Suppose you have some time series, e.g. monthly data about
> profits in a company.
> I am trying to develop a model to predict what the
> On 8 Jan 2016, at 17:47, Ravi Varadhan wrote:
>
> There was a mistake in the previously sent function. I had hard coded the
> values of parameters `nu' and `exi'.
>
> Use this one:
>
> myroot <- function(t, nu, exi, alpha){
> fun <- function(t, exi, nu)
> (nu+t^2)^(-(nu+1)/2)*exp(((nu+1)
> On 15 Dec 2015, at 18:49, John Sorkin wrote:
>
> On this side of the Atlantic, the symbols ( or ) are properly called
> parenthesis not brackets. Consider the expression parenthetical expression,
> which means something enclosed in parentheses.
> John
>
According to http://www.oxforddicti
> On 30 Nov 2015, at 14:57, phgrosj...@sciviews.org wrote:
>
>
>> On 30 Nov 2015, at 13:09, Abhinaba Roy wrote:
>>
>> Hey,
>>
>> worked like a charm! :)
>>
>> Could you please explain about
>>
>> sub("^([0-9]*).*$", "\\1", fields)
>>
>
> Yes.
>
> sub() replaces substrings. The first argu
> On 14 Nov 2015, at 17:02, Berend Hasselman wrote:
>
>>
>> On 14 Nov 2015, at 16:15, Lorenzo Isella wrote:
>>
>> Dear All,
>> I am using optim() for a relatively simple task: a linear model where
>> instead of minimizing the sum of the squared er
> On 14 Nov 2015, at 16:15, Lorenzo Isella wrote:
>
> Dear All,
> I am using optim() for a relatively simple task: a linear model where
> instead of minimizing the sum of the squared errors, I minimize the sum
> of the squared relative errors.
> However, I notice that the default algorithm is ve
> On 6 Nov 2015, at 17:23, Erin Hodgess wrote:
>
> Hello everyone!
>
> Could someone recommend a good reference for Fortran with R, please? I
> know that Dirk has an excellent book for C/C++, but I feel more comfortable
> with Fortran (I'm old school, maybe just old!)
>
I don't know about a
> On 25 Oct 2015, at 11:42, Maram SAlem wrote:
>
> Hi All,
>
> I wonder if I can avoid the for() loop in any of the following loops.These
> loops are a part of a larger code which I'm trying to accelerate.
>
> n=6
> m=4
> x<-c(0,1,1)
>
> 1st loop
>
> for (i in 1:m-1)
> {
> d[i]<- n- (sum
> On 20 Oct 2015, at 15:35, Duncan Murdoch wrote:
>
> On 20/10/2015 6:58 AM, Andy Yuan wrote:
>> Hello
>>
>> Please could you help me to select the most appropriate/fastest function to
>> use for the following constraint optimisation issue?
>
> Just project S into the space orthogonal to B, i
Your model is producing -Inf entries in the vector Be (in function modl and LL)
at some stage during the optimization process.
You should first do something about that before anything else.
Berend
> On 17 Oct 2015, at 03:01, Bert Gunter wrote:
>
> I made no attempt to examine your details fo
> On 11 Oct 2015, at 14:12, Maram SAlem wrote:
>
> Thanks a lot for your help and patience Duncan.
> It seems that my questions is really a trivial one but I never realized
> that 1:4 means 0 1 2 3 4 , never knew it starts from 0.
>
It doesn’t mean what you mention.
1:4 is the sequence 1 2 3
> On 11 Oct 2015, at 13:52, Maram SAlem wrote:
>
> Dear All,
> I have a question concerning the seq() function arguments when used in a
> for() loop.
> I'll simplify this question to make it more clear. Suppose I have a
> (5*3)matrix s (for ex.) and I need to write a function with for() loop, i
> On 10 Oct 2015, at 13:39, peter dalgaard wrote:
>
>>
>> On 10 Oct 2015, at 10:49 , Berend Hasselman wrote:
>>
>>>
>>> On 10 Oct 2015, at 10:00, David Winsemius wrote:
>>>
>>>
>>> On Oct 9, 2015, at 10:57 PM, Steven Y
> On 10 Oct 2015, at 10:00, David Winsemius wrote:
>
>
> On Oct 9, 2015, at 10:57 PM, Steven Yen wrote:
>
>> Dear
>> How do you construct a lower triangular matrix from a vector.
>>
>> I want to make vector
>>
>> a <- 1:10
>>
>> into a triangular matrix
>>
>> 1 0 0 0
>> 2 3 0 0
>> 4 5 6
> On 6 Oct 2015, at 09:24, Neverstop wrote:
>
> Hi all.
> I don't understand why R works this way:
>> rm(list=ls())
>> require(foreign)
>> dataset <- read.dta("http://www.ats.ucla.edu/stat/data/ologit.dta";)
>> min(dataset$gpa)
> [1] 1.9
>> min(dataset$gpa)>=1.90
> [1] FALSE
>> min(dataset$gpa)>
> On 18 Sep 2015, at 16:31, John McKown wrote:
>
> On Fri, Sep 18, 2015 at 8:39 AM, John Kane wrote:
>
>> It appears that at least three major spreadsheets, Excel, Apache
>> OpenOffice Cal and gnumeric have a problem with the correct order of
>> operations when dealing with exponents. The gnum
> On 17 Sep 2015, at 23:11, Dimitri Liakhovitski
> wrote:
>
> (x <- c("q10_1", "q10_2", "q10_11", "q12_1", "q12_2", "q13_1", "q13_11"))
>
> # Which strings start with "q10" or "q12? - WORKS
> x[grep("^q10|q12", x)]
>
> # Which strings end with "1"? - WORKS
> x[grep("1$", x)]
>
> # Which stri
> On 17 Sep 2015, at 01:42, Dénes Tóth wrote:
>
>
>
> On 09/16/2015 04:41 PM, Bert Gunter wrote:
>> Yes! Chuck's use of mapply is exactly the split/combine strategy I was
>> looking for. In retrospect, exactly how one should think about it.
>> Many thanks to all for a constructive discussion .
> On 29 Aug 2015, at 20:53, Berend Hasselman wrote:
>
>
>> On 29 Aug 2015, at 18:29, Ravi Varadhan wrote:
>>
>> In solve.QP(), you don't need to expand the equality into two inequalities.
>> It can DIRECTLY handle the equality constraints. The first `
> On 29 Aug 2015, at 18:29, Ravi Varadhan wrote:
>
> In solve.QP(), you don't need to expand the equality into two inequalities.
> It can DIRECTLY handle the equality constraints. The first `meq' rows of the
> constraint matrix are equality constraints. Here is the excerpt from the
> docum
Nice and interesting! Something to remember.
Lesson (for me):
Always first look in Task Views on CRAN.
Choose Optimization and look at Mathematical Programming Solvers.
Berend
> On 28 Aug 2015, at 12:56, Hans W Borchers wrote:
>
> I got interested in enabling the full funcionality that MATL
1 - 100 of 939 matches
Mail list logo