Re: [R] Symbol size in plot relative to axis scale and not the graphics window

2012-02-16 Thread Jim Lemon
On 02/16/2012 10:39 PM, Hey, Kirsty wrote: Dear all, I am wanting to plot points that have a defined absolute size relative to the scale of the axis. For example, the following gives me a plot with sizes relative to the defined size variable but are not of the specified absolute size (relative

Re: [R] Asking About packages rimage

2012-02-16 Thread Prof Brian Ripley
On 17/02/2012 05:39, R. Michael Weylandt wrote: Looks like its in the CRAN archives here -- http://cran.r-project.org/src/contrib/Archive/rimage/ -- then the steps for doing a source install are well documented (and easily googleable) but (unstated) OS specific. Yes, but the package was

Re: [R] Resurrecting old Splus objects

2012-02-16 Thread Patrick Connolly
On Thu, 16-Feb-2012 at 07:30AM +, Prof Brian Ripley wrote: | Try read.S in package foreign. It was written back in the days of | that S-PLUS format. Great. Knows all about big-endian and does exactly what I needed very simply. All that time I've known about the foreign package and never

[R] Creating XML using apply

2012-02-16 Thread arunkumar1111
Hi My data looks like this data is a vector data=var1 var2 var3 100 120 130 i want to put it in an XML xmlOutput=NULL xmlOutput- newXMLNode(results) for( i in 1 : length(data)) { newXMLNode(variable,attrs=c(name =names(data)[i] ), value = data[i]), parent =

Re: [R] Control number of assets in resulting portfolio with optimizations using package fPortfolio

2012-02-16 Thread Enrico Schumann
Hi Alex, I cannot say how to implement such constraints with fPortfolio, but in general you can use heuristics to solve such problems. An example for selecting a number of assets from a larger universe is given in a vignette of the NMOF package (of which I am the author) and in the code

Re: [R] Graphing lines of different lengths

2012-02-16 Thread Jim Lemon
On 02/17/2012 06:42 AM, Jordan Patricia Sinclair wrote: Hello all. I need to graph multiple lines of different lengths on the same graph. When I try to add lines I get an error due to different lengths. The only thing I could find when reading up on it was that 'if the data are inputted

[R] stepwise selection for conditional logistic regression

2012-02-16 Thread Subha P. T.
 Hi, Is there any function available to do stepwise selection of variables in Conditional(matched) logistic regression( clogit)? step, stepwise  etc are failing in case of conditional logistic regression. Please help.  Thanks P.T. Subha [[alternative HTML version deleted]]

Re: [R] matching a sequence in a vector?

2012-02-16 Thread Petr Savicky
On Wed, Feb 15, 2012 at 08:12:32PM -0500, Gabor Grothendieck wrote: On Tue, Feb 14, 2012 at 11:17 PM, Redding, Matthew matthew.redd...@deedi.qld.gov.au wrote: I've been trawling through the documentation and listserv archives on this topic -- but as yet have not found a solution.  I'm

Re: [R] variable ordering

2012-02-16 Thread arunkumar1111
Thanks it worked - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/variable-ordering-tp4393109p4393197.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] How can we access element(s) of a time series object?

2012-02-16 Thread jpm miao
Hello, Let us convert a vector to a time series object starting in 1978Q1: FRW-ts(FRW0, frequency=4, start=c(1978,1)) FRW[3:6] represents the data from 1978Q3 to 1979Q2. Could we access the data by the time (1978Q3 to 1979Q2) instead of FRW[3:6]? Thanks, miao [[alternative

[R] Howto plot ROC Curve Directly from SN/PPV

2012-02-16 Thread Gundala Viswanath
Dear expert, Given such data: #Cutpoint SN (1-PPV) 5 0.560.01 7 0.780.19 9 0.910.58 How can I plot ROC curve with R that produce similar result like the attached file? I know ROCR package but it doesn't take such input. - GV

[R] poLCA and conditional dependence

2012-02-16 Thread Suranga Kasthurirathne
Hi everyone / poLCA gurus, I'm facing a problem regarding conditional dependence and poLCA. Using a few data sets composed of only 1's and 2's, i'm able to do a latent class analysis for independent data columns using poLCA. The commands I use to do this are something like, bcs =

Re: [R] ggplot rank stack bar automatically.

2012-02-16 Thread vd3000
Hi, Micheal, Are you talking about the recode for eliminating \ problem? I think I am looking for how to eliminate it when I import the data file... THAnks. VD. -- View this message in context: http://r.789695.n4.nabble.com/ggplot-rank-stack-bar-automatically-tp4391042p4393328.html Sent from

[R] help with ancestral.pars in phangorn package

2012-02-16 Thread mredfar
Hello, I'm struggling with understanding the output on the ancestral.pars() command from the phangorn package, I'm new to doing phylogenetic analyses using R. I used it on nucleotide data, and it works fine, I'm just not sure how to read the output. The output is phyDat class, and outputs a

[R] help with e+01 number abbreviations

2012-02-16 Thread Gian Maria Niccolò Benucci
Dear List, I will appreciate any advice regarding how to convert the following numbers [I got in return by taxondive()] in numeric integers without the e.g. 6.4836e+01 abbreviations. Thank you very much in advance, Gian taxa_dive Species Delta Delta* Lambda+

Re: [R] Using R with Netezza

2012-02-16 Thread Uwe Ligges
Please ask your Netezza support. I now they are proud on their R support and will certainly help. Uwe Ligges On 16.02.2012 00:36, rusernetezza wrote: We've recently installed a Netezza server and I am trying to integrate the R GUI with this server and run functions using the server itself.

Re: [R] assign same legend colors than in the grouped data plot

2012-02-16 Thread Jim Lemon
On 02/16/2012 01:35 AM, agent dunham wrote: Dear community, I've plotted data and coloured depending on the factor variable v3. In the legend, I'd like to assign properly the same colors than in the factor (the factor has 5 levels). I've been trying this but it doesn't work. plot(var1,

Re: [R] matching a sequence in a vector?

2012-02-16 Thread Berend Hasselman
On 16-02-2012, at 09:01, Petr Savicky wrote: Hi. There were several solutions in this thread. Their speed differs quite significantly. Here is a comparison. patrn - 1:4 exmpl - sample(1:4, 1, replace=TRUE) occur1 - function(patrn, exmpl) { m - length(patrn) n -

Re: [R] Link to a Network computer

2012-02-16 Thread Uwe Ligges
On 16.02.2012 01:42, Duncan Murdoch wrote: On 12-02-15 5:26 PM, wpcmba wrote: Issue: Connecting to a computer in a network. I would like to connect to a file on a computer on my internal network that has a different password. I have tried download.file and read.csv to no avail. When use

Re: [R] help with e+01 number abbreviations

2012-02-16 Thread Petr Savicky
On Thu, Feb 16, 2012 at 10:17:09AM +0100, Gian Maria Niccolò Benucci wrote: Dear List, I will appreciate any advice regarding how to convert the following numbers [I got in return by taxondive()] in numeric integers without the e.g. 6.4836e+01 abbreviations. Thank you very much in advance,

Re: [R] optparse::parse_args, using equals sign or not

2012-02-16 Thread Trevor Davis
Hi We've found that when using parse_args(..., positional_arguments=FALSE), it is permissible to invoke our script with either --myfoo=bar or --myfoo bar; that is, whether or not the equals sign is present makes no difference, and in fact both usage forms are demonstrated in the optparse

Re: [R] dotplots with error bars

2012-02-16 Thread Jim Lemon
On 02/16/2012 05:22 AM, Colin Wahl wrote: Thank you, Its looking like your package will work for me. I have two questions. First, how do I rotate the plot 90 degrees so the group labels are on the x axis and the response value on the y axis? Second, I'm having trouble with the group labels. I

[R] ACM Software Copyright and License Agreement

2012-02-16 Thread Hans W Borchers
ACM Software Copyright and License Agreement I have often seen the use of routines from the ACM Collected Algorithms, i.e. netlib.org/toms/ (CALGO, or Trans. On Math. Software, TOMS), in Open Source programs, maybe also in some R packages --- and sometimes these programs are distributed under the

[R] Reading spss files into R - warnings

2012-02-16 Thread Marion Wenty
Hello people, I have got a question concerning reading spss files into R: I used the package foreign and the following command: read.spss(C:/Eigene Dateien/myspssfile.sav,to.data.frame=T) I have read two different files into R (several times) and always got the following two warning messages:

Re: [R] How can we access element(s) of a time series object?

2012-02-16 Thread Paul Hiemstra
On 02/16/2012 08:08 AM, jpm miao wrote: FRW-ts(FRW0, frequency=4, start=c(1978,1)) Please make your example reproducible, we do not have FRW0. cheers, Paul -- Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt |

Re: [R] RODBC sqlSave / append problem (windows XP, R 2.13.2)

2012-02-16 Thread taby gathoni
Hi Mj, did you get a solution for this? I am  having the same error  Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' I would appreciate if you can share the solution with me. Kind regards, Taby From:

Re: [R] ggplot rank stack bar automatically.

2012-02-16 Thread Ista Zahn
Hi vd, The answer to the first part of your question is reorder. To continue the learnr example: df.m - transform(df.m, Period = reorder(Period, -1*value)) ggplot(df.m, aes(x = Period, y = value/1e+06, fill = Region)) + geom_bar(stat = identity, position = stack) For the second question:

Re: [R] save objects of own function to workspace

2012-02-16 Thread Marion Wenty
Hello Rolf, thank you for your advice! Though, I find there is no need to get personal about my stage of devolopment in R. Cheers, Marion 2012/2/15 Rolf Turner rolf.tur...@xtra.co.nz On 16/02/12 03:59, Marion Wenty wrote: SNIP Thank you for your answers! Jeff, thanks very much for

Re: [R] function similar to ddply? + calculations based on previous row

2012-02-16 Thread Ista Zahn
Hi, On Wednesday, February 15, 2012 08:02:44 AM Nerak wrote: Hi all, I was wondering if there is a function kind of similar that splits a dataframe, applies a function to each row and returns in a data frame. I know ddply but this one isn’t useful in this situation. Why not? Sounds like a

Re: [R] sequencing environments

2012-02-16 Thread Duncan Murdoch
On 12-02-15 11:58 PM, Ben quant wrote: Thank you Duncan. Interesting. I find it strange that you can't get a list of the environments. But I'll deal with it... I'd advise thinking really carefully about this, because I think it indicates you've got a mental model of R internals that isn't a

Re: [R] svm with GRASS GIS

2012-02-16 Thread Etienne B. Racine
2012/2/15 gab gis...@libero.it Errore in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$scaled:center, : (subscript) indice logicol troppo lungo I'm pretty sure the problem is with your data frame. Maybe if you share the result of dput(training[1:10, ]) # (make sure

[R] Is there a function for scatter3d with Categorical responses?

2012-02-16 Thread Steve_Friedman
Hello, I'm working with a series (30+) of hydrologic metrics and 10 vegetation communities and I need to determine which of the metrics provide the best separability for each of the vegetation communities. The hydrologic metrics are highly correlated, therefore the need to reduce the number

Re: [R] Is there a function for scatter3d with Categorical responses?

2012-02-16 Thread John Fox
Dear Steve, It's not obvious to me what you want to do. If you want ellipsoids for MeanAnnualDepth, Hydroperiod, and MedianWet, which sound as if they are numeric variables, separately for each VegtypeID, which is presumably a factor with several sets of measurements for each value, then

Re: [R] How can we access element(s) of a time series object?

2012-02-16 Thread R. Michael Weylandt
?window may help. Michael On Thu, Feb 16, 2012 at 3:08 AM, jpm miao miao...@gmail.com wrote: Hello,   Let us convert a vector to a time series object starting in 1978Q1:   FRW-ts(FRW0, frequency=4, start=c(1978,1))   FRW[3:6] represents the data from 1978Q3 to 1979Q2. Could we access the

Re: [R] Is there a function for scatter3d with Categorical responses?

2012-02-16 Thread Steve_Friedman
John, I would like ellipsoids to represent the distributions relative to each of the vegetation types. I tried your approach thinking that it would work as well, but I'm getting an error scatter3d(MADep2004 ~ Dhydro2004 + MedWet2004 | VegtypeID, ellipsoid=TRUE. data= CSSS) Error in sprintf

Re: [R] ggplot rank stack bar automatically.

2012-02-16 Thread R. Michael Weylandt
No I'm talking about changing the order (the first part of your question). What you see as dates on the axis aren't actually Dates (in the sense of the R class of that name) but rather factors. To R they are just labelled categories so it just uses an arbitrary order to plot them: if you

Re: [R] general question on Spotfire

2012-02-16 Thread John Smith
After one month of struggle, I lost confidence on Spotfire, it's totally not user-friendly. Yes it is very good for certain data presentation, but you still need do heavy lifting on data processing by other software. For me, R is the perfect tool and has best user supporting group. I send this

Re: [R] ACM Software Copyright and License Agreement

2012-02-16 Thread Berend Hasselman
On 16-02-2012, at 12:31, Hans W Borchers wrote: ACM Software Copyright and License Agreement I have often seen the use of routines from the ACM Collected Algorithms, i.e. netlib.org/toms/ (CALGO, or Trans. On Math. Software, TOMS), in Open Source programs, maybe also in some R packages I

Re: [R] Is there a function for scatter3d with Categorical responses?

2012-02-16 Thread John Fox
Dear Steve, I'm very busy this morning, so will reply briefly: the error message is self-explanatory (though the error message itself has an error in it, which prevented the numbers from being printed as intended): you have to define more colours -- one for each level of VegtypeID; if you want to

Re: [R] strucchange Nyblom-Hansen Test?

2012-02-16 Thread buehlerman
Achim Zeileis-4 wrote The reason for the various approaches is that efp() was always confined to the linear model and gefp() then extended it to arbitrary estimating function-based models. And for the linear model this provides the option of treating the variance of a nuisance

Re: [R] ACM Software Copyright and License Agreement

2012-02-16 Thread peter dalgaard
On Feb 16, 2012, at 12:31 , Hans W Borchers wrote: ACM Software Copyright and License Agreement I have often seen the use of routines from the ACM Collected Algorithms, i.e. netlib.org/toms/ (CALGO, or Trans. On Math. Software, TOMS), in Open Source programs, maybe also in some R packages

Re: [R] strucchange Nyblom-Hansen Test?

2012-02-16 Thread Achim Zeileis
On Thu, 16 Feb 2012, buehlerman wrote: Achim Zeileis-4 wrote The reason for the various approaches is that efp() was always confined to the linear model and gefp() then extended it to arbitrary estimating function-based models. And for the linear model this provides the option of treating

[R] Reading Text Files with RODBC

2012-02-16 Thread Nutter, Benjamin
I'm thoroughly stumped. I've been playing with RODBC and wanted to see if I could retrieve data from text files using this package as well (for the most part, this is an intellectual exercise, but occasionally I do get data files large enough in CSV format RODBC could be helpful) . I set up a

Re: [R] R-help Digest, Vol 108, Issue 16

2012-02-16 Thread Gian Maria Niccolò Benucci
Hi Petr, You advice options(scipen=20) gave me the expected result and fix the problem. Thanks a lot! Gian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Defining a viewport scale in {Grid}

2012-02-16 Thread geotheory
Am just feeling my way into the grid library, and cannot figure out how to define the plot limits. 3/5 of the example polygons below plot in the default 0-1 range viewport. But when I try to redefine the viewport the polygons plot in the same places. I also get the same result without employing

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread nymphita
Hi David, What an good solution. It works perfectly and it's really simple. (I only removed the 1+ in ncol=1+max(j), it already has 6 columns) My result has been: df - read.table(file=df.txt, head=T, sep=\t) df i j k 1 1 2 5.2 2 1 3 9.1 3 1 4 8.0 4 1 5 2.3 5 1 6 8.4 6 2 3 6.6 7 2

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread nymphita
Hi Michael, Your answer was very interesting, thank you! However, I tried it and the result was: df - read.table(file=df.txt, head=T, sep=\t) df i j k 1 1 2 5.2 2 1 3 9.1 3 1 4 8.0 4 1 5 2.3 5 1 6 8.4 6 2 3 6.6 7 2 4 7.4 8 2 5 7.1 9 2 6 5.5 10 3 4 4.1 11 3 5 3.9 12 3 6 9.2 13 4 5

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread nymphita
Hi Rui, Thank you very much for your idea. It works!!! I converted my dataframe into a vector (I first removed the header and the first and second column) and then tried your solution: data - as.vector(as.matrix(read.table(file=data.txt, head=F, sep=\t)[-c(1,2)])) data [1] 5.2 9.1 8.0 2.3

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread nymphita
Problem solved. Many many thanks for your ideas!! (this site is very stimulant) :) -- View this message in context: http://r.789695.n4.nabble.com/built-a-lower-triangular-matrix-from-dataframe-tp4390813p4393619.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread nymphita
Hi again, I just realized that in this solution there is something funny on the position the values in the matrix, they don't really correspond to the position indicated in the subscripts... However, David Winsemius has given a valid solution. Thank you for all your ideas! -- View this message

[R] Symbol size in plot relative to axis scale and not the graphics window

2012-02-16 Thread Hey, Kirsty
Dear all, I am wanting to plot points that have a defined absolute size relative to the scale of the axis. For example, the following gives me a plot with sizes relative to the defined size variable but are not of the specified absolute size (relative to the axis) coords -

Re: [R] Legend vanishes when placed outside the graph

2012-02-16 Thread David Zastrau
I figured it out: you have to pass the mar-argument to the plot function and than you may position the legend via inset. Have a nice day! From: David Zastrau Sent: Thursday, February 16, 2012 12:50 PM To: r-help@R-project.org Subject: Legend vanishes when placed outside the graph Hello

[R] Legend vanishes when placed outside the graph

2012-02-16 Thread David Zastrau
Hello everyone, i’ve got a problem with my diagram’s legend. I know i should be able to figure it out by reading the ‘plot’ and ‘legend’ reference. However nothing works so it would be kind if anyone could point me to the necessary parameters. The problem is that i’m moving the

[R] Different cp values by plotcp() and printcp() in rpart()

2012-02-16 Thread silje skår
hi, I have a question regarding cp values in rpart(). When I use plotcp() I get a figure with cp values on the x-axsis, but then I use printcp() the cp values in that list are different from the values in the figure by plotcp(). Does someone know why? Silje [[alternative HTML version

[R] extract weighting values from a relevance vector machine (kernlab package)

2012-02-16 Thread Martin Batholdy
Dear R-users, How can I extract the weighting values (w-values) for each feature from a rvm-object of the kernlab package? I can access the relevance vectors but how can I get the weighting values of each feature? example code: # create data x1 - rnorm(401,sd=1.10) x2 - rnorm(401,sd=1.10) x3

[R] how to rbind matrices from different loops

2012-02-16 Thread Matt Spitzer
Dear R experts, I am having difficulty using loops productively and would like to please ask for advice. I have a dataframe of ids and groups. I would like to break down the dataframe into groups, find the unique sets of ids, then reassemble. My thought was to use a loop, but I have been unable

[R] import .csv file into R

2012-02-16 Thread Marion Wenty
Dear r-helpers, I read a .csv file into R with the following command: A-read.csv2(file=Mappe3.csv) It worked fine, except that I would like to get rid of the points between the words and get spaces instead like I have got in the .csv file. At the moment it looks like the following:

[R] Multiple line-plot

2012-02-16 Thread David Studer
Hello everybody! I have again another newbie-question. I was trying to plot three curves within one single plot: Crime development (relative frequencies) according to the hours of tv consume per week (high/low/all together). Here are the data: par(mfrow=c(1,1)) # Data input

Re: [R] import .csv file into R

2012-02-16 Thread R. Michael Weylandt
check.names=FALSE but it's discouraged because it will make it hard to refer to column names inside R. Michael On Thu, Feb 16, 2012 at 11:18 AM, Marion Wenty marion.we...@gmail.com wrote: Dear r-helpers, I read  a .csv file into R with the following command: A-read.csv2(file=Mappe3.csv)

Re: [R] how to rbind matrices from different loops

2012-02-16 Thread jim holtman
Is this close to what you want: example - data.frame(id=rep( + ( abs(round(rnorm(50,mean=500,sd=250),digits=0))) + ,3), group=rep(1:15,10)) example -example[with(example,order(id,group)),] uniqueIDs - do.call(rbind + , lapply(split(example, example$group), function(.grp){ +

Re: [R] how to rbind matrices from different loops

2012-02-16 Thread jim holtman
If you want a row for each unique item: example - data.frame(id=rep( + ( abs(round(rnorm(50,mean=500,sd=250),digits=0))) + ,3), group=rep(1:15,10)) example -example[with(example,order(id,group)),] uniqueIDs - do.call(rbind + , lapply(split(example, example$group), function(.grp){ +

Re: [R] import .csv file into R

2012-02-16 Thread Marion Wenty
David, thanks for the tips, though, I tried these arguments but it didn' work. Michael, thanks for your advice which worked, so far. I am using my object to create a barplot afterwards, which automatically puts the colnames besides the bars. Maybe this is still a good solution for my purpose as I

Re: [R] import .csv file into R

2012-02-16 Thread R. Michael Weylandt
If you don't need to refer to colnames you should be fine. If you do need to subset by colnames, you can still do it with `[`, but you'll have trouble if you want to use the $ trick, unless you use back-ticks. Don't worry about these things if they aren't troubling you now though. Michael On

[R] creating series of vectors

2012-02-16 Thread Nino Pierantonio
Dear All, I am pretty new to R and thus my question may sound silly. Is there a way to automatically generate a series of separate vectors (so not arranged in a matrix), without typing and changing every time the values, and store them as separate *xlsx file, where the * is replaced by the

[R] how to get r-squared for a predefined curve or function with other data points

2012-02-16 Thread protoplast
hello mailing list! i still consider myself an R beginner, so please bear with me if my questions seems strange. i'm in the field of biology, and have done consecutive hydraulic conductivity measurements in three parallels (Sample), resulting in three sets of conductivity values (PLC for percent

[R] Repeated cross-validation for a lm object

2012-02-16 Thread samuel-rosa
Dear R users I'd like to hear from someone if there is a function to do a repeated k-fold cross-validation for a lm object and get the predicted values for every observation. The situation is as follows: I had a data set composed by 174 observations from which I sampled randomly a subset composed

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread Rui Barradas
Hello, I'm glad it helped. The difference in the ordering is due to the fact that R defaults to column-first ordering. David's solution uses row-first (which is what you wanted). Rui Barradas -- View this message in context:

Re: [R] import .csv file into R

2012-02-16 Thread Rui Barradas
Hello, I read a .csv file into R with the following command: A-read.csv2(file=Mappe3.csv) It worked fine, except that I would like to get rid of the points between the words and get spaces instead like I have got in the .csv file. Try gsub('\\.', ' ', A) (And see ?regexpr and

Re: [R] Defining a viewport scale in {Grid}

2012-02-16 Thread ilai
Read the Details section in ?viewport carefully. You are treating xscale/yscale as if they are xlim/ylim in base graphics. They are not. It may take some trial and error on your part to figure out how exactly this works, in general you are setting the size and location of each polygon relative to

Re: [R] Reading Text Files with RODBC

2012-02-16 Thread Gabor Grothendieck
On Thu, Feb 16, 2012 at 10:12 AM, Nutter, Benjamin nutt...@ccf.org wrote: I'm thoroughly stumped.  I've been playing with RODBC and wanted to see if I could retrieve data from text files using this package as well (for the most part, this is an intellectual exercise, but occasionally I do get

[R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Jun Shen
Dear list, Let's say I have data a=c(37.961,38.214,57.68) b=c(77.56,61.875,67.683) wilcox.test(a,b) the wilcoxon test only gives me a p value with one decimal place. Is this normal? Thanks. Jun [[alternative HTML version deleted]] __

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread Tsjerk Wassenaar
Hey, You could also use (after initializing x): x[lower.tri(x)] - data$k x - t(x) Cheers, Tsjerk On Feb 16, 2012 6:59 PM, Rui Barradas rui1...@sapo.pt wrote: Hello, I'm glad it helped. The difference in the ordering is due to the fact that R defaults to column-first ordering. David's

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Bert Gunter
On Thu, Feb 16, 2012 at 10:15 AM, Jun Shen jun.shen...@gmail.com wrote: Dear list, Let's say I have data  a=c(37.961,38.214,57.68)  b=c(77.56,61.875,67.683) wilcox.test(a,b) the wilcoxon test only gives me a p value with one decimal place. Is this normal? No, it's discrete :-)

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Ted Harding
On 16-Feb-2012 Bert Gunter wrote: On Thu, Feb 16, 2012 at 10:15 AM, Jun Shen jun.shen...@gmail.com wrote: Dear list, Let's say I have data _a=c(37.961,38.214,57.68) _b=c(77.56,61.875,67.683) the wilcoxon test only gives me a p value with one decimal place. Is this normal? No, it's

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jun Shen Sent: Thursday, February 16, 2012 10:16 AM To: R-help Subject: [R] Wilcoxon test p value with one decimal place Dear list, Let's say I have data

Re: [R] Defining a viewport scale in {Grid}

2012-02-16 Thread baptiste auguie
The default units of polygonGrob are npc, I think you want native instead. Try the following, library(grid) d = data.frame(x=rnorm(100, 10), y=rnorm(100, -100)) v = dataViewport(xData=d$x, yData=d$y) grid.points(d$x,d$y, default.units=native, vp=v) HTH, b. On 17 February 2012 02:47,

Re: [R] Multiple line-plot

2012-02-16 Thread Dallas
I think this is what you are getting at. Hope this helps. #index data to determine what low and high levels of tvHrs are (I said anything over 15 hours is considered 'high') index=which(tvHrs 15) #Plot the first plot, which is the 'high', only using values from crimeDvp that are in 'index'

[R] Graphing lines of different lengths

2012-02-16 Thread Jordan Patricia Sinclair
Hello all. I need to graph multiple lines of different lengths on the same graph. When I try to add lines I get an error due to different lengths. The only thing I could find when reading up on it was that 'if the data are inputted separately they must be of the same length'. Could someone

Re: [R] Fixing Gale-Shapley Algorithm for R

2012-02-16 Thread VictorDelgado
VictorDelgado wrote gsa - function(m, n, preference.row, preference.col, first) { # m: number of rows (men) # n: number of columns (women) # first 1 for row (men); and 2 for column (women) # # Two Auxiliary functions: # 1: min.n - function(x,n,value=TRUE){ s - sort(x,

Re: [R] Graphing lines of different lengths

2012-02-16 Thread ilai
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. On Thu, Feb 16, 2012 at 12:42 PM, Jordan Patricia Sinclair al8...@wayne.edu wrote: Hello all. I need to graph multiple lines of different lengths on

Re: [R] ACM Software Copyright and License Agreement

2012-02-16 Thread Berend Hasselman
On 16-02-2012, at 12:31, Hans W Borchers wrote: ACM Software Copyright and License Agreement I have often seen the use of routines from the ACM Collected Algorithms, i.e. netlib.org/toms/ (CALGO, or Trans. On Math. Software, TOMS), in Open Source programs, maybe also in some R packages ---

[R] Please take me off the mailing list

2012-02-16 Thread hyunjee hale
To whom it may concern: Please take my off the mailing list for R related emails. Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Howto plot ROC Curve Directly from SN/PPV

2012-02-16 Thread David Winsemius
On Feb 16, 2012, at 3:53 AM, Gundala Viswanath wrote: Dear expert, Given such data: #Cutpoint SN (1-PPV) 5 0.560.01 7 0.780.19 9 0.910.58 How can I plot ROC curve with R that produce similar result like the attached file? I know ROCR package but it

Re: [R] creating series of vectors

2012-02-16 Thread Petr Savicky
On Thu, Feb 16, 2012 at 05:32:15PM +0100, Nino Pierantonio wrote: Dear All, I am pretty new to R and thus my question may sound silly. Is there a way to automatically generate a series of separate vectors (so not arranged in a matrix), without typing and changing every time the values,

Re: [R] Reading Text Files with RODBC

2012-02-16 Thread Nutter, Benjamin
Ah, yes. If you can't find the answer to your question, ask a different question! sqldf does, indeed, do what I want. Thank you   Benjamin Nutter |  Biostatistician   |  Quantitative Health Sciences   Cleveland Clinic  |  9500 Euclid Ave.  |  Cleveland, OH 44195  | (216) 445-1365

Re: [R] built a lower triangular matrix from dataframe

2012-02-16 Thread R. Michael Weylandt
I didn't think through mine all the way -- you do need the cbind() call to do the indexing like I was thinking -- so mine when corrected just turns into David's. Michael On Thu, Feb 16, 2012 at 5:26 AM, nymphita sandrablazquezcabr...@gmail.com wrote: Hi Michael, Your answer was very

Re: [R] help with e+01 number abbreviations

2012-02-16 Thread Greg Snow
Also look at the zapsmall function. A useful but often overlooked tool. On Thu, Feb 16, 2012 at 2:54 AM, Petr Savicky savi...@cs.cas.cz wrote: On Thu, Feb 16, 2012 at 10:17:09AM +0100, Gian Maria Niccolò Benucci wrote: Dear List, I will appreciate any advice regarding how to convert the

Re: [R] Legend vanishes when placed outside the graph

2012-02-16 Thread David Winsemius
On Feb 16, 2012, at 6:50 AM, David Zastrau wrote: Hello everyone, i’ve got a problem with my diagram’s legend. I know i should be able to figure it out by reading the ‘plot’ and ‘legend’ reference. However nothing works so it would be kind if anyone could point me to the necessary

Re: [R] creating series of vectors

2012-02-16 Thread ilai
# All days in years 2006 to 2009 by month in 48 (12x4) files. days - seq(as.Date(2006/1/1), as.Date(2009/12/31),by=day) # one long vector out - paste(rep(format(days,'%d%m%y'),each=2),c('aaa','bbb'),sep='_') # reformat to style month - factor(rep(format(days,'%B%y'),each=2)) # group by

Re: [R] how to get r-squared for a predefined curve or function with other data points

2012-02-16 Thread David Winsemius
On Feb 16, 2012, at 11:43 AM, protoplast wrote: hello mailing list! i still consider myself an R beginner, so please bear with me if my questions seems strange. i'm in the field of biology, and have done consecutive hydraulic conductivity measurements in three parallels (Sample), resulting

Re: [R] RODBC sqlSave / append problem (windows XP, R 2.13.2)

2012-02-16 Thread matthew-c.johnson
Hi Taby, i could not work out how to add to a table, so what i did was to kill the old one and write a new one -- here is a snippet of my code: # delete the old table sqlDrop(con, sqtable=__mytable__) # note this will hang if the table cannot be found # insert the new table

Re: [R] Graphing lines of different lengths

2012-02-16 Thread David Winsemius
On Feb 16, 2012, at 2:42 PM, Jordan Patricia Sinclair wrote: Hello all. I need to graph multiple lines of different lengths on the same graph. ?segments When I try to add lines I get an error due to different lengths. The only thing I could find when reading up on it was that 'if the

[R] Problem building up ggplot graph in a loop.

2012-02-16 Thread Keith Weintraub
Folks, I want to automate some graphing using ggplot. Here is my code graphChargeOffs2-function(coffs) { ggplot(coffs, aes(levels)) dataNames-names(coffs)[!names(coffs) == levels] for(i in dataNames) { thisData-coffs[[i]] last_plot() + geom_line(aes(y = thisData, colour = i)) }

Re: [R] stats::reshape question

2012-02-16 Thread Krishna Tateneni
It's been a long time since this topic was posted, but I recently had occasion to use stats::reshape again. This time, I looked closer at the code for the function so I could understand what was going on. I now realize that if the argument varying is a vector of names (as I had) rather than a

Re: [R] Problem building up ggplot graph in a loop.

2012-02-16 Thread Justin Haynes
ggplot is looking for thisData as a column of coffs. the most 'ggplotesque' way of doing this would be: # melt your data to a long format: coffs.melt - melt(coffs, id.vars = 'levels') # plot using colour aes parameter: ggplot(coffs.melt, aes(x=levels, y=value, colour=variable)) + geom_line() +

[R] time series manipulation what functions are best

2012-02-16 Thread Henry
Newbie question - mechanical engineer trying to learn R I've had success with plotting time series data and even made a heat map using R Graphs Cookbook by Mittal. I have a new problem - I need to align a number of time series data columns to the desired regular exact time stamp vector. The target

[R] time series interpolation - zoo? approx? spline? what to use?

2012-02-16 Thread Henry
Please see my question from a few minutes ago - I wanted to improve the title. -- View this message in context: http://r.789695.n4.nabble.com/time-series-interpolation-zoo-approx-spline-what-to-use-tp4395975p4395975.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] time series interpolation - zoo? approx? spline? what to use?

2012-02-16 Thread Hasan Diwan
Sir, On 16 February 2012 16:55, Henry hcco...@lbl.gov wrote: Please see my question from a few minutes ago - I wanted to improve the title. xts über alles -- H -- Sent from my mobile device Envoyait de mon portable __ R-help@r-project.org mailing

Re: [R] How can we access element(s) of a time series object?

2012-02-16 Thread jpm miao
Thank you very much for your reply. The command window does help. a1-11:22 a1ts-ts(a1, frequency=4, start=c(1978,1)) a1tsw-window(a1ts, c(1978,3), c(1979,2) ) a1tsw Qtr1 Qtr2 Qtr3 Qtr4 1978 13 14 1979 15 16 a1tsw[2:3][1] 14 15 2012/2/16 R. Michael Weylandt

Re: [R] time series manipulation what functions are best

2012-02-16 Thread Gabor Grothendieck
On Thu, Feb 16, 2012 at 7:31 PM, Henry hcco...@lbl.gov wrote: Newbie question - mechanical engineer trying to learn R I've had success with plotting time series data and even made a heat map using R Graphs Cookbook by Mittal. I have a new problem - I need to align a number of time series data

  1   2   >