similar to: Amount of memory occupied by data type

Displaying 20 results from an estimated 3000 matches similar to: "Amount of memory occupied by data type"

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
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 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
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 Aug 17
3
Convert week value to date
Hello all, I'm hoping to convert a decimal value for week of the year back to a date object. Eg: strptime(paste(2010,1:52,sep=" "),format="%Y %W") I expected (hoped?) this would give me the date for Monday of each week. Instead, it's giving me 52 values of today's date. Where am I erring? Thanks Michael _______________________________________________________
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)
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.
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
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
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!
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
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
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
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",
2006 Aug 04
4
cannot convert String into Integer
Hi, I''m trying to implement a live search that supports searching for multiple words. So for example, if I type "ruby rails" in the search field, I would return results that have either the word "ruby" in them or the word "rails" in them. However, this is just a background as to what the following code is trying to do and might not even be needed to fix
2012 Jan 28
2
Need very fast application of 'diff' - ideas?
Hi everyone, Speed is the key here. I need to find the difference between a vector and its one-period lag (i.e. the difference between each value and the subsequent one in the vector). Let's say the vector contains 10 million random integers between 0 and 1,000. The solution vector will have 9,999,999 values, since their is no lag for the 1st observation. In R we have: #Set up input vector
2011 Mar 08
1
repeat matrix column within each array third dimension
Hello all, I'm working with a matrix that will have varying dimensions. It will populate an array such that the number of matrix columns will determine the number of 3rd dimension levels of the array. Rows will be the same for both. For this example lets say the array will have 2 columns, but that's not fixed. dim(arr)<-c(dim(mat)[1],2,dim(mat)[2]) I wish to repeat each matrix
2013 Apr 16
1
converting blank cells to NAs
You can use na.strings="" in read.table() or read.csv() library(stringr) vec1<-unlist(str_split(readLines(textConnection("3,7,11,,12,14,15,,17,18,19")),",")) ?vec1[vec1==""]<- NA ?vec1 # [1] "3"? "7"? "11" NA?? "12" "14" "15" NA?? "17" "18" "19" #or
2014 Aug 01
2
[LLVMdev] Create "appending" section that can be partially dead stripped
Hi, Is there a way in llvm IR to emit multiple data elements within a single compilation unit that a) are guaranteed to appear sequentially in the final binary (in the order they appear in the llvm IR), and b) will be removed on an individual basis by the optimizers and/or linker in case they are not referenced from anywhere ? Defining them as "appending" puts them all into a
2010 Jan 16
3
Comparing dates in dataframes
I have two data frames. One (arr) has all arrivals to an airport for a year, and the other (gw) has the dates and quarter hour of the day when the weather is good. arr has a Date and quarter hour column. >names(arr) [1] "Date" "weekday" "hour" "month" "minute" [6] "quarter" "ICAO"