similar to: 2 small problems: integer division and the nature of NA

Displaying 20 results from an estimated 50000 matches similar to: "2 small problems: integer division and the nature of NA"

2005 Feb 05
0
Rép : 2 small problems: integer division and the nature of NA
Thanks to the many R users who convinced me that the sum of NAs should be zero and gave me a solution if I did not want it to be zero. Thank you also for the explanations of rounding errors with floating point arithmetics. I did not expect it. This small error was a real problem for me as I was trying to find a way to recode numeric values into intervals. Because I wanted to retain numeric
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
2005 Sep 26
4
p-level in packages mgcv and gam
Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result
2009 Mar 10
4
puzzled by math on date-time objects
Hi, I don't understand the following. When I create a small artificial set of date information in class POSIXct, I can calculate the mean and the median: a = as.POSIXct(Sys.time()) a = a + 60*0:10; a [1] "2009-03-10 11:30:16 EDT" "2009-03-10 11:31:16 EDT" "2009-03-10 11:32:16 EDT" [4] "2009-03-10 11:33:16 EDT" "2009-03-10 11:34:16
2006 Sep 13
1
reshaping a dataset
Hi, I'm trying to move to R the last few data handling routines I was performing in SAS. I'm working on stomach content data. In the simplified example I provide below, there are variables describing the origin of each prey item (nbpc is a ship number, each ship may have been used on different trips, each trip has stations, and individual fish (tagno) can be caught at each
2007 May 22
5
Reducing the size of pdf graphics files produced with R
Hi, Without trying to print 1000000 points (see <http:// finzi.psych.upenn.edu/R/Rhelp02a/archive/42105.html>), I often print maps for which I do not want to loose too much of coastline detail, and/or plots with 1000-5000 points (yes, some are on top of each other, but using transparency (i.e. rgb colors with alpha information) this actually comes through as useful information.
2007 Mar 18
2
italics letter in roman string
Hi, As part of the legend to a plot, I need to have the "n" in italics because it is a requirement of the journal I aim to publish in: "This study, n = 3293" Presently I have: legend(20, 105, "This study, n = 3293", pch=1, col=rgb(0,0,0,0.5), pt.cex=0.3, cex=0.8, bty="n") I suppose I could leave a blank in place of the "n",
2006 Oct 26
2
distance between legend title and legend box
Hi, I've looked at the parameters available for the legend function and cannot find a way to change the distance between the top of the box surrounding a legend and the legend's title. I have a math expression that raises the height of my title. If you don't mind the non-sensical title I give to the legend for this plot (Figure 3.20 in R Graphics): with(iris,
2006 Feb 08
1
plotting lines that break if data break
Hi, Sometimes data series (not necessarily time series) suffer breaks where data were expected, but not collected. Often the regular "lines" command to add such data to a plot is what I want, but other times I'd like the line to break where the data series is interrupted, instead of the line jumping to the next point in the series uninterrupted. Usually my data file
2005 Jan 19
2
recoding large number of categories (select in SAS)
Hi, I have data on stomach contents. Possible prey species are in the hundreds, so a list of prey codes has been in used in many labs doing this kind of work. When comes time to do analyses on these data one often wants to regroup prey in broader categories, especially for rare prey. In SAS you can nest a large number of "if-else", or do this more cleanly with "select"
2006 Nov 08
2
combining dataframes with different numbers of columns
Dear list members, I have to combine dataframes together. However they contain different numbers of variables. It is possible that all the variables in the dataframe with fewer variables are contained in the dataframe with more variables, though it is not always the case. There are key variables identifying observations. These could be used in a merge statement, although this won't
2006 Feb 05
1
how to extract predicted values from a quantreg fit?
Hi, I have used package quantreg to estimate a non-linear fit to the lowest part of my data points. It works great, by the way. But I'd like to extract the predicted values. The help for predict.qss1 indicates this: predict.qss1(object, newdata, ...) and states that newdata is a data frame describing the observations at which prediction is to be made. I used the same technique I used
2006 Sep 20
1
functionality of "update" in SAS
Dear list, I've tried to search the archives but found nothing, although I may use the wrong wording in my searches. I've also double-checked the upData function in Hmisc, but it does something else. I'm wondering if one can update a dataframe by "forcing into" it a shorter dataframe containing the corrections, like the "update" provided in SAS data steps.
2008 Jan 31
2
dates in French format
Hello R users, I have to import a file with one column containing dates written in French short format, such as: 7-d?c-07 11-d?c-07 14-d?c-07 18-d?c-07 21-d?c-07 24-d?c-07 26-d?c-07 28-d?c-07 31-d?c-07 2-janv-08 4-janv-08 7-janv-08 9-janv-08 11-janv-08 14-janv-08 16-janv-08 18-janv-08 There are other columns for other (numeric) variables in the
2005 Jan 13
2
subsetting like in SAS
Hi, Being in the process of translating some of my SAS programs to R, I encountered one difficulty. I have a solution, but it is not elegant (and not pleasant to implement). I have a large dataset with many variables needed to identify the origin of a sample, many to describe sample characteristics, others to describe site characteristics. I want only a (shorter) list of sites and their
2016 Dec 05
4
Very very slow SAMBA sharing on Ubuntu (with StorjShare-CLI)
On Mon, 5 Dec 2016 00:41:35 -0800 ToddAndMargo via samba <samba at lists.samba.org> wrote: > On 12/04/2016 03:37 AM, Bernard Chabot via samba wrote: > > I’m using a decentralized data storage application named > > StorjShare-CLI : https://github.com/Storj/storjshare-cli > > > > This application store data into « nodes ». StorjShare-CLI can run > > 1 or
2006 Mar 18
2
legend in bubble plots made with symbols()
Hi, I have read about the use of symbols() to draw circles of different sizes, but I have not been able to find out how to add a legend to such a graph, legend that would display some specific sizes and their meaning. Before finding the symbols function in Paul Murrell's book, I had rolled by own function where the variable I want to use to control circle size was actually used to
2006 Mar 05
1
predicted values in mgcv gam
Hi, In fitting GAMs to assess environmental preferences, I use the part of the fit where the lower confidence interval is above zero as my criterion for positive association between the environmental variable and species abundance. However I like to plot this on the original scale of species abundance. To do so I extract the fit and SE using predict.gam. Lately I compared more
2005 Jan 09
2
how to do by-processing using weighted.mean
Hi, I'd like to compute the weighted mean of some variables, all using the same weight variable, for each combination of 3 factor variables. I found how I could use "summarize" (from Hmisc) to do normal means for combinations of 3 factors, but I cannot find a way of doing weighted means. Is it possible in R? Thanks in advance, Denis Chabot
2006 Feb 13
2
transforming data frame for use with persp
Hi, This is probably documented, but I cannot find the right words or expression for a search. My attempts failed. I have a data frame of 3 vectors (x, y and z) and would like to transform this so that I could use persp. Presently I have y-level copies of each x level, and a z value for each x-y pair. I need 2 columns giving the possible levels of x and y, and then a transformation of