Re: [R] Data frame manipulation

2010-05-29 Thread Tal Galili
Hi there, I am glad it helped. I used mean as something to use, not because I had an understanding that this is what you need - so if you believe sum is what you where after - go with it :) Regarding loving R, and time spending - everyone on this list probably know how you feel. We all spent

Re: [R] Matrix interesting question!

2010-05-29 Thread Jim Lemon
On 05/29/2010 02:30 AM, UM wrote: hi, I have been trying to do this in R (have implemented it in Excel) but I have been using a very inefficent way (loops etc.). I have matrix A (columns are years and ages are rows) and matrix B (columns are birth yrs and rows are ages) I would like to first

Re: [R] ICD9 codes

2010-05-29 Thread Vishwanath Sindagi
Dear Prof Frank Harrel: I am extremely sorry for having reposted the same question numerous times. Earlier when I had posted I got replies stating that my post had matched a filter rule and hence was being held by the moderator. So I assumed that the question was never posted and I reposted with

[R] adding statistical output to a plot

2010-05-29 Thread dunner
I have written a function to emulate minitab's QQ plotting output (with SW test and AD test results on the graph): mtab.norm-function(x) { library(nortest) library(lattice) x-as.numeric(x) x-as.vector(x) plot.ht-4.6 plot.wd-4.6 pt.ht=plot.ht/5 txt.sz-(plot.ht/7.5) X11(width=plot.wd,

Re: [R] adding statistical output to a plot

2010-05-29 Thread Tal Galili
Two things: 1) doing log on rnorm, will get you NaN's because you are doing log on a negative number (some of the time). 2) Running traceback() 5: sort(y) 4: qqplot(x, pch = 16, cex = pt.ht, col = palette()[c(1, 2)], xlab = paste(colnames(x)), ylab = Normal Quantile-Quantile Plot, main =

Re: [R] ICD9 codes

2010-05-29 Thread Ted Harding
It is perhaps time to bring to people's general attention that there is an issue with postings from gmail.com addresses being held for moderation because The headers matched a filter rule. It is not only gmail.com, but there is a marked excess of these. Vishwanath (@gmail.com) is one of many

Re: [R] ICD9 codes

2010-05-29 Thread Duncan Murdoch
I have received the Matched a Filter Rule message a number of times. I have some control over what the headers of my messages look like, so if I was told what the filter rule is, I could perhaps modify the messages to avoid it. You probably don't want to post that information to the list,

Re: [R] adding statistical output to a plot

2010-05-29 Thread Jim Lemon
On 05/29/2010 07:39 PM, dunner wrote: I have written a function to emulate minitab's QQ plotting output (with SW test and AD test results on the graph): ... However, I get the following message when I try to apply it: ab-rnorm(1:100, 2) aa-log(ab) Warning message: In log(ab) : NaNs produced

Re: [R] adding statistical output to a plot

2010-05-29 Thread dunner
Thanks to both of you, I used the below code instead, which has been cleaned and pruned a little. It produces a trellis of qq plots with the proper annotations as per Minitab from a dataframe passed to mtab.matrix(). However, I can't get individual variable names (these are column names in the

Re: [R] adding statistical output to a plot

2010-05-29 Thread David Winsemius
On May 29, 2010, at 8:11 AM, dunner wrote: Thanks to both of you, I used the below code instead, which has been cleaned and pruned a little. It produces a trellis of qq plots with the proper annotations as per Minitab from a dataframe passed to mtab.matrix(). However, I can't get

[R] plotting density in same plot in loop iteration

2010-05-29 Thread Niklaus Hurlimann
Hi R-mailing list I would have the following set-up below with a simplified data-frame. Through a loop which includes certain criteria for the densities I would like to plot the different density-distributions in the same plot. Of course I hope I don't do any mistakes with all the indexes of the

Re: [R] adding statistical output to a plot

2010-05-29 Thread Tal Galili
Hi Dunner, The way I usually resolve this is by extracting the names with colnames and then reinsert them to the new object. BTW, why are you trying to reproduce the image from minitab? what features in it do you find useful ? Best, Tal Contact

Re: [R] ICD9 codes

2010-05-29 Thread Frank E Harrell Jr
Thanks for both your note Ted and Vishwanath. I had no idea this was going on. Sincerely, Frank On 05/29/2010 05:43 AM, (Ted Harding) wrote: It is perhaps time to bring to people's general attention that there is an issue with postings from gmail.com addresses being held for moderation

[R] warning In fun(...) : no DISPLAY variable so Tk is not available

2010-05-29 Thread Nevil Amos
I am getting the above warning following loading of Geneland 3.1.5 on unix , while a simple plot sends output to the pdf file ( see attached code) no output results from Geneland functions, resulting in empty pdf files library (Geneland) Loading required package: RandomFields Loading

Re: [R] ICD9 codes

2010-05-29 Thread Kevin E. Thorpe
I'm not sure we know exactly what the filters are griping about. One other aspect the Ted didn't mention is that posts from the Nabble interface also seem to get trapped, especially with a gmail address, but that doesn't apply in Duncan's case. Duncan Murdoch wrote: I have received the Matched

Re: [R] logarithmic integrals in R?

2010-05-29 Thread Hans W. Borchers
Oliver Kullmann O.Kullmann at swansea.ac.uk writes: Hello, I couldn't find information on whether the logarithmic integrals Li_m(x) = integral_0^x log(t)^(-m) dt for x = 0 are available in R? I saw your request only this weekend. The first logarithmic integral can be computed using

[R] how to run the R script in windows in background mode or script mode?

2010-05-29 Thread Jie TANG
Hello,everyone . Now I write some R scripts to calculate some variables and I run them in C shell script command in linux.. Now my some new R scripts had to be moved in someother's computer with windows system. How to run these R scripts easily without installing many soft package? -- TANG

[R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-29 Thread Marc Schwartz
Hi all, There have been posts in the past about R being made available for the iPhone and perhaps more logically now, on the iPad. My recollection is that the hurdle discussed in the past was primarily a lack of access to a CLI on the iPhone's variant of OSX, compelling the development of a

[R] Help with R graphics

2010-05-29 Thread Fabian
I need to make a plot illustrating main characterisitig of river drainage data. For this I have 2 questions: how can I rotate a histogram -90° (or 270°) (like the horizontal=TRUE with plot)? how can I use split.screen to produce 3 plot with uneuqal size (1/5, 2/5, 2/5 of the screen width)?

Re: [R] Help with R graphics

2010-05-29 Thread Marc Schwartz
On May 29, 2010, at 9:54 AM, Fabian wrote: I need to make a plot illustrating main characterisitig of river drainage data. For this I have 2 questions: how can I rotate a histogram -90° (or 270°) (like the horizontal=TRUE with plot)? how can I use split.screen to produce 3 plot with

Re: [R] warning In fun(...) : no DISPLAY variable so Tk is not available

2010-05-29 Thread Duncan Murdoch
Nevil Amos wrote: I am getting the above warning following loading of Geneland 3.1.5 on unix , while a simple plot sends output to the pdf file ( see attached code) no output results from Geneland functions, resulting in empty pdf files That message is saying it can't find an X11 server

[R] simpleError in storage.mode(y)

2010-05-29 Thread anzid
bonjour en travaillant avec un logiciel Multiple source methode, j'ai eu ce message d'erreur : simpleError in storage.mode(y) - double: invalid to change the storage mode of a factor en recherchant sur le net , c'est un message universel svp, que signifiera ce message ? merci pour votre intérêt

Re: [R] Linear Discriminant Analysis in R

2010-05-29 Thread cobbler_squad
Thanks for being patient with me. I guess my problem is with understand how grouping in this particular case is used: one of the sample codes I found online (http://www.statmethods.net/advstats/discriminant.html) library(MASS) fit - lda(G ~ x1 + x2 + x3, data=mydata, na.action=na.omit, CV=TRUE)

Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-29 Thread Lanre Okusanya
Android FTW? On Sat, May 29, 2010 at 11:12 AM, Marc Schwartz marc_schwa...@me.com wrote: Hi all, There have been posts in the past about R being made available for the iPhone and perhaps more logically now, on the iPad. My recollection is that the hurdle discussed in the past was primarily

Re: [R] logarithmic integrals in R?

2010-05-29 Thread Oliver Kullmann
Thanks for the information. On Sat, May 29, 2010 at 01:15:29PM +, Hans W. Borchers wrote: Oliver Kullmann O.Kullmann at swansea.ac.uk writes: Hello, I couldn't find information on whether the logarithmic integrals Li_m(x) = integral_0^x log(t)^(-m) dt for x = 0 are

Re: [R] simpleError in storage.mode(y)

2010-05-29 Thread anzid
hello, I am working with multiple source software method, I got this error message: simpleError in storage.mode (y) - double: invalid to change the mode of a storage factor searching the net is a universal message please, what does mean this message? thank you for your interest anzid -- View

Re: [R] Linear Discriminant Analysis in R

2010-05-29 Thread Joris Meys
It's not your questions, Cobbler, but could you PLEASE just do what we asked for? Copy-paste the following in R and copy-paste ALL output you get in your next mail. test.vowel - vowel_features[,1:10] test.mask - mask_features[,1:10] dput(test.vowel) dput(test.mask) I don't know whether your

[R] modifying only certain rows in a data-frame

2010-05-29 Thread ANJAN PURKAYASTHA
Hi, I have a data-frame r (shown below is a subset) with the following column names: datetimesamplevctnormhctdeltact $time has 8 levels: 0h, 0.5h, .24h. $deltact holds real numbers. I want to subset this dataframe by the levels of $time. For all the rows which have

Re: [R] modifying only certain rows in a data-frame

2010-05-29 Thread jim holtman
try something like: r$deltact[r$time == '0h'] - 0 On Sat, May 29, 2010 at 7:50 PM, ANJAN PURKAYASTHA anjan.purkayas...@gmail.com wrote: Hi, I have a data-frame r (shown below is a subset) with the following column names: date    time    sample    vct    norm    hct    deltact $time has 8

[R] Count the number of consecutive 1's

2010-05-29 Thread Phyllis Hui-Min Chan
Hi All, We have a raw dataset that, on the sampling time column, for example: t - c(0,1,2,5,0,5,0,2,5) And we need to create a second column that indicates the day of the sampling, so the end result of what we want is a vector: 1,1,1,1,2,2,3,3,3 Additional information that might simplify the

Re: [R] Count the number of consecutive 1's

2010-05-29 Thread jim holtman
Assuming that each day does start with 0, this should do it: t - c(0,1,2,5,0,5,0,2,5) cumsum(t==0) [1] 1 1 1 1 2 2 3 3 3 On Sat, May 29, 2010 at 8:33 PM, Phyllis Hui-Min Chan h-mc...@hotmail.com wrote: Hi All, We have a raw dataset that, on the sampling time column, for example: t -

[R] Question about package coin

2010-05-29 Thread Bryan Keller
Anyone know if coin can run a permutation test based on a (user-defined) statistic other than the mean difference? The function independence_test does the permutation t-test via difference in means. I'm wondering if it's possible to use independence_test to run a permutation test for some

Re: [R] Selecting first 7 elements

2010-05-29 Thread Kang Min
What if I want to select the 8th to 14th element of the list? I tried to use [ again, but it doesn't work. [ is a function, and you want to use it on each element of the list, so... lapply(x, [, c(1:7)) and the call to c() is of course not necessary, since : will generate a

[R] Using RODBC to read CSV

2010-05-29 Thread Yilong Zhang
Hi all, When I use ODBC to manage my datasets, I have a question about sqlFetch below. It seems that my datasets have successfully been identified but the function sqlFetch get an error when I want to read the table. And below is the questionable code. Thanks for your help! library(RODBC)

[R] How to interpret a result based on wmtsa

2010-05-29 Thread Moohwan Kim
Dear R family I have a question as to how to get an answer I want to derive with the outcome from R-package, wmtsa. My concern is that I want to decide equivalent degrees of freedom (EDOF) based on the following outcome. library(wmtsa) W - wavMODWT(X, wavelet=s8) z1 - wavEDOF(W) print(z1)

[R] what command to use for standization

2010-05-29 Thread Philip Wong
what command to use to standardize my data to mean = 0, and SD=1. the data I want to standardize/centroid is in column format. So I'm thinking of using: col.mean.stdised=apply(data.df,2,function(z){z-mean(z)}) but, what command should I use to put my SD =1? Thanks! -- View this message in

Re: [R] what command to use for standization

2010-05-29 Thread Jorge Ivan Velez
?scale HTH, Jorge On Sun, May 30, 2010 at 12:20 AM, Philip Wong wrote: what command to use to standardize my data to mean = 0, and SD=1. the data I want to standardize/centroid is in column format. So I'm thinking of using: col.mean.stdised=apply(data.df,2,function(z){z-mean(z)}) but,

[R] Vector docs

2010-05-29 Thread i...@whywouldwe.com
Hi The docs for R are very practical, which is quite refreshing compared to other languages, however I can't find any details about all the things I can do with a vector. I'm expecting methods like vector.contains('foo') and vector.remove('foo'), maybe those methods don't exist but I'd love