similar to: list.files changed in 2.7.0

Displaying 20 results from an estimated 10000 matches similar to: "list.files changed in 2.7.0"

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] >
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 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
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 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,
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 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
2008 Mar 11
1
plot.zoo warnings - ignore or look for problem?
I'm getting warnings when I plot a zoo object: > dts <- chron(rep("2007-09-10", 5), paste("00:0", 0:4, ":00", sep=""), c("y-m-d", "h:m:s")) > dat.zoo <- zoo(1:5, dts) > plot(dat.zoo) Warning messages: 1: In v[[perm[1]]] : partial match of 'm' to 'month' 2: In v[[perm[2]]] : partial match of 'd'
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 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
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
2004 Nov 08
1
can one evaluate an expression in a comment? (or insert results into history?)
I'd like to insert (for example) the current datetime into a comment so it goes into the history. I can of course cut and paste the results of date() into a comment line, but it would be easier and more powerful to be able to type something like > hstamp() and have it go into the history. More generally, I would like to put any expression to be evaluated into this function. For
2008 Sep 05
1
casting help please
I have a data.frame which I believe is melted already and am having trouble casting it to 'wide' format. It looks something like > (x <- data.frame(ticker=c(rep("A",5),rep("B",6)), date=c(1:5, 1:6), value=c(NA,100*exp(rnorm(10,0,.1))))) > cast(x, date ~ ticker) # this does what I want with toy data But when I use my real data frame >
2009 Aug 03
3
Help with reshaping data.frame
I'm having trouble reshaping a data.frame from long to wide. (I think that's the right terminology; feel free to educate me.) I've looked at the reshape function and package and plyr package, but I can't quite figure out how to do this after a dozen variations. I have a data.frame with more levels than this, but similar to: > tst K1 K2 K3 V1 V2 V3 1 10 D a 0.08 99
2008 Feb 19
1
recursive function help
I'm trying to implement a recursive function using integrate, and I suspect I need a Vectorize somewhere, but I can't suss it out. Any help would be appreciated. I've tried traceback() and various debugging ideas to no avail (most likely due to my inexperience with these tools.) Here's what I have. Nk <- function(m, C) { if (length(m) > 1) { rho <- C[1, -1]
2009 Jun 24
1
how to undo automatic loading of packages?
I wanted to try out package distrMod, so I did > install.packages('distrMod') > library(distrMod) and played around, saved and quit. Now whenever I start up in this directory, I get distr and lots of other stuff loaded and lots of messages. How do I keep it from automatically loading, other than starting over in another directory? I read ?Startup, but I couldn't suss out
2004 Jun 04
1
Help with: "Cannot copy Filename: The specified net
> >Error copying file or folder - - - - - - - - - - - - - - - - - - - - - - I have not - do not wrk with linux - however, I have seen similar behaviour working with Mac (OS9 and OSX) This usually has been the result of illegal character(s) in the file or folder name, or illegal placement of legal characters. Either on the server, or on the source/destination machine. the following legal
2005 Jun 29
6
x*x*x*... vs x^n
Hi I have been wondering if there one can speed up calculating small powers of numbers such as x^8 using multiplication. In addition, one can be a bit clever and calculate x^8 using only 3 multiplies. look at this: > f1 <- function(x){x*x*x*x*x*x*x*x} > f2 <- function(x){x^8} > f3 <- function(x){x2 <- x*x;x4 <- x2*x2;return(x4*x4)} [so f1() and f2() and f3() are
2003 Nov 24
8
Question about Unix file paths
Gabor Grothendieck pointed out a bug to me in list.files(..., full.name=TRUE), that essentially comes down to the fact that in Windows it's not always valid to add a path separator (slash or backslash) between a path specifier and a filename. For example, c:foo is different from c:\foo and there are other examples. I'm going to fix this, but I'm wondering whether the fix is