[R] smoothScatter problems

2009-07-27 Thread Jeroen van der Ham
Hello, I'm having some trouble getting a good result for a smoothScatter plot. I have some data that I want to log-plot, but when I use smoothScatter the result is not correct. The problem seems to be that with the log=x argument smoothScatter calculates the bins linearly, so the plot will be

[R] ROC curve using epicalc (after logistic regression) (re-sent)

2009-07-27 Thread Clifford Long
Dear R-help, I am resending as I believe I screwed up the e-mail address to R-help earlier. Sorry for my lack of attention to detail, and for any inconvenience. I have also sent the question to the package maintainer, as suggested in the posting guide. Regards, Cliff -- Forwarded

[R] [R-pkgs] Version 0.7 of package tsDyn, nonlinear time series

2009-07-27 Thread Matthieu Stigler
Hi Version 0.7 of package tsDyn presented at useR! 2009 is now on CRAN, extended with several new features. The package tsDyn is aimed at estimating nonlinear time series models which exhibit regime specific properties. The regime switching dynamics can either be described by smooth

[R] (no subject)

2009-07-27 Thread NIVEEN samy
    Hi   I am Niveen Samy. I am interesting by Linear Programming problem, and I want a program to solve it using any language as Java ,pascal,c++,Miranda functional programming language or any language can I learn it. If u have an already solution to this problem please send it to me

Re: [R] FW: Qury Related With R

2009-07-27 Thread bed.si...@oracle.com
Hi Romain, Attached is my R script that script I put into the R work space and through source(RScriptToCallJava.R) command I call the script and my java application is execute. Is it the proper way to call the java application? If not, then please can you explain the

[R] [R-pkgs] Beta Verson of tikzDevice Released!

2009-07-27 Thread Cameron Bracken
The tikzDevice package provides a new graphics device for R which enables direct output of graphics in a LaTeX-friendly way. The device output consists of files containing instructions for the TikZ graphics language and may be imported directly into LaTeX documents using the \input{} command. The

Re: [R] FW: Qury Related With R

2009-07-27 Thread Romain Francois
Hi, I think you can just do something like read the parameters into R, and then use the parameters argument of the .jinit function. Something like this perhaps: props - readLines( app.properties ) props - strsplit( gsub( \\\t, , grep( =, props, value = TRUE ) ), = ) params - sapply(

[R] help about package reldist (Relative Distribution)

2009-07-27 Thread 謝逸芝
Dear R users: i try to use package reldist to measure wage distribution. In package reldist : y mean sample from comparison distribution yo mean sample from reference distribution but I would like to compare more than two years ( total of fifteen years, from 1979, 1981, 1983..to 2007)

Re: [R] smoothScatter problems

2009-07-27 Thread Jeroen van der Ham
My humble apologies for double posting. I made an error with my subscription and erroneously thought that my message was not sent to the list. Jeroen. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] 64 bit compiled version of R on windows

2009-07-27 Thread huang min
Did anybody try the REvolution R Enterprise 2.0? Is it worthwhile to buy for the 64bit windows OS? Thanks. Huang On Tue, Mar 31, 2009 at 2:43 AM, Duncan Murdoch murd...@stats.uwo.cawrote: On 3/30/2009 12:46 PM, Vadlamani, Satish {FLNA} wrote: Hi: 1) Does anyone have experience with 64 bit

Re: [R] problems hist() and density

2009-07-27 Thread Jan Teichmann
Thank you. I'm sorry for my question. Sure, I've to integrate a density function to get the probabilities... I didn't noticed the small breaks and that's why I was confused. I expected a histogram with probabilities for the realizations. Am Sonntag, den 26.07.2009, 14:27 -0400 schrieb jim

[R] Strange Memory issue

2009-07-27 Thread Noah Silverman
Hi, I am testing out some things with the kernlab library. The dataframe is 22,000 rows of 32 columns. The command I execute is: model - ksvm(label ~ ., data = traindata, type=C-svc, kernel = rbfdot, class.weights= c(0 =1, 1 =3), kpar = automatic, C = 10, cross = 3, prob.model = TRUE) I

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-27 Thread Petr PIKAL
Hi I use saved R file stand.R which looks like this stand - list( b110 = c(49.45000, 21.46, 11.468333, 24.33500, 28.112240), b120 = c(49.77333, 19.386667, 7.736667, 20.87500, 21.753788), b130 = c(49.60833, 18.365000, 5.708333, 19.23167, 17.265409), b140 =

[R] Open/Close Console

2009-07-27 Thread Haeru Naemolaes
Dear list, one of my procedures is highly memory intensive (time-dependent spatially distributed data). Unfortunately, I could only tackle this problem with the dull idea of opening a new console window, running the procedure, and closing the new window. #previous procedure #open new console  

Re: [R] labelling points plotted in a 2D plan

2009-07-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.07.2009 23:15:04: Thanks for the answer Tal! But I can't get it to work correctly! :( Please bear with me this is the first time I am using R! and I am in a rush to correct a paper in fact on the plane I am plotting a table

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-27 Thread Liviu Andronic
On 7/27/09, Albert EINstEIN sateeshvar...@gmail.com wrote: can we create our own packages in R. It would be very helpful for us, if you provide any information regarding this. Yes. See this [1]. Liviu [1] http://cran.r-project.org/doc/manuals/R-exts.pdf

[R] can we create our own packages in R?

2009-07-27 Thread Albert EINstEIN
Hi, can someone provide me information regarding ; Here we are reloading the data when we start the R, In R there are some default packages with datasets .Can we create a dataset permanently in any packages so that we can get the dataset without reloading,like creating dataset in a permanent

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-27 Thread Albert EINstEIN
Hi, Thank you very much all of you for giving me valuable solution -- View this message in context: http://www.nabble.com/Re%3A--Rd--How-to-create-a-permanent-dataset-in-R.-tp24649306p24677150.html Sent from the R help mailing list archive at Nabble.com.

[R] creating and populating an environment

2009-07-27 Thread Christian Prinoth
Hi, I often work with R by writing long(ish) Excel-VBA macros interspersed with calls to R via RExcel. A typical example of this would be: Sub VBAMacro() 'fetch some data from an excel sheet 'do some basic stuff on said data 'transfer data from vba to R 'run some R

[R] Forecasting Inflation

2009-07-27 Thread Dilip Bayas
Dear All, I wanted to forecast Inflation for Indian Economy. please send what techniques to be used after the variable selection. WPI, CPI, Money supply, IIP, Interest rate and so on..How i can use R for the same [[alternative HTML version deleted]]

[R] creating and populating an environment

2009-07-27 Thread Christian Prinoth
Hi, I often work with R by writing long(ish) Excel-VBA macros interspersed with calls to R via RExcel. A typical example of this would be: Sub VBAMacro() 'fetch some data from an excel sheet 'do some basic stuff on said data 'transfer data from vba to R 'run some R

[R] read binary file seek()

2009-07-27 Thread Andreas Posch
I want to read in a binary file using the readBin() function. In order to skip uninformative parts of the file I use the seek() function, I need to specify the number of bits to skip rather than the number of bytes to skip. E.g. seek(to.read,origin=current,blockSize) with blockSize giving

[R] dumping data objects

2009-07-27 Thread William Q Meeker
I am using R version 2.9.1 (2009-06-26) on Windows. I am trying to dump some data objects from R so that I can subsequently import them into S-PLUS (version 6.2). Using dump(foo) appends Ls to integers, as explained in the documentation for deparseOpts. Here is a simple example. I tired

Re: [R] can we create our own packages in R?

2009-07-27 Thread Philipp Pagel
On Mon, Jul 27, 2009 at 02:32:24AM -0700, Albert EINstEIN wrote: can we create our own packages in R. It would be very helpful for us, if someone provide any information regarding this. Yes, you can. There is an entire manual documenting this:

[R] Conversion a ts time to another class.

2009-07-27 Thread Chuse chuse
Dear R collegues, I am trying to change a ts time such as 2009.004 to a str or POSIX class as 2009-01-01. Is there any function or method to do it?. Thank you beforehand. Chuse. __ R-help@r-project.org mailing list

Re: [R] read binary file seek()

2009-07-27 Thread jim holtman
readBin reads in bytes. If you want to read starting at a variable 'bit' location, then you will have to write a function that will read in the bytes and then shift the data the corresponding number of bits. Exactly what are you reading in and what processing do you want to do on it. On Mon,

Re: [R] normal mixture model

2009-07-27 Thread Christian Hennig
Hi Cindy, you need the summary function mclustsummary - summary(mclustBICoutputobject,data) to get all the information. Some (like best model) is given if you just print out the summary object. Some other information (like estimated parameter values) are accessible as components of the

[R] Question about rpart decision trees (being used to predict customer churn)

2009-07-27 Thread Terry Therneau
-- begin included message --- Hi, I am using rpart decision trees to analyze customer churn. I am finding that the decision trees created are not effective because they are not able to recognize factors that influence churn. I have created an example situation below. What do I need to do to for

Re: [R] Conversion a ts time to another class.

2009-07-27 Thread jim holtman
try this: x - 2009.004 # get the number of days in the year days - unclass(as.POSIXct(paste(floor(x)+1, -1-1, sep='')) - + as.POSIXct(paste(floor(x), '-1-1', sep=''))) # now compute the number of seconds from start of year current - as.POSIXct(paste(floor(x), '-1-1', sep=''))

[R] what to do about face 1 at size 16 could not be loaded

2009-07-27 Thread Oliver Kullmann
Hi, on some machines (all Linux, same behaviour with versions 2.9.0 and 2.9.1) I get errors plot(E2) Error in text.default(x, y, txt, cex = cex, font = font) : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could not be loaded (but not on others; the R-installation

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-27 Thread Albert EINstEIN
Thank you very much for your reply. Yes. See this [1]. Liviu [1] http://cran.r-project.org/doc/manuals/R-exts.pdf -- View this message in context: http://www.nabble.com/Re%3A--Rd--How-to-create-a-permanent-dataset-in-R.-tp24649306p24678083.html Sent from the R help mailing list archive at

[R] create dataset permanently in package (i.e. default or our own package)

2009-07-27 Thread Albert EINstEIN
Hi, actually while opening R console and R commander we see some packages like car and datasets. in this packages we have default datasets are available. example: women and prestige like that. now i created a sales dataset importing from excel, xml or text file. now i want to store that dataset

Re: [R] FW: Qury Related With R

2009-07-27 Thread bed.si...@oracle.com
Hi Romain, Exactly this is the script which I need. Thanks a lot for helping. Romain, Is there any way to modified a particular line in the property file through R script? If yes then please explain how. Cheers! BS -Original Message- From: Romain Francois

[R] nnet library and FANN package'm

2009-07-27 Thread lucmoulinier
Hello ! I'd like to know to which of the FANN package network corresponds the R nnet network ? In more details, what is the R nnet activation function, what is the training algorithm (rprop, quickprop, ...) ? Also, it seems that the R nnet decay parameter in nnet corresponds to the learning_rate

Re: [R] downsampling

2009-07-27 Thread Jan M. Wiener
Dear Philipp and R-Users, thank you very much for the help. However, both approx() and spline() seem to select the number of required data points from the original data (at the correct positions, of course) and ignore the remaining data points, as the following example demonstrates: a=

[R] numbers on barplot

2009-07-27 Thread Mohsen Jafarikia
Hello all, I have this simple barplot code: ifn - id.dat dat - read.table(ifn) ofn - id.png bitmap(ofn, type = png256, width = 30, height = 30, pointsize = 30, bg = white,res=50) par(mar=c(5, 5, 3, 2),lwd=5) par(cex.main=1.6,cex.lab=1.6,cex.axis=1.6) names(dat)-c(NumberOfPeople,Average)

Re: [R] numbers on barplot

2009-07-27 Thread Nutter, Benjamin
The only thing you're missing is the midpoints of the bars. Since you specified Graph - barplot(dat$Average) You can get the midpoints from the Graph object. So to put the number on top of each bar you might use something like: text(Graph, dat$Average, dat$Average) -Original

Re: [R] downsampling

2009-07-27 Thread Philipp Pagel
On Mon, Jul 27, 2009 at 02:42:33PM +0200, Jan M. Wiener wrote: However, both approx() and spline() seem to select the number of required data points from the original data (at the correct positions, of course) and ignore the remaining data points, as the following example demonstrates: a=

[R] offset and poisson regression

2009-07-27 Thread Renaud Scheifler
Not sure that the list is the best place for this question, but we are going mad with this... We are trying to fit a poisson regression to count data, eg the number of fledged youngs of blue tits (NPe) as a function of the clutch size (GPc) and other environment variables. Here are the

Re: [R] numbers on barplot

2009-07-27 Thread John Kane
names(dat)-c(NumberOfPeople,Average) Graph-barplot(dat$Average) barplot(dat$Average, ylim=c(0,max(dat[,2]+.2))) text(Graph, dat[,2], dat[,1], pos=3) The reason for the ylim is so that the number for the righthand bar does not go outside the plot area. --- On Mon, 7/27/09, Mohsen Jafarikia

[R] pairs plot

2009-07-27 Thread Jose Narillos de Santos
Hi all, I want to plot trough pairs() plot a matrix with 4 columns. I want to make a trhee plot in a graph. Plotting pairs colum 2,3,4 on y axis and 1 on X axis. You mean (a plot with three graphs) ommitting the first pair with itself. And only the pairs with colum 1 with the other not all

[R] How should i change the SAS Codes into R Codes?

2009-07-27 Thread zhijie zhang
Dear R users, I have a SAS codes with several loops in it, and i hope to use R to do the same task. The SAS codes are as follows, /*to generate the dataset*/ DATA Single_Simulation; DO se=0 to 1 by 0.01; DO sp=0 to 1 by 0.01; DO DR=0 to 1 by 0.01; TR=(DR+sp-1)/(se+sp-1+1.0e-12);

Re: [R] How should i change the SAS Codes into R Codes?

2009-07-27 Thread Matt Aldridge
singleSim - expand.grid(se = 0:100/100, sp = 0:100/100, DR = 0:100/100) singleSim - within(singleSim, { TR - (DR+sp-1)/(se+sp-1+1.0e-12) AdjustFactor - TR/(DR+1.0e-12) }) sampleData - subset(singleSim, DR == .02 sp == 1) write.csv(sampleData, output.csv) Hope this helps Matt

Re: [R] offset and poisson regression

2009-07-27 Thread Renaud Lancelot
You should use offset(log(Gpc)) instead of offset(Gpc) options(width = 65) fm - glm(NPe ~ 1 + offset(log(GPc)), family = poisson,data = tab) fitted(fm) 1234678 3.181818 3.818182 3.818182 4.454545 3.181818 3.818182 3.181818 9

Re: [R] create dataset permanently in package (i.e. default or our own package)

2009-07-27 Thread Steve Lianoglou
Mr. Einstein, On Jul 27, 2009, at 7:27 AM, Albert EINstEIN wrote: Hi, actually while opening R console and R commander we see some packages like car and datasets. in this packages we have default datasets are available. example: women and prestige like that. now i created a sales dataset

[R] Creating new data frame using loop

2009-07-27 Thread Andrew Aldersley
Hi all, I sent a request round last week asking for help with using a for loop to read and separate a large dataset. The response I got worked great, but now I have another problem with using my loop. Basically I have a number of different files containing columned data. There are 132

Re: [R] numbers on barplot

2009-07-27 Thread Greg Snow
Unless you are intentionally trying to distort your data and make the graph harder to read (you don't want to do that), it is better to put the numbers in the margin rather than at the top of the bars. Try the following line after the barplot: mtext( dat$NumberOfPeople, side=1, line=1.5,

Re: [R] pairs plot

2009-07-27 Thread Greg Snow
Look at the pairs2 function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Jose

Re: [R] How should i change the SAS Codes into R Codes?

2009-07-27 Thread John Kane
I see Matt Aldridge has given you the answers to your specific questions. If you are used to using SAS you might find Bob Meunchen's book Muenchen, R. A. (2008). R for SAS and SPSS Users (1st ed.). Springer. useful. A shorter version is available as a pdf at

Re: [R] normal mixture model

2009-07-27 Thread cindy Guo
Hi, Christian, Yes, it works. Thank you very much. It's really helpful. Cindy On Mon, Jul 27, 2009 at 5:39 AM, Christian Hennig chr...@stats.ucl.ac.ukwrote: Hi Cindy, you need the summary function mclustsummary - summary(mclustBICoutputobject,data) to get all the information. Some (like

Re: [R] Creating new data frame using loop

2009-07-27 Thread Steve Lianoglou
Hi Andy, On Jul 27, 2009, at 12:18 PM, Andrew Aldersley wrote: Hi all, I sent a request round last week asking for help with using a for loop to read and separate a large dataset. The response I got worked great, but now I have another problem with using my loop. Basically I have a

[R] Should nlme's augPred work with a factor covariate?

2009-07-27 Thread Gavin Kelly
I'm having difficulty getting the augPred function from the nlme package to work when the primary covariate is a factor. I don't know if it is intended to work in these situations, but I can't immediately see anything in the documentation that forbids this - ideally I'd like to be able to plot

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-27 Thread Sauvik De
Hi there, Thanks again for your reply. I know for-loop is always a solution to my problem and I had already coded using for-loop. But the number of levels for each dimension is large enough in actual problem and hence it was time-consuming. So, I was just wondering if there are any other

[R] plotting a PNG from an in-memory object

2009-07-27 Thread Rajarshi Guha
Hi, I have code which, via rJava can bring up a JFrame to display an image. What I'd like to be able to is to capture that image and make an R plot out of it (analogous to plotting a PNG file, but not from an actual file). I can rite Java code that could be called from R to take a snapshot of the

[R] probability on a barplot

2009-07-27 Thread Erin Hodgess
Dear R People: I have a barplot created from a table. What is the best way to set up the barplot such that is shows probability rather totals, please? I've tried plot also but it shows horizontal bars rather than vertical bars. Thanks, Erin -- Erin Hodgess Associate Professor Department of

[R] probability on a barplot

2009-07-27 Thread Erin Hodgess
Please ignore the previous email I figured it out. -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com __ R-help@r-project.org mailing list

[R] dataframe to list conversion

2009-07-27 Thread voidobscura
Hi all, I have been experimenting with writing my own matrix column sum function. I want it to return a list. csum-function(m) { a = data.frame(m) s = lapply(a,sum) return(s) } I wish to use the same code up until the return(s) that I have listed above. The problem is that s,

[R] How to deal with this random variable?

2009-07-27 Thread Manuel Ramon
Hello to everybody, I have a data frame with 100 measures of quality for 3 variables: A, B and C. These quality variables are measured in diferent times along the productive process. My data comes from 5 experiments (5 replicates with 20 measures for replicate). I also have a final measure (Z)

[R] Superscripts and rounding

2009-07-27 Thread ehux
I am new to the world of R/programming so this may be a really easy question. I thank you for your patience and help in advance I would like the characters km^2 to be displayed on the plot subtitle as km squared - two as a superscript. I would also like to have the numbers from the data set

Re: [R] dataframe to list conversion

2009-07-27 Thread Dimitris Rizopoulos
have a look at ?unlist(); you can also use sapply() in this case instead of lapply(). Best, Dimitris voidobscura wrote: Hi all, I have been experimenting with writing my own matrix column sum function. I want it to return a list. csum-function(m) { a = data.frame(m) s =

Re: [R] dataframe to list conversion

2009-07-27 Thread Jorge Ivan Velez
Hi voidobscura, Try either csum2 - function(m){ a = data.frame(m) s = lapply(a,sum) do.call(c, s) } or colSums(m) See ?do.call and ?colSums for more details. HTH, Jorge On Mon, Jul 27, 2009 at 11:03 AM, voidobscura nshah...@gmail.com wrote: Hi all, I have been experimenting

Re: [R] How to deal with this random variable?

2009-07-27 Thread Bert Gunter
This sounds way too complicated for this forum, which is designed to provide help to users on the use of the R language, not remote statistical consulting. While you may receive replies, I would argue that you would do better to find a local statistical expert with whom to work -- not least

[R] skip plot/blank plot on purpose (multi-plot question)

2009-07-27 Thread Mark Knecht
Hi, Say that I've got a function that has the following code in it: X11(width=10, height=10) layout(rbind(c(1,1,1,2,2,2), c(3,4,5,6,7,8), c(9,10,11,12,13,14)), height=c(3,1,1)) layout.show(14) Sometimes when I call this function it will turn out by design that one or more of the data sets

Re: [R] how to correlate nominal variables?

2009-07-27 Thread Daniel Malter
Benoit Vaillant made me aware of an indexing mistake in the computation of Cramer's V. The col.sum indexes rows instead of columns. This is a correction of the code: cramers.v=function(x){ x=as.data.frame(x) chisq=0 row.sum=NULL col.sum=NULL row.sum=rowSums(table(x))

[R] Forumla format?

2009-07-27 Thread Noah Silverman
Hi, Quick question. I'm working on training an SVM. I have a dataframe with about 50 columns. I want to train on 46 of them. Is there a way to say All except columns 22,23,25 and 31? It would be nice to not have to do +c1 +c2 +c3 +c4, etc for all 48 columns. Thanks! -N

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
i am able to return the first column, but anything else returns this: 0 rows (or 0-length row.names) any idea? On Tue, Jul 21, 2009 at 12:49 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 21, 2009, at 3:27 PM, Mehdi Khan wrote: I understand your explanation about the

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
Hi, On Jul 27, 2009, at 3:01 PM, Noah Silverman wrote: Hi, Quick question. I'm working on training an SVM. I have a dataframe with about 50 columns. I want to train on 46 of them. Is there a way to say All except columns 22,23,25 and 31? Assume your dataframe is called my.data:

Re: [R] skip plot/blank plot on purpose (multi-plot question)

2009-07-27 Thread Bert Gunter
Well, all of this can be done quite nicely with lattice graphics: ?xyplot (See, e.g. the skip argument) 1) Is there some generic way to call plot and have it plot, but it plots nothing so I don't see anything at all in position 12? This could be a blank plot function I call when I notice the

[R] Working with tables with missing levels

2009-07-27 Thread Andre Nathan
Hello I'm trying to write a function to calculate the relative entropy between two distributions. The data I have is in table format, for example: t1 - prop.table(table(c(0,0,2,4,4))) t2 - prop.table(table(c(0,2,2,2,3))) t1 0 2 4 0.4 0.2 0.4 t2 0 2 3 0.2 0.6 0.2 The

[R] Cross-validating two matrices

2009-07-27 Thread Brian McCarthy
Hello, I am trying to help a colleague with an R problem (see below) to whit I can only generate a very inelegant solution. Any advice would be welcome. Thanks, Brian If you have two matrices, say a species by trait matrix (Matrix 1 below) and a plot by species matrix (Matrix 2 below),

Re: [R] Working with tables with missing levels

2009-07-27 Thread Tal Galili
Hi Andre, Just about expending the table, The way you could do this is by using factors, for example: t1 - prop.table(table(factor(c(0,0,2,4,4 t2 - prop.table(table(factor( c(0,2,2,2,3 The rest is for more knowledgeable people then me to say... On Mon, Jul 27, 2009 at 10:21 PM,

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
On Jul 27, 2009, at 2:54 PM, Mehdi Khan wrote: i am able to return the first column, but anything else returns this: 0 rows (or 0-length row.names) any idea? I'm not sure what you're doing. The result you're getting happens when no rows pass the logical test that you are using to index

Re: [R] Cross-validating two matrices

2009-07-27 Thread Steve Lianoglou
Hi, On Jul 27, 2009, at 3:29 PM, Brian McCarthy wrote: Hello, I am trying to help a colleague with an R problem (see below) to whit I can only generate a very inelegant solution. Any advice would be welcome. Thanks, Brian If you have two matrices, say a species by trait matrix (Matrix

Re: [R] Working with tables with missing levels

2009-07-27 Thread Henrique Dallazuanna
Try this: t1 - prop.table(table(factor(c(0,0,2,4,4), levels = 0:4))) t2 - prop.table(table(factor(c(0,2,2,2,3), levels = 0:4))) On Mon, Jul 27, 2009 at 4:21 PM, Andre Nathan an...@digirati.com.br wrote: Hello I'm trying to write a function to calculate the relative entropy between two

Re: [R] Forumla format?

2009-07-27 Thread Noah Silverman
Hi, I'm not sure that would work for the formula format of an SVM function. the idea is normally svm(label ~ c1 + c2 +c3, data=mydata); It doesn't work to say svm(label ~ -c(22,23,24), data=mydata) On 7/27/09 12:17 PM, Steve Lianoglou wrote: Hi, On Jul 27, 2009, at 3:01 PM, Noah

Re: [R] skip plot/blank plot on purpose (multi-plot question)

2009-07-27 Thread Mark Knecht
On Mon, Jul 27, 2009 at 12:21 PM, Bert Guntergunter.ber...@gene.com wrote: Well, all of this can be done quite nicely with lattice graphics: ?xyplot (See, e.g. the skip argument) 1) Is there some generic way to call plot and have it plot, but it plots nothing so I don't see anything at all

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
Hi, On Jul 27, 2009, at 3:47 PM, Noah Silverman wrote: Hi, I'm not sure that would work for the formula format of an SVM function. the idea is normally svm(label ~ c1 + c2 +c3, data=mydata); It doesn't work to say svm(label ~ -c(22,23,24), data=mydata) You're quite right. Sorry, I

Re: [R] Working with tables with missing levels

2009-07-27 Thread Andre Nathan
On Mon, 2009-07-27 at 16:34 -0300, Henrique Dallazuanna wrote: Try this: t1 - prop.table(table(factor(c(0,0,2,4,4), levels = 0:4))) t2 - prop.table(table(factor(c(0,2,2,2,3), levels = 0:4))) Is there a way to do this given an already existing table? The problem is that I actually build the

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
On Jul 27, 2009, at 3:50 PM, Mehdi Khan wrote: the problem is, it works with the example data i gave. however, it does NOT work with the data set i have, which is 600,000 rows. the class is still a data frame. So the problem must be in your data, or what you think is in your data.

Re: [R] probability on a barplot

2009-07-27 Thread Nair, Murlidharan T
Kindly, post the solution to the problem, so that it will benefit others. An example could would be great. Cheers../Murli -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Erin Hodgess Sent: Monday, July 27, 2009 1:33 PM To: R

Re: [R] computing the radius of an arc

2009-07-27 Thread Nair, Murlidharan T
Alex Brenning, the developer of the RSAGA package told me that and I quote the RSAGA package (which uses functions from the free geographical information system [GIS] SAGA GIS) has a curvature function that is designed to calculate the curvature of surfaces, in particular raster (i.e. gridded)

Re: [R] create dataset permanently in package (i.e. default or our own package)

2009-07-27 Thread cls59
Albert EINstEIN wrote: Hi, actually while opening R console and R commander we see some packages like car and datasets. in this packages we have default datasets are available. example: women and prestige like that. now i created a sales dataset importing from excel, xml or text file. now

Re: [R] how to correlate nominal variables?

2009-07-27 Thread Mark Difford
Hi Timo, I need functions to calculate Yule's Y or Cramérs Index... Are such functions existing? Also look at assocstats() in package vcd. Regards, Mark. Timo Stolz wrote: Dear R-Users, I need functions to calculate Yule's Y or Cramérs Index, in order to correlate variables that are

[R] Reordering the columns of my dataframe

2009-07-27 Thread Mark Na
Hi R-helpers, I have written this line of code: data-cbind(data[,1],data[,2:6],data[,18],data[,7:17]) to reorder the columns of my dataframe, but I'm losing the column names of my 1st and 18th columns (they are now named data[,1] and data[,18] respectively). Can I use cbind to do this

Re: [R] Reordering the columns of my dataframe

2009-07-27 Thread Rolf Turner
On 28/07/2009, at 9:45 AM, Mark Na wrote: Hi R-helpers, I have written this line of code: data-cbind(data[,1],data[,2:6],data[,18],data[,7:17]) to reorder the columns of my dataframe, but I'm losing the column names of my 1st and 18th columns (they are now named data[,1] and data[,18]

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
no luck, it's okay, i will figure it out! i might isolate and recombine all the columns, maybe that will work. thanks for the help! No, wait .. no luck in being able to select out rows from your data.frame using values you see somewhere in the top 10 rows? Can you just paste in some key

[R] Split rownames into factors

2009-07-27 Thread jimdare
Hi Guys, I was wondering how you would go about solving the following problem: I have a list where the grouping information is in the row names. Rowname [,1] X1Jan08 324 X1Jun08 65 X1Dec08 543 X2Jan08 23 X2Jun08 54 X2Dec08 8765 X3Jan08 213 X3Jun08 43 X3Dec08 65 How can I create the

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
Ahh .. On Jul 27, 2009, at 6:01 PM, Mehdi Khan wrote: Even when choosing a value from the first few rows, it doesn't work. okay here it goes: rearranged[1:10, 1:5] xy band1 VSCAT.001 soiltype 1 -124.3949 40.42468NANA CD 2 -124.3463 40.27358NA

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Bert Gunter
Nothing wrong with rolling your own, but see ?all.equal for R's built-in almost.equal version. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Monday, July 27,

[R] Splitting matrix into several small matrices

2009-07-27 Thread kathie
Dear R users... I need to split this matrix(or dataframe), for example, z - matrix(c(13,1,1,1,1,12,0,0,0,0,8,1,0,1,1,8,0,1,0,0, 10,1,1,1,1,3,0,1,0,0,3,1,0,1,1,6,1,1,1,1),8,5,byrow = T) z [,1] [,2] [,3] [,4] [,5] [1,] 131111 [2,] 12000

[R] Draw plot.table axis on right hand side

2009-07-27 Thread Sean Carmody
With an ordinary plot, to customise the axis it is possible to suppress drawing the axis and then call Axis. I have been trying to change the location of the y-axis on a plot.table plot to the right hand side, but cannot even work out how to suppress drawing the labels. Here is a toy example of

[R] Double Truncation Fit??

2009-07-27 Thread Vivek Ayer
Hey guys, Do you all know of a function that provides fitting for double-sided truncation? truncreg accounts for one-sided truncation, but not two, or at least I don't how to. Our outlier values are -115 on the left side and -55 on the right. Help appreciated, Vivek

Re: [R] Split rownames into factors

2009-07-27 Thread Christopher Bare
Hi, I'm not an R expert, but I thought I'd give your question a shot anyway. First, it looks like you're starting with a matrix, rather than a list. Let's hope I guessed that right: m = matrix(c(324, 65, 543, 23, 54, 8765, 213, 43, 65)) rownames(m) = c('X1Jan08', 'X1Jun08', 'X1Dec08',

[R] frequent sequences

2009-07-27 Thread jgant
Hello, I'm having a few issues mining frequent sequences. I've read the documentation and played around with arules and arulesSequences with little success. For example if I have a vector, a = t(t(c(1,2,3,0,1,2,3,5,6,7))); I'd like to be able mine the association rules {1,2}--{3}, {2}--{3},

Re: [R] Non-Linear Regression with two Predictors

2009-07-27 Thread Berlinerfee
Hi and thank you for your reply, in my new regression formular the parameter delta is inserted: fit - nls(dataset$V2~(( alpha / ( 1 + exp( beta - gamma* dataset$V1 ) ) ) + (dataset$V6*delta)),data=dataset,start=startparam) The sense is, that dataset$V6 is a dummy variable that represents the

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
the problem is, it works with the example data i gave. however, it does NOT work with the data set i have, which is 600,000 rows. the class is still a data frame. On Mon, Jul 27, 2009 at 12:15 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 27, 2009, at 2:54 PM, Mehdi Khan

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
no luck, it's okay, i will figure it out! i might isolate and recombine all the columns, maybe that will work. thanks for the help! On Mon, Jul 27, 2009 at 1:00 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 27, 2009, at 3:50 PM, Mehdi Khan wrote: the problem is, it

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
it worked! thank you so much!! On Mon, Jul 27, 2009 at 3:16 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Ahh .. On Jul 27, 2009, at 6:01 PM, Mehdi Khan wrote: Even when choosing a value from the first few rows, it doesn't work. okay here it goes: rearranged[1:10, 1:5]

[R] Making a sub data.frame

2009-07-27 Thread desper
Dear all, I have a data.frame like this ID VAR1 11 blaaal 121 blalda 121 adada 234baada 231 ddaaa 231 baada ... ... and I have another vector of ID, say, c(121,234,231) How could I collect all the observations start with ID

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
Even when choosing a value from the first few rows, it doesn't work. okay here it goes: rearranged[1:10, 1:5] xy band1 VSCAT.001 soiltype 1 -124.3949 40.42468NANA CD 2 -124.3463 40.27358NANA CD 3 -124.3357 40.25226NANA

  1   2   >