[R] How to find series of small numbers in a big vector?
Hello: I have a vector with 120,000 reals between 0.0 and 0. They are not sorted but the vector index is the time-order of my measurements, and therefore cannot be lost. How do I use R to find the starting and ending index of ANY and ALL the series or sequences in that vector where ever there are 5 or more members in a row between 0.021 and 0.029 ? For example: search_range - c (0.021, 0.029) # inclusive searching search_length - 5 # find ALL series of 5 members within search_range my_data - c(0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.028, 0.024, 0.027, 0.023, 0.022, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.024, 0.029, 0.023, 0.025, 0.026, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.022, 0.023, 0.025, 0.333, 0.027, 0.028, 0.900, 0.900, 0.900, 0.900, 0.900) I seek the R program to report: start_index of 12 and an end_index of 16 -- and also -- start_index of 23 and an end_index of 27 because that is were there happens to be search_length numbers within my search_range. It should _not_ report the series at start_index 40 because that 0.333 in there violates the search_range. I could brute-force hard-code an R program, but perhaps an expert can give me a tip for an easy, elegant existing function or a tactic to approach? Execution speed or algorithm performance is not, for me in this case, important. Rather, I seek an easy R solution to find the time windows (starting ending indicies) where 5 or more small numbers in my search_range were measured all in a row. Advice welcome and many thanks in advance. Ed Holdgate __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Fractional brownian motion
Dear All; I have used fbmSim to simulate a fbm sequence, however, when I tried to estimate the Hurst effect, none of the nine procedures gave me an answer close enough to the real value, which is 0.5 (n=1000). So, would you please advice, 1. which is the best method to estimate the H among the 9 mehods, R/S, higuchi or Whittle? 2. how to choose the levels (default=50), minnpts, cutoff values or if there is any other issues to consider? Would you please send your code if you can get the right estimate for the attached dataset? 3. I also simulated multiple sequences, but some of the estimated results have H1, how would you explain this, and how to correct it. 4. if I have a sample size of 30, what are your suggestions for estimating the hurst effect. I really appreciate your help, and thanks in advance. Sincerely; Qing list(c(0, 0.0602883614054335, 0.0792551804556156, 0.109563140496959, 0.125726475390261, 0.101877497256596, 0.0571926667502657, 0.00262554012667387, -0.0651825041744684, -0.0696503406796901, -0.0688337926741136, -0.0361989921035026, -0.0496524166395568, -0.0718218507093852, -0.109583486993751, -0.0451891749832022, -0.0260755094163026, -0.0201228029445018, -0.08818052945358, -0.0285680272562049, -0.032752629105123, -0.00199553309054604, 0.00508312076775159, -0.0382257524810562, -0.0398084284989033, -0.0502088451482971, -0.0502183047870017, -0.0174725900800023, -0.031457396692228, -0.0497298422601627, -0.0499422794745919, -0.0361646489128442, 0.0266653302426084, -0.00219111075589404, 0.0200305010061950, -0.054431205284715, -0.00789973517059908, -0.0085425214867059, -0.0541809440614641, -0.110006586793787, -0.127781398474619, -0.149159749479771, -0.0888724748560444, -0.0768016585462973, -0.0427333724364433, -0.0562443902614682, -0.062866380084345, -0.0883889349587378, -0.08412713827269, -0.124694662643563, - 0.0692092347299578, -0.062046981143375, -0.0853376756560203, -0.0994827776216755, -0.0599248702862878, -0.086369926350214, -0.0890587510305954, -0.0599052704934926, -0.0393644348210234, -0.0364342257334110, -0.0352152731793845, 0.00857219866032972, 0.0180050537574112, -0.0356947245542089, -0.0615077884110117, -0.0650043906408892, -0.0357502728853327, 0.00485292461594026, -0.0458490824792766, -0.0735087346178546, -0.0820482814570969, -0.124917946967105, -0.102342757999288, -0.154497291254316, -0.181381845540350, - 0.166583783090691, -0.130709738638527, -0.124693013403996, -0.120174007595549, - 0.204900741024172, -0.187508161990262, -0.200032164010717, -0.224311714556569, - 0.207979212824500, -0.232450923263701, -0.198989498760939, -0.215501785889735, - 0.226880158415004, -0.203545247216445, -0.182379290331033, -0.197038481353429, - 0.183796217531869, -0.215299419717715, -0.226095790998872, -0.201080854888686, - 0.261516787028393, -0.228388047078831, -0.233878235687051, -0.250375640774054, - 0.245746001611628, -0.232938343176222, -0.204702689747725, -0.259350393091606, - 0.266266298423241, -0.261596784773769, -0.259875864886204, -0.288719457448324, - 0.318140871065267, -0.304593775001704, -0.263467947228369, -0.323808258544402, - 0.368149351192211, -0.347335883864181, -0.400024671714471, -0.371544405921674, - 0.34497157633729, -0.418657437186672, -0.446912741927435, -0.443280747761798, - 0.384739689692638, -0.408072099289829, -0.44994167683647, -0.495273953054503, - 0.495799924479583, -0.43697383254148, -0.440650597876129, -0.458929575025839, - 0.464585181026337, -0.455843249117235, -0.505571057794026, -0.528316203388037, - 0.58236723395483, -0.519865988395428, -0.555187599676786, -0.532496699903787, - 0.522718022822901, -0.559598211031558, -0.54708053308, -0.554634133071482, - 0.541090495738355, -0.558915651522986, -0.541917600099341, -0.578140869146858, - 0.53827826166188, -0.52995892714492, -0.502706986562639, -0.497002923985933, - 0.488096453915811, -0.51306171001298, -0.536938942207764, -0.515525690037527, - 0.527192086185579, -0.511195825348352, -0.531104487863626, -0.521038783472886, - 0.519956505596612, -0.510535242028159, -0.531234776730198, -0.526733559471536, - 0.583555032968273, -0.551226199377139, -0.489093347568197, -0.505836247919194, - 0.485420121220644, -0.511258369655571, -0.505044073824655, -0.496646898991666, - 0.49767793016268, -0.496864531091594, -0.545965735276333, -0.588151447068976, - 0.594481697088302, -0.633356216248837, -0.649947987535778, -0.698052359479746, - 0.651147537552288, -0.678918599568793, -0.707817506128165, -0.69962378236799, - 0.664061266573256, -0.686809968963275, -0.70940931290113, -0.710042179498104, - 0.700294406700751, -0.69089796594532, -0.687411073827526, -0.660740247977237, -0.61857834066703, -0.611492191585365, -0.617870447722936, -0.590305790642949, - 0.616713901938279, -0.619126236382548, -0.618591413756597, -0.604886044395737, - 0.598434945889939, -0.481524771809731, -0.424388823122359, -0.490492676413456, - 0.506402791875861, -0.480172973435785, -0.517922095978117, -0.502318428525046, - 0.496731810144271, -0.531408048623419,
[R] fSeries Package
Dear All; I have used fbmSim to simulate a fbm sequence, however, when I tried to estimate the Hurst effect, none of the nine procedures gave me an answer close enough to the real value, which is 0.5 (n=1000). So, would you please advice, 1. which is the best method to estimate the H among the 9 mehods, R/S, higuchi or Whittle? 2. how to choose the levels (default=50), minnpts, cutoff values or if there is any other issues to consider? Would you please send your code if you can get the right estimate for the attached dataset? 3. I also simulated multiple sequences, but some of the estimated results have H1, how would you explain this, and how to correct it. 4. if I have a sample size of 30, what are your suggestions for estimating the hurst effect. I really appreciate your help, and thanks in advance. Sincerely; Ed [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] fSeries Package
Dear All; I have used fbmSim to simulate a fbm sequence, however, when I tried to estimate the Hurst effect, none of the nine procedures gave me an answer close enough to the real value, which is 0.5 (n=1000). So, would you please advice, 1. which is the best method to estimate the H among the 9 mehods, R/S, higuchi or Whittle? 2. how to choose the levels (default=50), minnpts, cutoff values or if there is any other issues to consider? Would you please send your code if you can get the right estimate for the attached dataset? 3. I also simulated multiple sequences, but some of the estimated results have H1, how would you explain this, and how to correct it. 4. if I have a sample size of 30, what are your suggestions for estimating the hurst effect. I really appreciate your help, and thanks in advance. Sincerely; Qing list(c(0, 0.0602883614054335, 0.0792551804556156, 0.109563140496959, 0.125726475390261, 0.101877497256596, 0.0571926667502657, 0.00262554012667387, -0.0651825041744684, -0.0696503406796901, -0.0688337926741136, -0.0361989921035026, -0.0496524166395568, -0.0718218507093852, -0.109583486993751, -0.0451891749832022, -0.0260755094163026, -0.0201228029445018, -0.08818052945358, -0.0285680272562049, -0.032752629105123, -0.00199553309054604, 0.00508312076775159, -0.0382257524810562, -0.0398084284989033, -0.0502088451482971, -0.0502183047870017, -0.0174725900800023, -0.031457396692228, -0.0497298422601627, -0.0499422794745919, -0.0361646489128442, 0.0266653302426084, -0.00219111075589404, 0.0200305010061950, -0.054431205284715, -0.00789973517059908, -0.0085425214867059, -0.0541809440614641, -0.110006586793787, -0.127781398474619, -0.149159749479771, -0.0888724748560444, -0.0768016585462973, -0.0427333724364433, -0.0562443902614682, -0.062866380084345, -0.0883889349587378, -0.08412713827269, -0.124694662643563, - 0.0692092347299578, -0.062046981143375, -0.0853376756560203, -0.0994827776216755, -0.0599248702862878, -0.086369926350214, -0.0890587510305954, -0.0599052704934926, -0.0393644348210234, -0.0364342257334110, -0.0352152731793845, 0.00857219866032972, 0.0180050537574112, -0.0356947245542089, -0.0615077884110117, -0.0650043906408892, -0.0357502728853327, 0.00485292461594026, -0.0458490824792766, -0.0735087346178546, -0.0820482814570969, -0.124917946967105, -0.102342757999288, -0.154497291254316, -0.181381845540350, - 0.166583783090691, -0.130709738638527, -0.124693013403996, -0.120174007595549, - 0.204900741024172, -0.187508161990262, -0.200032164010717, -0.224311714556569, - 0.207979212824500, -0.232450923263701, -0.198989498760939, -0.215501785889735, - 0.226880158415004, -0.203545247216445, -0.182379290331033, -0.197038481353429, - 0.183796217531869, -0.215299419717715, -0.226095790998872, -0.201080854888686, - 0.261516787028393, -0.228388047078831, -0.233878235687051, -0.250375640774054, - 0.245746001611628, -0.232938343176222, -0.204702689747725, -0.259350393091606, - 0.266266298423241, -0.261596784773769, -0.259875864886204, -0.288719457448324, - 0.318140871065267, -0.304593775001704, -0.263467947228369, -0.323808258544402, - 0.368149351192211, -0.347335883864181, -0.400024671714471, -0.371544405921674, - 0.34497157633729, -0.418657437186672, -0.446912741927435, -0.443280747761798, - 0.384739689692638, -0.408072099289829, -0.44994167683647, -0.495273953054503, - 0.495799924479583, -0.43697383254148, -0.440650597876129, -0.458929575025839, - 0.464585181026337, -0.455843249117235, -0.505571057794026, -0.528316203388037, - 0.58236723395483, -0.519865988395428, -0.555187599676786, -0.532496699903787, - 0.522718022822901, -0.559598211031558, -0.54708053308, -0.554634133071482, - 0.541090495738355, -0.558915651522986, -0.541917600099341, -0.578140869146858, - 0.53827826166188, -0.52995892714492, -0.502706986562639, -0.497002923985933, - 0.488096453915811, -0.51306171001298, -0.536938942207764, -0.515525690037527, - 0.527192086185579, -0.511195825348352, -0.531104487863626, -0.521038783472886, - 0.519956505596612, -0.510535242028159, -0.531234776730198, -0.526733559471536, - 0.583555032968273, -0.551226199377139, -0.489093347568197, -0.505836247919194, - 0.485420121220644, -0.511258369655571, -0.505044073824655, -0.496646898991666, - 0.49767793016268, -0.496864531091594, -0.545965735276333, -0.588151447068976, - 0.594481697088302, -0.633356216248837, -0.649947987535778, -0.698052359479746, - 0.651147537552288, -0.678918599568793, -0.707817506128165, -0.69962378236799, - 0.664061266573256, -0.686809968963275, -0.70940931290113, -0.710042179498104, - 0.700294406700751, -0.69089796594532, -0.687411073827526, -0.660740247977237, -0.61857834066703, -0.611492191585365, -0.617870447722936, -0.590305790642949, - 0.616713901938279, -0.619126236382548, -0.618591413756597, -0.604886044395737, - 0.598434945889939, -0.481524771809731, -0.424388823122359, -0.490492676413456, - 0.506402791875861, -0.480172973435785, -0.517922095978117, -0.502318428525046, - 0.496731810144271, -0.531408048623419,
[R] Plots: displaying mathematical symbols in specific fonts
Dear SavioRs, I am doing some research where characters in different microsoft fonts serve as experimental stimuli. Hence, in plot labels, I would like to display the characters in specific microsoft fonts. I have figured out how to display letters and numbers, but I am having trouble with symbols such as capital delta. Before I go further, I am using R 2.2.1 on Windows XP with everything in English. I am trying to save my plot as a windows metafile. To display different characters in verdana, for example, I first edit the Rdevga file so that it contains verdana. I can then get verdana letters and numbers on the plot using a text() command. Things within an expression() command, however, are not displayed in the desired font. For example, windows() plot(rnorm(15),rnorm(15)) text(0,0,expression(Delta),font=10) displays a capital delta, but it is not in font #10 within Rdevga. I can get characters that have one of the first 255 ascii codes using chars8bit() in the sfsmisc package. One example is the division sign: text(0,0.2,chars8bit(247),font=10) I have not been able to display other symbols in microsoft fonts, however. Is this possible to do in R? All replies are appreciated. -- Ed Merkle, PhD Department of Psychology Wichita State University Wichita, KS __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] plotting question
Hi, Trying to print out two vectors of data in a plot. Both are actual time series but I've been unable to plot both in one graph. Some examples available use use matrix() or ts() as an intermediate way to build an object that can be plotted but I've had no luck. Can someone point me to an example or cut and paste one I can look at? I'd like to be able to plot them in different colours as I've done with the ts.plot function with output from STL. Thanks. Ed __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] plotting question
Yes, I have gone through the manual. My best reference for plotting has been examples either through the list archive or searches on the internet. Nothing in the introductory manual could get me to what I have been able to do so far, but that is limited to plotting componenets of the time series returned from an STL call. This is why I am asking for example or references to examples from anyone who would be willing to share them. For some of us not very familiar with S+, etc. the documentation with R is not enough. While I can plot two time series one above another using the mfrow() function I'd prefer to put two time series in one plot in different colours and using two different symbols, which I cannot do using calls to plot(). Thanks. A man is not old until regrets take the place of dreams. Actor John Barrymore From: Berton Gunter [EMAIL PROTECTED] To: 'Ed Wang' [EMAIL PROTECTED], r-help@stat.math.ethz.ch Subject: RE: [R] plotting question Date: Mon, 5 Dec 2005 14:12:47 -0800 ?lines ?points An Introduction to R (and numerous other books on R) explains this. Have you read it? -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] help with R
Morning, I've downloaded the precompiled R 2.1.1 version and am using Windows XP on my office workstation. As mentioned previously, I've resorted to batch jobs to avoid the hanging that occurs when I try to plot the 3690 length vector of data. If it's warranted, I can do a build from the source and change specific parameters in the makefile if people feel it is warranted. Based on Berton's suggestion to look at the range of packages available I think stl() might be as appropriate a package to use to identify all three components of the time series data I have: underlying trend, seasonality over a full year period (periodicity of one year, or 246 days in my case), and residual (which I have no expectation that it will necessarily be ~N(0,\sigma^2)). For the following dataset (15 years, 246 days/year = 3690 days of data) what reasonal parameters for running stl() would folks suggest? I've not had any luck with getting stl() to return any useful information. It continues to stop with the statement series is not periodic or has less than two periods using stl(zHO, s.window=1, s.degree=2, l.window=246) or the obvious ways I might try running stl() (i.e. plot(stl(zHO))). It's possible I've not properly specified the length of expected periodicity as a parameter (246 days in my case). All suggestions are welcome! I'm trying to avoid going back and fitting a linear model with 245 dummy variables. Thanks. Ed __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] help with R
Berton, Firstly, thanks for your comments. To address the what you first said, plotting the 3690-element vector is what is causing R to hang. Rather than lose everything I've entered by hand each interactive run I've switched to using a batch script, which I can now load and run at prompt. Using sink(filename.txt) I'm able to save the output to study. My usage of dummy variables is to identify seasonality on the daily level over 15 years with 246 days per year. I need to identify the day each month when an (expected) event is occuring. The date the event occurs does not occur on necessarily the same day each month. I don't know of another method that could identify these statistically significant seasonal events using R. Dummy variables with a LM is the only method I have experience with using R. If you or anyone has suggestions on what other methods to use I would appreciate some suggestions. Using 245 dummy variables is quite awkward. I see lag() can be used to build a first- or multi-order differenced time series to extract any underlying trend in a time series. Using STL() might be promising. It appears to be similar to other methods I've used with MINITAB but called something different. Nor an ARIMA nor a BSM is really what I need as I'm not focused on performing predictions or modeling of the (possibly non-normal) properties of the residuals. Thanks. All your advice is greatly appreciated. Ed A man is not old until regrets take the place of dreams. Actor John Barrymore From: Berton Gunter [EMAIL PROTECTED] To: 'Ed Wang' [EMAIL PROTECTED], r-help@stat.math.ethz.ch Subject: RE: [R] help with R Date: Tue, 29 Nov 2005 11:05:02 -0800 You're not telling us something or there's a problem with your R build: a 3960 element vectors of integer is tiny and will not cause R to crash. Regarding your regression model. You do **not** need dummy variables in R. Please read the docs (e.g. AN INTRODUCTION TO R) and help files on lm() and factor() to see how to do linear modeling in R. lag() and diff() may also be relevant. OTOH, R has many better ways to model time series and seasonality, both in base R and numerous add-on packages. Try help.search('time series') and RSiteSearch('time series') -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] help with R
Hi, New to R on Windows and also someone trying to learn how to use R in batch. My apologies if this posting is a little long but users may better understand the problems I'm having if I explain what I'm doing. Goal: use R to look at seasonality on a daily level, where I have 15 years of daily data for a 246 day year (proprietary reasons for using this number of days). Data is a large vector of integer data, 3690 elements long. Have found R interactive mode crashes at times dealing with this much data, and it is painful to interactively build this vector over and over. Question 1: is there a way to expand the memory limits of R? On a LINUX box I'm sure there must be a way to specifiy at build how large arrays can be used in R, but this is Windows so I've downloaded a precompiled binary for Windows XP. I also want to use 245 dummy variables with a linear model to identify non-trivial seasonality occuring on certain days. All this makes for quite a bit to type in, which is why I've resorted to writing a batch script. I've tried loading the batch script via the command source(C:\\Program Files\\R\\rw2011\\HO_Rscript.txt) in interactive mode but I get an error. Question 2: can someone point out the syntax flaw in trying to upload this batch script text file? If I can get R to upload the script I can atleast begin to debug it. I am a UNIX 3.0 person by training. If you like you can email me your comments directly [EMAIL PROTECTED] I still can't easily find my way around the R-help mailing list. Sorry, still new to this R-webpage, but enjoy using the package so far! Thanks. Ed Wang __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Finding code for R functions
Greetings, I am trying to figure out how to find the source code for R functions. I am specifically interested in finding the code for the prcomp function. I know that typing the function name without parenthesis will lead to the code (or to a .Internal or .FORTRAN or .C call). However, I don't really understand what is going on. For example, typing mean gives a UseMethod response, while typing mean.default give the actual code: mean function (x, ...) UseMethod(mean) environment: namespace:base mean.default function (x, trim = 0, na.rm = FALSE, ...) ---SNIP--- } environment: namespace:base Why is this? What does mean.default mean? I tried the same thing with prcomp. With the stats package loaded, I cannot get to the source code for prcomp. require(stats) [1] TRUE prcomp function (x, ...) UseMethod(prcomp) environment: namespace:stats prcomp.default Error: object prcomp.default not found How do I find the prcomp code? Are there general rules for finding the source code for functions that I should know? Thanks in Advance, Edward J. Wolfrum, Ph.D. National Renewable Energy Laboratory Golden, Colorado __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] riwish() problem
R users- In moving from R 2.0.0 to R 2.1.0 in Windows, I have encountered a problem with the riwish command in the package MCMCpack. I've searched the documentation and can't seem to figure it out. For example: Define a matrix: lam - matrix(c(.00233,-.00057,-.00057,.00190),2,2) and then use the riwish command to generate a random inverse-Wishart variate: riwish(72,lam) In version 2.1.0, the result is a matrix of very small numbers like: [,1] [,2] [1,] 3.323499e-05 -3.417600e-06 [2,] -3.417600e-06 2.283511e-05 In version 2.0.0, the result is a matrix of larger numbers like: [,1] [,2] [1,] 9.707082 2.228333 [2,] 2.228333 9.037631 This result is consistent across random variates, so I don't think that random variability is the culprit. I suspect that the version 2.0.0 result is correct because my larger program worked under 2.0.0 and did not work under 2.1.0. I have loaded the coda package and VR bundle in each case. I appreciate any and all help/tips. -Ed Merkle __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Problems loading Lapack library
I have just installed R 1.9.1 on an old Sun Sparc with the following specs: version Machine hardware: sun4u OS version: 5.6 Processor type: sparc Hardware: SUNW,Ultra-4 The following components are installed on your system: Sun Visual WorkShop C++ 3.0 Sun WorkShop Compiler C 4.2 Sun WorkShop Compiler C++ 4.2 Sun WorkShop Tools.h++ 7.0 Sun WorkShop Tools.h++ 6.0.4 Sun WorkShop Visual 2.0 Sun WorkShop IPE 4.0 Sun WorkShop CodeManager 2.0 Sun WorkShop Distributed Make 2.0 Sun WorkShop FileMerge 3.0 Sun WorkShop FreezePoint 2.0 Sun WorkShop Maketool 2.0 Sun WorkShop VersionTool 2.0 Sun WorkShop Dbx 4.0 Sun WorkShop Performance Analyzer 4.0 Sun WorkShop LoopTool 2.1 Sun WorkShop LockLint 2.1 Sun WorkShop Thread Analyzer 1.2 Sun WorkShop XEmacs 20.00 Sun WorkShop Professional C 3.0 Sun WorkShop Compiler C 4.2 Sun WorkShop IPE 4.0 Sun WorkShop Dbx 4.0 Sun WorkShop Performance Analyzer 4.0 Sun WorkShop IPE 4.0 Sun WorkShop Compiler FORTRAN 77 4.2 Sun WorkShop Compiler Fortran 90 1.2 Sun Performance Library 1.2 Here are the lines I changed in config.site: R_PAPERSIZE=letter CC=cc -xarch=v8plusa CFLAGS=-xO3 -dalign F77=f90 -xarch=v8plusa FFLAGS=-xO3 -dalign MAIN_LDFLAGS=-xarch=v8plusa LDFLAGS=-L/opt/SUNWspro/lib -L/usr/local/lib CXX=CC -xarch=v8plusa CXXFLAGS=-xO3 -dalign BLAS_LIBS=-xlic_lib=sunperf LAPACK_LIBS=-xlic_lib=sunperf The configure and make steps finished apparently normally, but make check failed. I found that R would start, and do elementary things, but anything involving linear algebra failed: for example, I tried the lm-tests.R file in the tests directory, with the following result: . . . . . . Type 'q()' to quit R. source(tests/lm-tests.R) Error in La.chol2inv(x, size) : lapack routines cannot be loaded In addition: Warning message: unable to load shared library /disk4/home4/ehug/newSoft/R-1.9.1/modules/lapack.so: ld.so.1: /disk4/home4/ehug/newSoft/R-1.9.1/bin/R.bin: fatal: relocation error: file /disk4/home4/ehug/newSoft/R-1.9.1/bin/libRlapack.so: symbol d_sign: referenced symbol not found I don't think d_sign is a symbol in Lapack. Similar things happen with any attempt to use functions that involve Lapack. Can anyone give me some clues about what's happening? Any help would be appreciated. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] accessing function arguments as text, macro style
Hi. In a case like this, I can get strip headings that have the name c and the value for c. d - data.frame(a=1:5,b=6:10,c=11:15) xyplot(a ~ b | paste(c, c), data=d) For more complicated examples, instead of using paste repeatedly I would like to use a function. It seems like what I really want is a macro, though. I'm not quite familiar enough with R's treatment of function parameters to know how to do something like this (ficticious example): f - function(x) { paste(identifier(x), value(x)) } rambo - brave f(rambo) rambo brave I've checked ?function, ?args, ?eval, and some others, but I think I'm barking up the wrong tree. Any pointers would be most appreciated. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] accessing function arguments as text, macro style
Gabor Grothendieck [EMAIL PROTECTED] writes: ... R f - function(x) paste(as.character(substitute(x)),x) R z - 3 R f(z) [1] z 3 Fantastic. Works like a charm. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] getting data frame rows out of a by object
Douglas Bates [EMAIL PROTECTED] writes: ... The point is that factor(paste(...)) returns a factor with length of nrow(d) and with factor levels determined by the combination of levels of a and b (provided that you don't get ambiguities as described above). The split function does not require that the factor determining the splits be part of the data frame being split. It can be given explicitly as it is here. I think I need to look at the source of split when I have more time. [1] If you really want to be cautious you could use an octal representation like sep=\007 to get a character that is very unlikely to occur in a factor level. I definitely want to be cautious. Instead of the bell character I think I'll use the field separator character, \034, just because this is the first time I've been able to use it for it's intended purpose! ;) -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] getting data frame rows out of a by object
Douglas Bates [EMAIL PROTECTED] writes: Ed L Cashin [EMAIL PROTECTED] writes: ... I think I need to look at the source of split when I have more time. ?split is probably a better place to start. I've read that, so I think I need more nitty gritty. [1] If you really want to be cautious you could use an octal representation like sep=\007 to get a character that is very unlikely to occur in a factor level. I definitely want to be cautious. Instead of the bell character I think I'll use the field separator character, \034, just because this is the first time I've been able to use it for it's intended purpose! ;) Yes, but with \034 you don't get to make obscure James Bond references :-). I hadn't thought of that. One thing I notice is that I get funny row names using this method. I can change them back easily enough, though. d a b c 1 1 4 31 2 2 3 32 3 3 2 33 4 4 1 34 11 1 4 41 21 2 3 42 31 3 2 43 41 4 1 44 12 41 0 0 d2 - do.call(rbind, lapply(split(d, factor(paste(d$a, d$b, sep = \034))), function(x) x[x$c == min(x$c),])) d2 a b c 14 1 4 31 23 2 3 32 32 3 2 33 41 4 1 34 410 41 0 0 row.names(d2) - 1:nrow(d2) d2 a b c 1 1 4 31 2 2 3 32 3 3 2 33 4 4 1 34 5 41 0 0 -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Problems with rlm
Dear all, When calling rlm with the following data, I get an error. (R v.1.8.1, WinXP Pro 2002 with service pack 1.) d - na.omit(data.frame(CPRATIO, HEIGHTZ, FAMILYID)) c - tapply(d$CPRATIO, d$FAMILYID, mean) h - tapply(d$HEIGHTZ, d$FAMILYID, mean) c 1 2 3 6 7 910 11 6.00 2.50 3.25 4.00 2.33 2.40 2.75 2.00 12131415161821 22 4.00 5.00 4.00 7.00 4.50 3.50 4.00 5.00 23253031353940 44 6.00 3.00 9.00 10.00 8.00 10.00 4.00 6.00 454750 4.50 5.50 5.00 h 1 2 3 6 7 9 10 -2.7916667 -1.0246838 -2.0681170 -1.3256766 -3.1122708 -2.1444948 -2.5806538 11 12 13 14 15 16 18 -0.6791551 -0.1278583 -3.7737900 -3.3077561 -2.4615233 -3.4016225 -2.2484673 21 22 23 25 30 31 35 -0.8938528 -2.2521325 -2.3461999 -2.1405470 -2.7657994 -3.3588822 -2.8144453 39 40 44 45 47 50 -3.8521439 -2.1882352 -1.7531826 -3.6464482 -2.2158240 -2.7162693 out - rlm(h ~ c) Error in model.matrix.default(mt, mf, contrasts) : cannot allocate vector of length 1077237505 If I make the same rlm call a second or third time, R usually crashes. Any help or suggestions would be greatly appreciated. These commands were run after a much larger script had seemingly run successfully. But, I had no problem calling, e.g., rlm(HEIGHTZ ~ CPRATIO), after the same script had run. Although I have made some minor changes in the script, I also didn't have this problem when using R 1.7. Many thanks in advance, Ed. -- Edward H. Hagen Institute for Theoretical Biology phone: +49/30 2093-8649 Humboldt-Universität zu Berlin fax: +49/30 2093-8801 Invalidenstraße 43 http://itb.biologie.hu-berlin.de/~hagen 10115 Berlin, Germany __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Problems with rlm
Erin Hodgess wrote: Please don't use c as a vector name. There is a function c and that function gets overwritten. Thanks for that tip. I was actually using different variable names in my script, but simplified them for the posting. I just tried it using the names 'cpavg' and 'havg'. The first time I called rlm it worked, but I got the following errors the second and third time I ran it: out - rlm(havg ~ cpavg) Error: cannot allocate vector of size 4178828 Kb out - rlm(havg ~ cpavg) Error in model.matrix.default(mt, mf, contrasts) : negative length vectors are not allowed Liaw, Andy wrote: You have not given us nearly enough info. What OS / R version / MASS version (you are using MASS, no?) are you using? WinXP Pro 2002. Service Pack 1. 512K RAM. R v. 1.8.1. MASS v. 7.1-11. AMD Athlon XP 2600+, 1.91. GHz. Do you have lots of other stuff in the workspace when you tried to run this? Yes. A lot of stuff is needed to produce the variables CPRATIO and HEIGHTZ What does gc() tell you? After running the script, but before running the code in question: used (Mb) gc trigger (Mb) Ncells 720521 19.31073225 28.7 Vcells 209563 1.6 786432 6.0 gc() called during and after running the code in question: d2 - na.omit(data.frame(CPRATIO, HEIGHTZ, FAMILYID)) cavg - tapply(d2$CPRATIO, d2$FAMILYID, mean) havg - tapply(d2$HEIGHTZ, d2$FAMILYID, mean) gc() used (Mb) gc trigger (Mb) Ncells 720802 19.31166886 31.2 Vcells 210286 1.7 786432 6.0 out - rlm(havg ~ cavg) Error in model.matrix.default(mt, mf, contrasts) : cannot allocate vector of length 2146959361 gc() used (Mb) gc trigger (Mb) Ncells 720819 19.31166886 31.2 Vcells 210334 1.7 786432 6.0 As I noted in my first posting, rlm works fine with CPRATIO and HEIGHTZ, which are much larger datasets, if that's any clue (though even CPRATIO and HEIGHTZ are still quite small: 85 cases each). After running the main script, I ran out - rlm(HEIGHTZ ~ CPRATIO) about 20 consecutive times with no problems. Yet running rlm with the smaller havg and cavg immediately produces errors, and R will usually crash after the second or third attempt. Many thanks for the quick responses, Ed. -- Edward H. Hagen Institute for Theoretical Biology phone: +49/30 2093-8649 Humboldt-Universität zu Berlin fax: +49/30 2093-8801 Invalidenstraße 43 http://itb.biologie.hu-berlin.de/~hagen 10115 Berlin, Germany __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] getting data frame rows out of a by object
Hi. I can quickly create a by object that selects rows from a data frame. After that, though, I don't know how to merge the rows back into a data frame that I can use. Here is an example where there is a data frame with three columns, a, b, and c. I update it so that there are two rows for each combination of a and b. I use by to select the subgroups of rows that share the same a and b values, and then I take only the row with the highest c value. I can see little data frames inside the by object, but I can't get a new data frame containing only the rows with the highest c value. In the example below most of the by object is NULL, but it contains data frames with the rows I'm interested in selecting. d - data.frame(a=1:4,b=4:1,c=31:34) d a b c 1 1 4 31 2 2 3 32 3 3 2 33 4 4 1 34 b - by(d, list(d$a,d$b,d$c), function(x) x) d - data.frame(a=1:4,b=4:1,c=31:34) d - rbind(d, data.frame(a=1:4,b=4:1,c=41:44)) b - by(d, list(d$a,d$b,d$c), function(x) x[x$c == max(x$c),]) b : 1 : 1 : 31 NULL : 2 : 1 : 31 NULL ... : 3 : 2 : 43 a b c 31 3 2 43 ... merge(b) Error in as.data.frame.default(x) : can't coerce by into a data.frame Any help is most appreciated. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] getting data frame rows out of a by object
Julian Taylor [EMAIL PROTECTED] writes: ... You are better off using other tools to give you the right subsets. Try d - do.call(rbind, lapply(split(d, factor(paste(d$a, d$b, sep = ))), function(el) el[el$c == max(el$c), ])) That does work, thanks. I am a bit mystified by the use of paste, factor, and split together like that. By concatenating the columns as strings, you are coming up with values that aren't in any one column of the data frame, but split doesn't care. That's surprising. I thought this method was dangerous, so I tried to fool split by adding a column-a value that was the same as the concatenation of other column-a and column-b values, 41. Split knows to work with both column a and column b, though, somehow. I guess paste does more than I thought. d - rbind(d, data.frame(a=41,b=0,c=0)) split(d, factor(paste(d$a, d$b, sep = ))) $14 a b c 1 1 4 31 11 1 4 41 $23 a b c 2 2 3 32 21 2 3 42 $32 a b c 3 3 2 33 31 3 2 43 $41 a b c 4 4 1 34 41 4 1 44 $410 a b c 12 41 0 0 -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] row selection based on median in data frame
Ed L Cashin [EMAIL PROTECTED] writes: ... Is there a way to tell aggregate just do perform median on column runtime to select the whole row? Some helpful folks have emailed me requesting more info about what I'm trying to do. Here's a simple R function to produce a data frame like the one I am working on. demo.frame - function() { n.runs - 3 types - c(red,black,blue) foo - 1:5 bar - seq(50,90,by=10) d - data.frame() for (i in 1:n.runs) { for (t in types) { for (f in foo) { for (b in bar) { row - data.frame(type=t, foo=f, bar=b, a=rnorm(1), b=rnorm(1), c=rnorm(1)) d - rbind(d,row) } } } } d } Every so often, in the resulting rows, you get a row where the type, the foo, and the bar values are all the same. I need to look at the rows with such a matching set of values as a group, selecting the one row with the median c value, and preserving all of that row's other values. So median should not be done on the a or b columns, just the c column. There are two ways I see to approach this problem. One would be: for each subset of rows with matching type, foo, and bar values, find the row with the median c value and output it The other, which I've been able to do, takes advantage of knowledge about the sequence of rows in the data frame: median.runs - function(d, n.runs=0) { if (missing(n.runs)) stop(missing n.runs parameter is required) len - length(d$type) / n.runs i - c() # build an index that will select similar rows for (n in 0:(n.runs - 1)) { i[n + 1] - n * len + 1 } a - list() for (j in 1:len) { cat(i:,i,\n) rows - d[i,] md - median(rows$c) cat(md:,md,\n) matches - rows[rows$c == md,] a - rbind(a, matches[1,]) i - i + 1 } a } -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] row selection based on median in data frame
Hi. I am having trouble thinking of an easy way to grab rows out of a data frame. I want to select the rows with a median value when the rows are similar. A simple example is this table, which I could read into a data frame. I would like to find a new data frame with only the rows with a median value for the c column given a certain a value. For example, the c values for deadlift rows are 13, 8, and 5, so the row with a c value of 8 should show up in the output. a b c 1 deadlift 7 13 2 squat 7 24 3 clean 7 10 4 deadlift 8 8 5 squat 8 20 6 clean 8 2 7 deadlift 9 5 8 squat 9 32 9 clean 9 19 Result: a b c 4 deadlift 8 8 5 squat 8 20 3 clean 7 10 It's more complicated in my case, because I have not just one a column, but about eight columns that have to be the same. I can do this with clumsy loops, but I wonder whether there's a better way. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] row selection based on median in data frame
Ed L Cashin [EMAIL PROTECTED] writes: Hi. I am having trouble thinking of an easy way to grab rows out of a data frame. I want to select the rows with a median value when the rows are similar. I'm still catching up on my R list reading, and I notice there is a similar post to mine: Federico Calboli data manipulation: getting mean value every 5 rows I think the responses there answer my question, but I'll have to look into it. The responses say to use aggregate and an auxiliary row. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] row selection based on median in data frame
Ed L Cashin [EMAIL PROTECTED] writes: Ed L Cashin [EMAIL PROTECTED] writes: Hi. I am having trouble thinking of an easy way to grab rows out of a data frame. I want to select the rows with a median value when the rows are similar. I'm still catching up on my R list reading, and I notice there is a similar post to mine: Federico Calboli data manipulation: getting mean value every 5 rows I think the responses there answer my question, but I'll have to look into it. The responses say to use aggregate and an auxiliary row. After consulting the docs and Venables and Ripley, I am not sure aggregate can do what I'm looking for. Given rows where certain specified columns have the same values, I'd like to select the row with the median value in another specified column (runtime). That is, after grouping the rows of the data frame based on the columns in the by parameter, I want to select one whole row as is, the row with the median runtime value, without doing median on more than one column. 'aggregate.data.frame' is the data frame method. If 'x' is not a data frame, it is coerced to one. Then, each of the variables (columns) in 'x' is split into subsets of cases (rows) of identical combinations of the components of 'by', and 'FUN' is applied to each such subset with further arguments in '...' passed to it. (I.e., 'tapply(VAR, by, FUN, ..., simplify = FALSE)' is done for each variable 'VAR' in 'x', conveniently wrapped into one call to 'lapply()'.) Is there a way to tell aggregate just do perform median on column runtime to select the whole row? Empty subsets are removed, and the result is reformatted into a data frame containing the variables in 'by' and 'x'. The ones arising from 'by' contain the unique combinations of grouping values used for determining the subsets, and the ones arising from 'x' the corresponding summary statistics for the subset of the respective variables in 'x'. I'd like to select all the columns, not just the ones I'm using to group or the one from which I want to find the median value. I think I can't use aggregate after all. But I must admit I'm very tired and should go to bed. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Time for Usenet R Group?
Roger D. Peng [EMAIL PROTECTED] writes: Marc R. Feldesman wrote: I agree with you on the flood of messages lately. Often this flood accompanies a new release, but this flood has continued unabated for longer than I would have imagined. The good news is that R is becoming more popular and this (hopefully) attracts more developers, which results in more libraries, etc. The bad news is that with more users come more questions. I don't consider that bad news. That's just how it is. As far as I can see, it's all good news :) I never used the mailing list directly, but always via NNTP, since gmane acts as a gateway for the R mailing list. www.gmane.org It has several anti-spam features in place already. So if you want to switch, it's very easy. Just point your favorite news client to news.gmane.org and start reading gmane.comp.lang.r.general. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Time for Usenet R Group?
Marc R. Feldesman [EMAIL PROTECTED] writes: At 12:28 PM 3/17/2004, Ed L Cashin wrote: I hope this response isn't indicative of the speed with which gmane posts messages. I think this entire thread was more than 7 or 8 months ago, possibly longer. Your hopes are fulfilled. The reason is simply that I am catching up and just got around to this thread. -- --Ed L Cashin| PGP public key: [EMAIL PROTECTED]| http://noserose.net/e/pgp/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Formatting axis label numbers on plots
Is there any way to control the format of the axis label numbers on a plot? More specifically, I have some plots that get axes with label numbers in exponential format, and I'd like to change that to non-exponential. Thanks!! -- M. Edward (Ed) Borasky, MS, MNLP, NST, FBG, PGS PTA [EMAIL PROTECTED] http://www.borasky-research.net __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] frustration with ave()
Dear All, I'm confused why I'm getting NA's in the output from ave() (at the end). Any help would be greatly appreciated. I'm including the data in case that is where the problem lies: f - factor(FAMILYID) bodyfat - na.omit(data.frame(loessBODYFAT, f)) bodyfat$loessBODYFAT [1] -8.950153e-01 -9.175285e-01 3.174061e-01 -2.101260e-01 2.534174e-02 [6] 1.846599e-01 8.322865e-01 1.348331e+00 1.241318e+00 1.634000e+00 [11] 1.611048e+00 6.824926e-01 2.346168e+00 2.924673e-01 6.919381e-01 [16] 3.142321e-01 -5.615214e-01 9.196103e-01 -1.290328e+00 -1.798727e+00 [21] -1.011590e-01 7.051146e-01 -1.254440e+00 1.189397e+00 -7.017545e-01 [26] 2.290020e-02 -1.451774e+00 -6.124868e-01 -4.780954e-01 3.237365e+00 [31] 1.595977e+00 5.950309e-01 -4.699706e-01 -2.153001e-01 -3.248170e-01 [36] -5.295042e-01 2.780444e-01 -5.878282e-01 -3.325859e-01 -7.690049e-02 [41] 4.991054e-01 -4.410101e-01 9.133328e-01 1.429758e+00 -8.484772e-01 [46] -1.004829e-01 1.769479e-01 3.892871e-01 7.209969e-01 3.759455e-01 [51] 3.982560e-02 -1.702333e-01 -3.622422e-01 -2.893234e-01 -9.769459e-01 [56] -1.935057e+00 -3.881132e-01 -1.037270e-02 2.561803e-01 3.884395e+00 [61] -2.234557e-01 -6.893120e-01 3.531379e-01 -1.726464e+00 7.136614e-02 [66] -4.278400e-01 -3.756271e-01 5.494344e-02 6.545344e-01 4.999740e-01 [71] 4.911730e-01 -1.296921e-05 3.166220e+00 2.715371e-01 -6.104207e-01 [76] 1.893740e+00 1.031131e+00 -5.917449e-01 -7.442768e-01 2.503388e+00 [81] -4.087622e-01 4.399654e-01 -8.355297e-01 3.964619e-01 2.672100e-01 [86] -3.927630e-01 -1.295004e+00 -1.874215e-01 -9.548985e-01 -1.366311e-01 [91] -1.352021e+00 -9.658552e-01 -1.190914e+00 -1.910233e+00 -7.595405e-02 [96] -1.648916e-01 -1.743877e-01 -1.234058e-01 -1.723277e+00 -7.316183e-01 [101] -8.062482e-01 -8.386729e-02 3.672521e-01 -7.525477e-01 -7.851946e-01 [106] -5.464147e-01 -1.454035e-01 -2.447245e-01 -4.732026e-01 -5.131587e-02 [111] -4.651404e-01 9.230189e-02 9.773851e-01 1.293947e-01 -3.261368e-01 [116] -1.671177e+00 -2.615938e-01 8.152311e-01 1.757506e-01 4.018943e-01 [121] -6.631180e-01 -1.839677e-01 bodyfat$f [1] 1 1 1 1 1 2 3 3 3 3 3 3 3 3 3 3 4 5 6 6 6 7 7 [24] 7 7 8 9 9 9 9 9 9 9 9 9 9 9 10 10 10 11 11 11 11 12 12 [47] 12 12 13 13 13 14 14 14 15 15 15 15 15 16 16 16 16 16 16 16 16 18 18 [70] 18 18 20 21 21 22 22 22 23 23 23 23 23 25 25 25 30 30 30 31 31 31 31 [93] 35 35 35 35 35 35 37 37 39 39 39 39 39 39 39 39 40 40 44 44 45 45 45 [116] 47 47 47 47 50 50 50 50 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ... 50 ave(bodyfat$loessBODYFAT, bodyfat$f) [1] -3.359844e-01 -3.359844e-01 -3.359844e-01 -3.359844e-01 -3.359844e-01 [6] 1.846599e-01 1.099428e+00 1.099428e+00 1.099428e+00 1.099428e+00 [11] 1.099428e+00 1.099428e+00 1.099428e+00 1.099428e+00 1.099428e+00 [16] 1.099428e+00 -5.615214e-01 9.196103e-01 -1.063405e+00 -1.063405e+00 [21] -1.063405e+00 -1.542074e-02 -1.542074e-02 -1.542074e-02 -1.542074e-02 [26] 2.290020e-02 1.476790e-01 1.476790e-01 1.476790e-01 1.476790e-01 [31] 1.476790e-01 1.476790e-01 1.476790e-01 1.476790e-01 1.476790e-01 [36] 1.476790e-01 1.476790e-01 -3.324382e-01 -3.324382e-01 -3.324382e-01 [41] 6.002965e-01 6.002965e-01 6.002965e-01 6.002965e-01 -9.568124e-02 [46] -9.568124e-02 -9.568124e-02 -9.568124e-02 3.789227e-01 3.789227e-01 [51] 3.789227e-01 -2.739330e-01 -2.739330e-01 -2.739330e-01 -6.108618e-01 [56] -6.108618e-01 -6.108618e-01 -6.108618e-01 -6.108618e-01 1.082750e-01 [61] 1.082750e-01 1.082750e-01 1.082750e-01 1.082750e-01 1.082750e-01 [66] 1.082750e-01 1.082750e-01 -1.296921e-05 -1.296921e-05 -1.296921e-05 [71] -1.296921e-05 7.714833e-01 2.397139e-01 2.397139e-01 -5.728595e-02 [76] -5.728595e-02 -5.728595e-02 -6.250627e-01 -6.250627e-01 -6.250627e-01 [81] -6.250627e-01 -6.250627e-01 -6.066309e-01 -6.066309e-01 -6.066309e-01 [86] 2.602143e-01 2.602143e-01 2.602143e-01 -2.354473e-01 -2.354473e-01 [91] -2.354473e-01 -2.354473e-01NANANA [96]NANANANANA [101]NANANANANA [106]NANANANANA [111]NANANANANA [116]NANANANANA [121]NANA Thanks in advance, Edward H. Hagen Institute for Theoretical Biology phone: +49/30 2093-8649 Humboldt-Universität zu Berlin fax: +49/30 2093-8801 Invalidenstraße 43 http://itb.biologie.hu-berlin.de/~hagen 10115 Berlin, Germany __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help