similar to: can one evaluate an expression in a comment? (or insert results into history?)

Displaying 20 results from an estimated 4000 matches similar to: "can one evaluate an expression in a comment? (or insert results into history?)"

2004 Nov 08
1
can one evaluate an expression in a comment? (or insert resultsinto history?)
But that doesn't put the result into the history buffer, to be written to a file only later when I savehistory(filename). Bert Gunter also suggested ?capture.output and ?textConnection, but I cannot see how to get text into the history buffer as comments, but with evaluated expressions (values). I know how to use paste, sink, write, etc. but nothing that I can see inserts into the history
2005 May 06
4
Choices from a matrix
Could someone please suggest a more clever solution to the following problem than my loop below? Given X a 2xN matrix X, and I a k-subset of N, Generate the (2^k)xN matrix Y with columns not in I all zero and the other columns with all choices of an entry from the first or second row of X. For example, with X <- matrix(1:8, nrow=2) I <- c(1,3) X is 1 3 5 7 2 4 6 8 and Y should be 1 0 5
2005 Nov 16
1
COM dates (was origin and "origin<-" in chron)
I was just looking for an easy way to convert between COM datetime and chron datetime (both ways.) I found examples on the list, but they involved origin. Does anyone have functions for converting COM datetime <-> chron datetimethat work "safely"? David L. Reiner > -----Original Message----- > From: Gabor Grothendieck [mailto:ggrothendieck@gmail.com] >
2004 Sep 13
2
Can I find the datetime an object was last assigned to/saved?
I'm using v 1.9.1 under Windoz XP. Can I do the equivalent of "ls -l" on my R objects? R's "ls()" lists only the names. Thanks! David L. Reiner Rho Trading 440 S. LaSalle St -- Suite 620 Chicago IL 60605 312-362-4963 (voice) 312-362-4941 (fax) [[alternative HTML version deleted]]
2005 Apr 28
1
standard errors for orthogonal linear regression
Could someone please help me by giving me a reference to how one computes standard errors for the coefficients in an orthogonal linear regression, or perhaps someone has some R code? (I would accept a derivation or formula, but as a former teacher, I know how that can rankle.) I tried to imitate what's done in the code for lm() but went astray somewhere and got nonsense. (This type of
2004 Sep 29
2
How to print landscape from script in Windows: dev.print(win.print, printer="local printer name", ...) does not accept horizontal=TRUE
This is a windows-specific question. After generating a plot, I can print from scripts or the command line with > dev.print(win.print,printer="local windows printer name") I would like to print in landscape mode. From the menus, I can accomplish this by changing the properties of the printer before clicking "print". However, I tried adding
2005 Apr 21
1
R 2.1.0 for Windows installation error? atanh not in R.dll?
Could someone please tell me what I did wrong to create this message or what I should do to correct this problem? I downloaded 2.1.0 Windows binary and installed into C:/R/rw2010, using the installer. I ran md5check.exe in C:/R/rw2010/bin/ and got "No errors." The problem is this: When I start up Rgui.exe from its shortcut (target= C:\R\rw2010\bin\Rgui.exe --save -sdi, Start in
2005 Nov 15
1
origin and "origin<-" functions on chron
I'm trying to use/modify some code I found (at Omegahat, but I've seem similar usage elsewhere.) It contains the lines: if(any(origin(chronDate)!=orig)) origin(chronDate) <- orig Let's say: > require("chron") [1] TRUE > chronDate <- chron("11/15/2005", format="m/d/y", origin.=c(12,31,1899)) > orig <- c(month=12, day=31,
2005 Jul 06
1
pretty for date-time?
pretty() works well for numbers and axTicks() can help for potting log axes, but has anyone written a pretty for chron objects (or other date or date-time classes)? It would have natural units of years, months, .., days, hours, (minutes?), and it would choose the appropriate unit based on the date(time) range. I have searched the archives and documentation to no avail. (I wrote one of these back
2006 Jul 24
3
unique, but keep LAST occurence
?unique says Value: An object of the same type of 'x'. but if an element is equal to one with a smaller index, it is removed. However, I need to keep the one with the LARGEST index. Can someone please show me the light? I thought about reversing the row order twice, but I couldn't get it to work right (My data frame has 125000 rows and 7 columns, and I'm
2005 Apr 21
0
DOH! RE: R 2.1.0 for Windows installation error? atanh not in R.dll?
I'm sorry to waste bandwidth. I re-read the console message for the tenth time and finally noticed R was looking in rw2001pat for libraries. Looking at my Env vars I see I set R_LIBS to look there. Changed R_LIBS, fixed problem. DOH! So now if I want to use several versions of R simultaneously, what do I do. I set R_LIBS so it would look also in C:/R/extra for some added packages. Thanks and
2006 Jun 15
2
Standard Deviation Distribution
I'm having trouble with the standard deviation distribution as shown on http://mathworld.wolfram.com/StandardDeviationDistribution.html . (Eric Weisstein references Kenney and Keeping 1951, which I can't check.) I believe the graphs they show, but when I code the function in R, according to the listed formula, I get very different graphs. Would someone please point out my error or tell
2004 Oct 01
3
Can grid lines color in a plot be specified?
R-help Is there any way to specify the color of grid lines in a simple plot? par(color.tick.marks=c("grey")) plot(rnorm(10),tck=1) Thank you
2017 Jul 12
2
Question on Simultaneous Equations & Forecasting
Hello, I have estimated a simultaneous equation model (similar to Klein's model) in R using the system.fit package. I have an identity equation, along with three other equations. Do you know how to explicitly identify the identity equation in R? I am also trying to forecast the dependent variables in the simultaneous equation model, while incorporating the identity equation in the
2017 Jul 13
0
Question on Simultaneous Equations & Forecasting
Hi Frances, I have not touched the system.fit package for quite some time, but to solve your problem the following two pointers might be helpful: 1) Recast your model in the revised form, i.e., include your identity directly into your reaction functions, if possible. 2) For solving your model, you can employ the Gau?-Seidel method (see https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method).
2017 Jul 13
2
Question on Simultaneous Equations & Forecasting
Frances, I would not advise Gauss-Seidel for non linear models. Can be quite tricky, slow and diverge. You can write your model as a non linear system of equations and use one of the nonlinear solvers. See the section "Root Finding" in the task view NumericalMathematics suggesting three packages (BB, nleqslv and ktsolve). These package are certainly able to handle medium sized models.
2017 Jul 13
0
Question on Simultaneous Equations & Forecasting
Who was speaking about non-linear models in the first place??? The Klein-Model(s) and pretty much all simultaneous equation models encountered in macro-econometrics are linear and/or can contain linear approximations to non-linear relationships, e.g., production functions of the Cobb-Douglas type. Best, Bernhard -----Urspr?ngliche Nachricht----- Von: Berend Hasselman [mailto:bhh at xs4all.nl]
2017 Jul 13
1
Question on Simultaneous Equations & Forecasting
> On 13 Jul 2017, at 12:55, Pfaff, Bernhard Dr. <Bernhard_Pfaff at fra.invesco.com> wrote: > > Who was speaking about non-linear models in the first place??? > The Klein-Model(s) and pretty much all simultaneous equation models encountered in macro-econometrics are linear That's really not true. Klein model is linear but Oseibonsu did not say that explicitly. "Klein
2016 May 10
2
Codificacion de caracteres
Hola Javier: Me alegra saber que no soy el único cenutrio que se ha topado con esto. ? Se trata de un proceso de R que extrae datos de un fichero px descargado del INE y que contiene datos a nivel de municipio y de Comunidad Autónoma (que intento eliminar) antes de hacer la carga en el SQL Server porque solo me interesan las provincias. La BD no es ningún problema (el error se produce al tratar
2006 Apr 19
0
Function for computing the difference between 2 dates inmonths
not without knowing what dados is. Remember that num.months works only on objects that can be converted to Date objects. Make sure that all of your date-like objects can be converted. (The error message seems to indicate that something you think should look like a date doesn't.) David L. Reiner Rho Trading Securities, LLC Chicago IL 60605 312-362-4963 -----Original Message----- From: