[R] How to programme R to randomly replace some X values with Outliers

2010-10-03 Thread Hock Ann Lim
Dear experts, I am a beginner of R. I'm looking for experts to guide me how to do programming in R in order to randomly replace 5 observations in X explanatory variable with outliers drawn from U(15,20) in sample size n=100. The replacement subject to y 15. The ultimate goal of my study is to

Re: [R] How many R packages are not free?

2010-10-03 Thread Prof Brian Ripley
On Sat, 2 Oct 2010, Peter Dalgaard wrote: On 10/02/2010 07:38 PM, Spencer Graves wrote: Is there anything on CRAN that is NOT free? I assumed that CRAN had a policy of not accepting anything that could not be freely distributed, but I could not find any such statement in a quick

Re: [R] How to programme R to randomly replace some X values with Outliers

2010-10-03 Thread Joshua Wiley
Dear Hock Ann, I am not sure of all your requirements, but this should at least get you started. I show it by hand and also wrapped up in a function. In the function I made two density plots that I thought might be interesting to you, you can just delete those two lines of code if you do not

Re: [R] How to programme R to randomly replace some X values with Outliers

2010-10-03 Thread Michael Bedward
N - 100 Nrep - 5 X - runif(N, 0, 10) Y - 6 + 2*X + rnorm(N, 0, 1) X[ sample(which(Y 15), Nrep) ] - runif(Nrep, 15, 20) Hope this helps, Michael On 3 October 2010 16:12, Hock Ann Lim lim...@yahoo.com wrote: Dear experts, I am a beginner of R. I'm looking for experts to guide me how to do

[R] Modifying a data.frame

2010-10-03 Thread Bapst Beat
Hello list members I have a problem with modifying a data.frame. As an example given is a data.frame called ex : ex-data.frame(id=c(1,2,3,4,5,6),obs=c(14,9,20,36,55,47),eff=c(A,A,B,C,C,C)) After that I would like to modify the object ex with the following short script: for (i in ex) {

[R] Deducer and Contingency Tables

2010-10-03 Thread Jim Watkins
Is there a way to use Deducer to analyze contingency table data that is only available in a row-by-column summary form (not a data frame)? Thanks. Jim Watkins __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Non-Parametric Adventures in R

2010-10-03 Thread Jamesp
I just started using R and I'm having all sorts of fun trying different things. I'm going to document the different things I'm doing here as a kind of case study. I'm hoping that I'll get help from the community so that I can use R properly. Anyways, in this study, I have demographic data,

Re: [R] Problem with ggplot2 - Boxplot

2010-10-03 Thread RaoulD
Thanks a lot Hadley, this worked. Regards, Raoul -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-ggplot2-Boxplot-tp2549970p2952914.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Output Graphics GIF

2010-10-03 Thread Nilza BARROS
On Mon, Sep 27, 2010 at 11:31 AM, Tal Galili tal.gal...@gmail.com wrote: I am guessing you are saving the plot using the menu system. If that is the case, have a look at: ?pdf ?png Generally, I like saving my graphics to pdf since it is vectorized. Cheers, Tal

[R] Help with panel.text in Lattice - Putting labels for co-oridnates in a plot

2010-10-03 Thread RaoulD
Hi, I am trying to create a Lattice dotplot that has the following data graphed. I need to put labels for each of the co-oridnates on the plot. I have managed to get only one label dispalyed as I don't completely understand the panel.text function. Can someone please help me? # Sub Reason is a

Re: [R] Non-Parametric Adventures in R

2010-10-03 Thread Tal Galili
Dear Jamesp, This might be (more?) fitting for a blog then the R-help mailing list. I'd suggest you to open a blog on (it takes less then 4 minutes): wordpress.com It now has syntax highlighting for R code: http://www.r-statistics.com/2010/09/r-syntax-highlighting-for-bloggers-on-wordpress-com/ I

Re: [R] Tinn R

2010-10-03 Thread Philippe Glaziou
On 2 October 2010 19:21, Tal Galili tal.gal...@gmail.com wrote: Hi Raphael, Why won't you try notepad++ with npptor ? It does almost everything tinnR does. While alternatives to popular windows editors are being mentioned here, I feel like Gvim (http://www.vim.org/) along Vim-R-plugin2

[R] Include externally generated pdf in output (without Sweave)

2010-10-03 Thread Dieter Menne
Dear useRs, I generated a simple image-based report using the sequence: pdf() plot(.) textplot( for short texts, from gplots) dev.off() Is there an easy way to include an single pdf-page from an external file (not R generated). Note: For final reports, I know how to use Sweave, but I

Re: [R] Modifying a data.frame

2010-10-03 Thread Jeffrey Spies
You should examine what is being looped over when you use a for loop with the i in dataframe syntax: j-1; for(i in ex){ cat('step', j, i, sep= , fill=T); j-j+1} As you can see, each column in ex is being set to i for each step of the for loop. Instead, it seems that you want to step over every

[R] Ranked Set Sampling

2010-10-03 Thread Ahmed Albatineh
Dear R Users; Are you aware of any package that calculates Ranked Set Sample? If you have a code that you are willing to share, I will acknowledge that in my work. Thanks much Ahmed [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Non-Parametric Adventures in R

2010-10-03 Thread Peter Dalgaard
!!

Re: [R] Non-Parametric Adventures in R

2010-10-03 Thread Johannes Huesing
Jamesp james.jrp...@gmail.com [Sat, Oct 02, 2010 at 11:27:09PM CEST]: [...] 1) I was thinking I'd have to go through each nominal variable (i.e. table(X$race) ), but I think I have it figured

Re: [R] Output Graphics GIF

2010-10-03 Thread Mike Marchywka
Date: Sat, 2 Oct 2010 23:59:50 -0300 From: nilzabar...@gmail.com To: tal.gal...@gmail.com CC: r-help@r-project.org Subject: Re: [R] Output Graphics GIF On Mon, Sep 27, 2010 at 11:31 AM, Tal Galili wrote: I am guessing you are saving the plot

Re: [R] Include externally generated pdf in output (without Sweave)

2010-10-03 Thread Tal Galili
Hello Dieter, Looking at this thread (from 2005) http://tolstoy.newcastle.edu.au/R/help/05/10/14320.html It seems you can't read a pdf file to R (at least then, I hope there was an update since). BUT You could potentially read an image file (like, for example, tiff) using something like

Re: [R] Deducer and Contingency Tables

2010-10-03 Thread Tal Galili
Hi Jim, It might be worth to also ask this in the deducer google group: http://groups.google.com/group/deducer?pli=1 Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com

[R] Package for converting R datasets into SQL Server (create table and insert statements)?

2010-10-03 Thread johannes rara
Hi, R contains many good datasets which would be valuable in other platforms as well. My intention is to use R datasets on SQL Server as a sample tables. Is there a package that would do automatic conversion from the dataset schema into a SQL Server CREATE TABLE statement (and INSERT INTO

Re: [R] Include externally generated pdf in output (without Sweave)

2010-10-03 Thread baptiste auguie
Hi, Check the grImport package (I think it has a vignette, perhaps on Paul Murrell's homepage.) HTH, baptiste On 3 October 2010 14:52, Tal Galili tal.gal...@gmail.com wrote: Hello Dieter, Looking at this thread (from 2005) http://tolstoy.newcastle.edu.au/R/help/05/10/14320.html It seems

Re: [R] Tinn R

2010-10-03 Thread Ajay Ohri
try eclipse,dude http://www.walware.de/goto/statet Eclipse Plug-In for R: StatET Homepage R Project www.r-project.org Homepage Eclipse www.eclipse.org This is an Eclipse plug-in, supporting you to write R scripts and documentations. R is a language and environment for statistical computing

Re: [R] Include externally generated pdf in output (without Sweave)

2010-10-03 Thread Dieter Menne
Tal Galili wrote: You could potentially read an image file (like, for example, tiff) using something like read.picture {SoPhy} Thanks to you and Baptiste Auguie. Looks like the best way would be to import the picture as a pixel graphics with read.picture. It might be possible to read ps

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-03 Thread John Haart
Thanks Frank and Greg, This makes alot more sense to me now. I appreciate you are both very busy, but i was wondering if i could trouble you for one last piece of advice. As my data is a little complicated for a first effort at R let alone modelling! The response is on a range from 1-6, which

[R] A problem about nomogram--thank you for you help

2010-10-03 Thread 笑啸
dear professor: I am a doctor of urinary,and I am developing a nomogram of bladder tumor.Now I have a problem about this. I have got the result like this through analysing the dataset exp11.sav through multinominal logistic regression by SPSS 17.0.(the Sig. is high,that is good ,it is just

Re: [R] A problem about nomogram--thank you for you help

2010-10-03 Thread Jeffrey Spies
Firstly, `*` is the multiplication operator in R. Secondly, you'll need to convert your factors to numerics: L-0.559*as.numeric(T.Grade)-0.896*as.numeric(Smoking)+0.92*as.numeric(Sex)-1.338 Cheers, Jeff. 2010/10/3 笑啸 dingdongl...@126.com: dear professor: I am a doctor of urinary,and I am

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-03 Thread Frank Harrell
You still seem to be hung up on making arbitrary classifications. Instead, look at tendencies using odds ratios or rank correlation measures. My book Regression Modeling Strategies covers this. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message

Re: [R] A problem about nomogram--thank you for you help

2010-10-03 Thread Frank Harrell
Please take the time to study the subject matter, and note that a nomogram is just a graphical method. It is not a statistical model or a process. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context:

Re: [R] tyring to save plots using windoze 7 and cygwin

2010-10-03 Thread Mike Marchywka
Date: Sat, 2 Oct 2010 16:35:03 -0700 Subject: Re: [R] tyring to save plots using windoze 7 and cygwin From: jwiley.psych gmail.com To: marchy...@hotmail.com CC: r-help@r-project.org Hi Mike, sessionInfo() R version 2.11.1 (2010-05-31)

Re: [R] Ranked Set Sampling

2010-10-03 Thread David Winsemius
Ahmed Albatineh wrote: Are you aware of any package that calculates Ranked Set Sample? If you have a code that you are willing to share, I will acknowledge that in my work. Thanks much Ahmed I wonder if this is a phrase that is uniformly understood? One possibility is that you are

Re: [R] Help with panel.text in Lattice - Putting labels for co-oridnates in a plot

2010-10-03 Thread David Winsemius
RaoulD wrote: Hi, I am trying to create a Lattice dotplot that has the following data graphed. I need to put labels for each of the co-oridnates on the plot. I have managed to get only one label dispalyed as I don't completely understand the panel.text function. Can someone please help

Re: [R] Output Graphics GIF

2010-10-03 Thread Henrik Bengtsson
On Sun, Oct 3, 2010 at 5:47 AM, Mike Marchywka marchy...@hotmail.com wrote: Date: Sat, 2 Oct 2010 23:59:50 -0300 From: nilzabar...@gmail.com To: tal.gal...@gmail.com CC: r-help@r-project.org Subject: Re: [R] Output Graphics GIF On Mon, Sep

Re: [R] Ranked Set Sampling

2010-10-03 Thread Peter Dalgaard
On 10/03/2010 06:32 PM, David Winsemius wrote: Ahmed Albatineh wrote: Are you aware of any package that calculates Ranked Set Sample? If you have a code that you are willing to share, I will acknowledge that in my work. Thanks much Ahmed I wonder if this is a phrase that is

[R] scatterplot error message

2010-10-03 Thread nisaf
Hi All. I am a new R user. Trying to do scatterplot. Not sure how to resolve this error message A-subset (ErablesGatineau, station==A) B-subset (ErablesGatineau, station==B) plot(diam ~ biom) abline(lm(diam ~ biom), col = red) goodcases - !(is.na(diam) | is.na(biom))

[R] readBin which has two different sizes

2010-10-03 Thread Ab Hu
Hi, I have a binary file which has the following structure: 1) Some header in the beginning 2) Thousands of 216-byte data sub-grouped into 4 54-byte data structured as 4-byte time stamp (big endian) followed by 50 1-byte (8-bit) samples. So far this is how I am trying: #Open a connection for

Re: [R] Ranked Set Sampling

2010-10-03 Thread Jeffrey Spies
This is certainly not my area of expertise, but like Peter mentioned, Jeff Terpstra published this: http://www.jstatsoft.org/v14/i07 which has R code listed as supplements. Joe McKean seems to keep an updated version of that code here: http://www.stat.wmich.edu/red5328/WWest/ And Brent

Re: [R] scatterplot error message

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 1:58 PM, nisaf wrote: Hi All. I am a new R user. Trying to do scatterplot. Not sure how to resolve this error message A-subset (ErablesGatineau, station==A) B-subset (ErablesGatineau, station==B) plot(diam ~ biom) Did you also attache either (or both??? of those

Re: [R] readBin which has two different sizes

2010-10-03 Thread Henrik Bengtsson
On Sun, Oct 3, 2010 at 10:59 AM, Ab Hu master.rs...@yahoo.com wrote: Hi, I have a binary file which has the following structure: 1) Some header in the beginning 2) Thousands of 216-byte data sub-grouped into 4 54-byte data structured as 4-byte time stamp (big endian) followed by 50 1-byte

Re: [R] Ranked Set Sampling

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 2:13 PM, Jeffrey Spies wrote: This is certainly not my area of expertise, but like Peter mentioned, Jeff Terpstra published this: http://www.jstatsoft.org/v14/i07 which has R code listed as supplements. Joe McKean seems to keep an updated version of that code here:

[R] Programmaticly finding number of processors by R code

2010-10-03 Thread Ajay Ohri
Dear List Sorry if this question seems very basic. Is there a function to pro grammatically find number of processors in my system _ I want to pass this as a parameter to snow in some serial code to parallel code functions Regards Ajay Websites- http://decisionstats.com

Re: [R] Ranked Set Sampling

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 3:01 PM, David Winsemius wrote: On Oct 3, 2010, at 2:13 PM, Jeffrey Spies wrote: This is certainly not my area of expertise, but like Peter mentioned, Jeff Terpstra published this: http://www.jstatsoft.org/v14/i07 which has R code listed as supplements. Joe McKean

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Prof Brian Ripley
Without knowing your OS, there is no way anyone can tell you. And you probably want to know 'cores' rather than CPUs. And for some specific OSes, you will find answers in the archives. Beware that this is not a well-defined question: are these physical or virtual cores?, and having them in

[R] plyr: a*ply with functions that return matrices-- possible bug in aaply?

2010-10-03 Thread Michael Friendly
I have an application where I have a function to calculate results for a 2-way table or matrix, which returns a matrix with one less row and column. To keep this short, the function below captures the structure: fun2way - function(f){ if (!length(dim(f)) ==2) stop(only for 2-way arrays)

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Ajay Ohri
windows and ubuntu linux are my OS intent is to use them in the snow makecluster statement so I am not sure what I need cores,cpus,real,virtual basically the max amount of clusters i can create on my machine 2) if I have a workgroup on windows - can i detect cores/cpus on the network using the

[R] Johnson Distribution Fit

2010-10-03 Thread Abey George
Hi, I am trying to fit a Johnson SB distribution using fitdist function in fitdistrplus Library. I have defined the Johnson SB distribution from ( http://www.ntrand.com/johnson-sb-distribution/) . But it gives me the follwing errors. Any help would be appreciated #xi = xi #lambda =l #delta

[R] How to iterate through different arguments?

2010-10-03 Thread lord12
If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 = lm(y~x1+x2) model3 = lm(y~x1+x2+x3) model4 = lm(y~x1+x2+x3+x4) model5 =

Re: [R] Scatterplot matrix - Pearson linear correlation and Density Ellipse

2010-10-03 Thread ashz
Hi, I used the pairs.panels() in pkg:psych and it is helpful. It saves time. but if I use this line: pairs.panels(cfcap[8:11], scale = FALSE, lm=TRUE,ellipses=TRUE, digits = 2 ) The results are: - The upper.panel does not show the pearson r but the lm data. Furthermore, can I use the

Re: [R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows

2010-10-03 Thread Carl Witthoft
I used rtiff and found a potential problem, which is not strictly rtiff's fault. The more-or-less standard out there is that tiff data should be 8-bits. I needed to be able to read the full 16-bit pixel values from images taken in my lab. After some hacking, I wrote a script which pulled

Re: [R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows

2010-10-03 Thread stephen sefick
Have you tried it on a newer version of R? 2.6.2 is pretty old. On Sun, Oct 3, 2010 at 4:41 PM, Carl Witthoft c...@witthoft.com wrote: I used rtiff and found a potential problem, which is not strictly rtiff's fault.  The more-or-less standard out there is that tiff data should be 8-bits.  I

Re: [R] Tinn R

2010-10-03 Thread jthetzel
Raphael, I too had problems setting up Tinn-R 2.3.5.2 with R 2.11.1-x64 in 64-bit Windows 7. The following I had previously written to a colleague to show how I resolved the problems. I'm not sure if any of this will be of help to you, but Step 3 fixed an issue I was having with .trPaths.

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Peter Langfelder
If no-one replies with a better way, here's a way: under POSIX-compliant systems, you can write a small C function and wrap it in an R function. The C program would be something like #include unistd.h void nProcessors(int n) { #ifdef _SC_NPROCESSORS_ONLN long nProcessorsOnline =

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Henrique Dallazuanna
In windows try this: Sys.getenv('NUMBER_OF_PROCESSORS') On Sun, Oct 3, 2010 at 2:03 PM, Ajay Ohri ohri2...@gmail.com wrote: Dear List Sorry if this question seems very basic. Is there a function to pro grammatically find number of processors in my system _ I want to pass this as a

Re: [R] Johnson Distribution Fit

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 3:47 PM, Abey George wrote: Hi, I am trying to fit a Johnson SB distribution using fitdist function in fitdistrplus Library. I have defined the Johnson SB distribution from ( http://www.ntrand.com/johnson-sb-distribution/) . But it gives me the follwing errors. Any

[R] sampling from normal distribution

2010-10-03 Thread solafah bh
Hello If i want to resampl from the tails of normal distribution , are these commans equivelant??   upper tail:qnorm(runif(n,pnorm(b),1))  if b is an upper tail boundary   or   upper tail:qnorm((1-p)+p(runif(n))  if p is the probability of each interval (the observatins are divided to intervals)

Re: [R] How to iterate through different arguments?

2010-10-03 Thread Thomas Stewart
There are several ways to do this. The following is only one of the ways. One of the advantages of this approach is that it allows including both continuous and categorical variables. I'll demonstrate with the iris dataset. Place your variables in a dataframe with the y variable in the first

Re: [R] readBin which has two different sizes

2010-10-03 Thread Ab Hu
Thanks! I'll give that a try. -- View this message in context: http://r.789695.n4.nabble.com/readBin-which-has-two-different-sizes-tp2953365p2953619.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] sampling from normal distribution

2010-10-03 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of solafah bh Sent: Sunday, October 03, 2010 3:39 PM To: R help mailing list Subject: [R] sampling from normal distribution Hello If i want to resampl from the tails of normal

Re: [R] How to iterate through different arguments?

2010-10-03 Thread Gabor Grothendieck
On Sun, Oct 3, 2010 at 4:29 PM, lord12 trexi...@yahoo.com wrote: If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 =

Re: [R] Scatterplot matrix - Pearson linear correlation and Density Ellipse

2010-10-03 Thread William Revelle
Dear ashz, Unfortunately, much of you want is not possible with the current implementation of pairs.panels. Since pairs.panels is adapted from the help file of pairs, you might try pairs and then add in the panel functions that do what you want. That the lm option does it what it does met

[R] CRAN (and crantastic) updates this week

2010-10-03 Thread Crantastic
CRAN (and crantastic) updates this week New packages Updated packages BARD (1.18), BAS (0.92), CollocInfer (0.1.2), CompQuadForm (1.1), CompRandFld (0.2), COUNT (1.1.0), DPpackage (1.1-2), FAiR (0.4-6) This email provided as a service for the R community by

[R] can't find and install reshape2??

2010-10-03 Thread Chris Howden
Hi everyone, I’m trying to install reshape2. But when I click on “install package” it’s not coming up!?!?! I’m getting reshape, but no reshape2? I’ve also tried download.packages(reshape2, destdir=c:\\) download.packages(Reshape2, destdir=c:\\)…but no luck!!! Does anyone have any

Re: [R] short captions for xtable?

2010-10-03 Thread cuz
A quick update. The package maintainer says that it is indeed impossible. My solution was a bit of a workaround. I used the add.to.row option with \multicolumn to incorporate the source attribution into the table as the last row. Example:

Re: [R] sampling from normal distribution

2010-10-03 Thread Duncan Murdoch
On 03/10/2010 6:38 PM, solafah bh wrote: Hello If i want to resampl from the tails of normal distribution , are these commans equivelant?? upper tail:qnorm(runif(n,pnorm(b),1)) if b is an upper tail boundary or upper tail:qnorm((1-p)+p(runif(n)) if p is the probability of each interval

Re: [R] can't find and install reshape2??

2010-10-03 Thread Jeffrey Spies
The first argument in download.packages should be of type character or a vector of characters. This worked for me: install.packages('reshape2') as did: download.packages('reshape2', '~/Downloads/') Cheers, Jeff. On Sun, Oct 3, 2010 at 8:57 PM, Chris Howden ch...@trickysolutions.com.au

Re: [R] Read file

2010-10-03 Thread Nilza BARROS
Hi, Michael Thank you for your help. I have already done what you said. But I am still facing problems to deal with my data. I need to split the data according to station.. I was able to identify where the station information start using: my.data-file(d2010100100.txt,open=rt) indata -

Re: [R] can't find and install reshape2??

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 8:57 PM, Chris Howden wrote: Hi everyone, I’m trying to install reshape2. From which mirror? Was it even present at the mirror at that time? Have you tried another mirror or retried from the same mirror? But when I click on “install package” it’s not coming up!?!?!

Re: [R] readBin which has two different sizes

2010-10-03 Thread Ab Hu
Henrik Bengtsson wrote: 1. Use x - readBin(..., what=raw, n=35269*(54*4)) to read your raw (byte) data. 2. Turn it into a 54x4x35269 array, e.g. dim(x) - c(54,4,35269). 3. Extract the 4-byte time stamps by yT - x[1:4,,,drop=FALSE]; This is of type raw. Use readBin() to parse it, i.e.

Re: [R] Read file

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 9:40 PM, Nilza BARROS wrote: Hi, Michael Thank you for your help. I have already done what you said. But I am still facing problems to deal with my data. I need to split the data according to station.. I was able to identify where the station information start using:

[R] How To Extract Row from A Data Frame

2010-10-03 Thread Gundala Viswanath
I have a data frame that looks like this: print(df) V2 V3 V4 V5 V6 V7 V8 V9V10V11V12 1 FN 8.637 28.890 31.430 31.052 29.878 33.215 32.728 32.187 29.305 31.462 2 FP 19.936 30.284 33.001 35.100 30.238 34.452 35.849 34.185 31.242 35.635 3 TN 0.000 17.190

Re: [R] How To Extract Row from A Data Frame

2010-10-03 Thread jim holtman
?subset x V2 V3 V4 V5 V6 V7 V8 V9V10V11V12 1 FN 8.637 28.890 31.430 31.052 29.878 33.215 32.728 32.187 29.305 31.462 2 FP 19.936 30.284 33.001 35.100 30.238 34.452 35.849 34.185 31.242 35.635 3 TN 0.000 17.190 16.460 21.100 17.960 15.120 17.200 17.190

Re: [R] How To Extract Row from A Data Frame

2010-10-03 Thread jim holtman
forgot you only wanted the first row: subset(x[1,], select = V3:V12) V3V4V5 V6 V7 V8 V9V10V11V12 1 8.637 28.89 31.43 31.052 29.878 33.215 32.728 32.187 29.305 31.462 On Sun, Oct 3, 2010 at 10:22 PM, Gundala Viswanath gunda...@gmail.com wrote: I have a

[R] I have aproblem about nomogram--thank you for your help

2010-10-03 Thread 笑啸
dear professor: I have a problem about the nomogram.I have got the result through analysing the dataset exp2.sav through multinominal logistic regression by SPSS 17.0. and I want to deveop the nomogram through R-Projject,just like this : n-100 set.seed(10)

Re: [R] How To Extract Row from A Data Frame

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 10:22 PM, Gundala Viswanath wrote: I have a data frame that looks like this: print(df) V2 V3 V4 V5 V6 V7 V8 V9V10 V11V12 1 FN 8.637 28.890 31.430 31.052 29.878 33.215 32.728 32.187 29.305 31.462 2 FP 19.936 30.284 33.001 35.100

Re: [R] Read file

2010-10-03 Thread Michael Bedward
Hi Nilza, Just to add to David's comments, if you are reading in your file with read.table(..., fill=TRUE), and assuming that you haven't yet replace - with NA, you don't need grep. You can just use the number of NAs in each line to locate data blocks. Date records have 3 NAs Location

Re: [R] I have aproblem about nomogram--thank you for your help

2010-10-03 Thread David Winsemius
On Oct 3, 2010, at 10:42 PM, 笑啸 wrote: dear professor: I have a problem about the nomogram.I have got the result through analysing the dataset exp2.sav through multinominal logistic regression by SPSS 17.0. That is an inadequate specification of a statistical analysis (although it

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Abhijit Dasgupta, PhD
If you have installed multicore (for unix/mac), you can find the number of cores by /*multicore:::detectCores()*/ On 10/3/10 1:03 PM, Ajay Ohri wrote: Dear List Sorry if this question seems very basic. Is there a function to pro grammatically find number of processors in my system _ I