similar to: Convert week value to date

Displaying 20 results from an estimated 3000 matches similar to: "Convert week value to date"

2009 Oct 08
2
lattice: passing multiple lty values to the key/legend
hi all, It's not clear to me how (or if) I can pass multiple values for lty to a key in xyplot? I've tried: lines=list(lty=1:3), to no avail. Do I need to use something other than auto.key? (Deepayan, if you're out there, I have your book and must admit the answer isn't jumping out at me.) thanks in advance! Michael Folkes example code: #____________________________
2011 Mar 04
4
Floating points and floor() ?
Perhaps somebody could clarify for me if the following is a floating point matter or otherwise, and how am I to correct for it? > floor(100*.1) [1] 10 > 100*(1.0-.9) [1] 10 > floor(100*(1-0.9)) [1] 9 Thanks! Michael _______________________________________________________ Michael Folkes Salmon Stock Assessment Canadian Dept. of Fisheries & Oceans Pacific Biological Station
2011 Sep 24
2
maptools::sunriset() daylight savings to stardard time change
Hello all, After beating my head against the wall for a few hours, I give up. I have two problems. 1. If I use seq() to generate a POSIXct series that crosses a daylight savings to stardard time change I get two values for the first day of change. The time change is Nov 6,2011. The value for Nov 7 turns into 23:00 on Nov 6, thus two values for Nov 6. (see below) So I put a time value (noon)
2011 Apr 04
2
RODBC excel - need to preserve (or extract) numeric column names
I'm using RODBC to read an excel file (not mine!). But I'm struggling to find a way to preserve the column names that have a numeric value. sqlFetch() drops the value and calls them f1, f2, f3,... (ie field number). this is a different approach from read.csv, which will append "V" prior to the numeric column name. sqlFetch isn't so helpful. Is there a way to get the
2013 Sep 09
1
Hmisc binconf function value interpretation during narrow confidence intervals
Hello all, I've been using binconf (package Hmisc) at a range of alpha values and noticed that using the 'Wilson' method when alpha is larger (i.e. narrow CI), results in the upper value being smaller than the lower value. The 'exact' and 'asymptotic' methods give results in the realm I'd expect. But the help file suggests: "Following Agresti and Coull, the
2007 Jul 10
2
Plot SpatialLinesDataFrame with xlim & ylim
I'm running windows xp, R 2.3.1 with maptools 0.6-6, I guess. When plotting from a large SpatialLinesDataFrame and using xlim & ylim to reduce the area, the plot axes automatically have the same scale size, even if xlim and ylim ranges differ. E.g.: tmp <- readShapeLines(filepath) plot(tmp,xlim=c(-126,-119),ylim=c(50,51)) The y-axis range is actually 47-54, same range as the x-axis.
2007 Oct 31
1
Lattice: par.ylab.text alpha ?
Hi all, I've got R for windows 2.3.1 I'm trying to modify my lattice histograms. The following does reset the y-label to blue, but I cannot turn off the label (alpha=0), nor shift label position (I'm assuming that is what lineheight is for). Is 'lineheight' the equivalent of 'line' in mtext? Am I erring somehow? Thanks!
2008 Nov 04
1
contour plot, failing to interpolate through all data
I'm having trouble making contour lines for this attached, sparse dataset (low data:NA ratio!). Is it the high number of NA's, or funny layout of the densities, or something else that's causing this? This is a subsample of the dataset, and I get the same problem when using the full data. The only reason I get any contours is because I'm forcing specific levels. If no levels are
2009 Oct 08
1
problem understanding factor levels for use lattice panel order
Hello all, In order to get the desired order of panels within lattice I realized I needed to define my factor levels. I now see how to properly do it (attached code), but: 1. I don't understand why I have to use factor() on a variable that is already a factor, and why levels() alone doesn't work to readjust the level order. 2. I just noticed that if I do use levels(xx$v1), it's
2012 Mar 13
1
Amount of memory occupied by data type
Hello all, I was under the (false?) assumption that an object that is class logical, would take up less memory than an object with class integer. Below am I correctly showing this is not the case? This was an attempt to reduce memory usage. I'm dealing with two large arrays (could be integers). Their contents are the exact same, but one has NA's in random locations. I thought instead
2011 Sep 26
0
as.POSIXct and time zones
Hello all, I'm struggling with POSIXt objects. I've read the refman, the Rnews from 2001 and hopefully all the pertinent help pages. I'm running windows xp. It appears my time zone variable isn't set, which hopefully is fine for this exercise. > Sys.getenv("TZ") TZ "" help(as.POSIXct) states: "Dates without times are treated as being at midnight
2011 Oct 20
0
Apply approx() to an array and eventually a list of arrays
Hello all, I'm struggling to grasp how I might use lapply() instead of looping to run approx() on a list consisting of multiple arrays - each of equal dimension. But simpler than that, I haven't been able to successfully apply approx() to an array, unless I loop through the third dimension and extract the matrix. See example code below... Any suggestions will be gratefully received. Thanks
2008 Oct 23
0
R CMD Rd2dvi (PR#13200)
Hello, I can build packages with R-2.8.0 but I cannot run the code: R CMD Rd2dvi --pdf --no-clean <pkg_name> =20 Error message: .: Can't open C:/Apps/R/R280/share/sh/dcf.sh: No such file or directory The system cannot find the path specified. =20 The above code works fine in R-2.7.2. =20 Comparing the bash script Rd2dvi.sh between R-2.7.2 and R-2.8.0 makes me think that the script is
2010 Dec 09
1
order matrix by column position
Hello all, I'm trying to grasp a way to order a matrix by giving order() only a vector of the columns it can look to for sorting. The approach has to be generic such that I can feed order() a vector of variable length (ie varying # of columns to sort by). x<-rep(1,9) y<-c(1, 1, 2, 2, 2, 1, 2, 2, 2) z<-c(10, 11, 10, 13, 15,1000,1000, 1001,1002) results<-cbind(x,y,z) #pseudocode:
2013 Mar 12
2
funtion equivalent of jitter to move figures on device
hello all, I'm overlaying numerous scatter plots onto a map (done in PBSmodelling). In this case I'm placing each plot by setting par(fig) to the centroid of map polygons. The location/mapping part is not so important. There are cases of small overlaps for some plots (ie figures) so I'm keen to write or find a function that moves my small scatter plots so they don't overlap. A
2011 Jan 27
1
binomial dist: obtaining probability of success on each trial
I'm trying to fathom how to answer two example problems (3.3.2 & 3.3.3) in: Krishnamoorthy. 2006. "handbook of statistical distributions with applications" The first requires calculating single trial probability of success for a binomial distribution when we know: trial size=20, successes k=4, P(x<=k)=0.7 Appreciably all the binomial functions are requiring "prob",
2004 Jun 15
2
S/R/RWeb/ODBC
I'm looking for an optimal approach to access Oracle databases via RWeb applications. I'm new to R but familiar with programming functions and web pages for the S+ Statserver. I'm now going through the motions of migrating S+/Statserver applications to R/RWeb as a feasability exercise. I can access databases using ODBC directly in R or S, and using Statserver, but I have not succeeded
2007 Sep 13
1
Collapsing data frame; aggregate() or better function?
Hello r-help, I am trying to collapse or aggregate 'some' of a data frame. A very simplified version of my data frame looks like: > tester trip set num sex lfs1 lfs2 1 313 15 5 M 2 3 2 313 15 3 F 1 2 3 313 17 1 M 0 1 4 313 17 2 F 1 1 5 313 17 1 U 1 0 And I want to omit sex from the picture and just get an addition of num,
2004 Mar 17
2
Installing Samba
Hi I am trying to install Samba on a QNX 4.24 system. When we run the make file we get an error : compiling server.c make:cc:command not found make: *** [server.o] error 127 Can you help with this! Lucille Shears Systems Analyst CCG/DFO shearsl@dfo-mpo.gc.ca (709) 772-3131 cell (685-1512)
2005 Jan 06
6
"labels" attached to variable names
Hi, Can we attach a more descriptive "label" (I may use the wrong terminology, which would explain why I found nothing on the FAQ) to variable names, and later have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand as ylab and xlab when making plots. Thanks in advance, Denis Chabot