Re: [R] Wilcoxon Rank Sum in R with a multiple testing correction

2010-11-23 Thread Tal Galili
For the BH, you can use the command ?p.adjust(..., "BH") For reading the files in and doing the analysis, here is an example: http://www.r-tutor.com/elementary-statistics/non-parametric-methods/wilcoxon-signed-rank-test You'd then need to extract all the P values like this: x <- wilcox.test(... )

Re: [R] Frequency tables including the zero frequencies

2010-11-23 Thread Jorge Ivan Velez
Hi Liliana, Try > table(factor(x, levels = 0:10)) 0 1 2 3 4 5 6 7 8 9 10 0 2 0 6 0 2 2 1 0 1 6 Also, see ?factor. HTH, Jorge On Tue, Nov 23, 2010 at 10:29 PM, Liliana Pacheco <> wrote: > Hi R users > I want to make a table of frequencies to show how many times the numbe

[R] Frequency tables including the zero frequencies

2010-11-23 Thread Liliana Pacheco
Hi R users I want to make a table of frequencies to show how many times the numbers form 0 to 10 appear in a vector. For example, if the vector is: > x [1] 5 10 3 5 10 10 3 6 10 1 10 3 7 1 10 3 6 9 3 3 In this case I want a table that will show that the zero has frequency 0, the o

Re: [R] Difficulty loading packages in R version 2.12.0

2010-11-23 Thread Peter Alspach
Tena koe John I got a similar message with a different package, and solved it by loading the latest version of the package (which was built under 2.12.0). So you may need to get around your institutional firewall! HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-p

[R] Difficulty loading packages in R version 2.12.0

2010-11-23 Thread john moran
Hello, I wonder if I could get advice on the above problem I have just installed V 2.12.0 (I chose only the 32-bit version) into a new directory (C:/R) on a 64bit Windows 7 machine > sessionInfo() R version 2.12.0 (2010-10-15) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COL

Re: [R] Filled contour plot showing labeled isolines?

2010-11-23 Thread David Winsemius
On Nov 23, 2010, at 6:25 PM, jt306 wrote: Is it possible to create a contour plot with the isolines labeled. I know you can do this with Matlab. Argh! It is fairly straightforward with lattice::levelplot. Provide some sample data. I tried creating a filled contour plot, then using

[R] Wilcoxon Rank Sum in R with a multiple testing correction

2010-11-23 Thread selthy
Hi there, I'm a total newbie to R. I'd like to use a Wilcoxon Rank Sum test to compare two populations of values. Further, I'd like to do this simultaneously for 114 sets of values. The two populations are C and N. The different sets of values have arbitrary names (I'll call them a, b, c etc). The

[R] Filled contour plot showing labeled isolines?

2010-11-23 Thread jt306
Is it possible to create a contour plot with the isolines labeled. I know you can do this with Matlab. Argh! I tried creating a filled contour plot, then using par(new=T), followed by overlaying the contour plot on top. However, the placement of the filled contour plot and the contour plot do

Re: [R] How to combine Date and time in one column

2010-11-23 Thread Nikos Rachmanis
Thanks Gabor! Work perfectly! This is the code i used. z <- read.zoo(lines, header = TRUE, index = list(1, 2), FUN = function(d,t) as.POSIXct(paste(date,time), format = "%m/%d/%Y %H:%M")) On Tue, Nov 23, 2010 at 8:07 PM, Gabor Grothendieck wrote: > On Tue, Nov 23, 2010 at 7:56 PM, Nikos Rachman

Re: [R] How to combine Date and time in one column

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 7:56 PM, Nikos Rachmanis wrote: > Hi Gabor, > Thanks very much for the suggestion. It worked well until the point that i > tried to plot the xts object. here is my code and the error message. > lines<-data.frame(date,time,open,high, low,close) #create a dataframe with > all

Re: [R] How to combine Date and time in one column

2010-11-23 Thread Nikos Rachmanis
Hi Gabor, Thanks very much for the suggestion. It worked well until the point that i tried to plot the xts object. here is my code and the error message. lines<-data.frame(date,time,open,high, low,close) #create a dataframe with all the variables z <- read.zoo(lines, header = TRUE, index = list(1

Re: [R] scan function

2010-11-23 Thread Phil Spector
Martin - Type help(scan) or ?scan to see scan's help file, which includes: quiet: logical: if ‘FALSE’ (default), scan() will print a line, saying how many items have been read. So adding quiet=TRUE to your call to scan will suppress the message.

Re: [R] scan function

2010-11-23 Thread Henrique Dallazuanna
Try this: scan(..., quiet = TRUE) On Tue, Nov 23, 2010 at 9:01 PM, Martin Knapp wrote: > Hi, > I'm using R2.8.1 in windows vista and the scan function to load in my > data. That works all fine except that I get a message after the scan > function finishes. It tells me how many items the function

[R] scan function

2010-11-23 Thread Martin Knapp
Hi, I'm using R2.8.1 in windows vista and the scan function to load in my data. That works all fine except that I get a message after the scan function finishes. It tells me how many items the function has read. For example "Read 202035 items". That would not be a problem but this is printed in the

[R] Factor analysis and cfa with asymptotically distributed data

2010-11-23 Thread Jeanine Grütter
I have friendship data which is strong skewed. So it doesn't make sense to use maximum likelihood methods for fa and cfa. But I couldn't find any function for asymptotically distributed data for doing a factor analysis. Only: apca() but there is no possibility to allow for factor correlations.

Re: [R] How to do a stochastic model in R

2010-11-23 Thread David Winsemius
This wasn't a completed answer. (I hit the send button by accident.) The code only fills in a small poertion of the matrix. ) -- David. On Nov 23, 2010, at 4:48 PM, David Winsemius wrote: On Nov 23, 2010, at 3:26 PM, Barroso, Judit wrote: Dear all of you, I would like to get some help fr

Re: [R] Tobit model on unbalanced panel

2010-11-23 Thread Achim Zeileis
On Tue, 23 Nov 2010, Liang Peng wrote: Appreciate any suggestions regarding how to fit an unbalanced panel data to a Tobit model using R functions. I am trying to analyze how real estate capital expenditures (CapEx) are affected by market conditions using a panel Tobit model. The CapEx is either

Re: [R] overlay histograms on map at map coordinates

2010-11-23 Thread Paul Murrell
Hi On 23/11/2010 5:41 p.m., Steve Bellan wrote: Hi all, I'm trying to visualize animal movement data characteristics spatiotemporally by overlaying many different histograms on a map. I want the histograms to be plotted at coordinates in the map that matches a region they describe. If I was j

[R] Tobit model on unbalanced panel

2010-11-23 Thread Liang Peng
Appreciate any suggestions regarding how to fit an unbalanced panel data to a Tobit model using R functions. I am trying to analyze how real estate capital expenditures (CapEx) are affected by market conditions using a panel Tobit model. The CapEx is either positive or 0, so it is censored. The dat

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 5:03 PM, Manta wrote: > > > Gabor Grothendieck wrote: >> >> How to convert a monthly series to a daily series has already been >> illustrated in multiple ways in this thread. >> > > Fair enough. However, my last question was different. I simply want to know > if there is a

Re: [R] RGoogleDocs stopped working

2010-11-23 Thread Harlan Harris
At this point, I'm giving up on this issue. The stage of our project requiring daily use of Google Docs ended, thankfully, about a week before this problem arose. I was able to just export the spreadsheet for further analysis, rather than relying on the Google Spreadsheet. If this problem had arise

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Manta
Gabor Grothendieck wrote: > > How to convert a monthly series to a daily series has already been > illustrated in multiple ways in this thread. > Fair enough. However, my last question was different. I simply want to know if there is a simple neat way to import a monthly series as a zoo object

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 4:41 PM, Manta wrote: > > > Gabor Grothendieck wrote: >> >>> 2. How to import using as index 'Date' a monthly series (code below). The >>> series in the US CPI from November 1979 to October 2010. >>> >>> z <- zoo(cpius$Value, as.Date("1979-11-30")+0:372) >> >> Assuming the

Re: [R] How to do a stochastic model in R

2010-11-23 Thread David Winsemius
On Nov 23, 2010, at 3:26 PM, Barroso, Judit wrote: Dear all of you, I would like to get some help from you. Here I attach you a model, that I would like to be stochastic so I would need each time the value of x changed, the values of parameters (ss, emrg, gf, spp, sr) did too according to

Re: [R] how to update my own function

2010-11-23 Thread Edwin Sun
Thank you all the reply. The use of sys.call() as suggested by Ducan works pretty well. This is good as the outputs from my function are large. The use of apply family functions as suggested by Erik is good for small amounts of outputs. Edwin Sun -- View this message in context: http://r.78969

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Manta
Gabor Grothendieck wrote: > >> 2. How to import using as index 'Date' a monthly series (code below). The >> series in the US CPI from November 1979 to October 2010. >> >> z <- zoo(cpius$Value, as.Date("1979-11-30")+0:372) > > Assuming the question is how to turn this daily series into a monthly

Re: [R] how to update my own function

2010-11-23 Thread Erik Iverson
Edwin - I think the usual way to do this would be to use a function like lapply or mapply to call your function multiple times with varying arguments. For example, with one varying argument: lapply(list(3,5), test, z = 4) With multiple varying arguments: mapply(test, y = list(3,5), z = list(4,

Re: [R] how to update my own function

2010-11-23 Thread Duncan Murdoch
On 23/11/2010 4:21 PM, Edwin Sun wrote: Hello all, I wrote a function with many arguments. Then I need to call it many times with changes on some arguments only. Is there any way to write a function or have a method to "update" it, like the relationship between lm() and update()? Many thanks,

Re: [R] How to do a stochastic model in R

2010-11-23 Thread Carl Witthoft
Seems to me you're going about it in a bit of a difficult way. Assuming you know you want to run 20 samples (x = 1 to 20), just generate sets of 20 random variables for each of your inputs. for example, ss <-rnorm(20,mean=.3, sd=.08) Then inside the loop, replace "ss" with "ss[x]" By the

[R] how to update my own function

2010-11-23 Thread Edwin Sun
Hello all, I wrote a function with many arguments. Then I need to call it many times with changes on some arguments only. Is there any way to write a function or have a method to "update" it, like the relationship between lm() and update()? Many thanks, Edwin Sun This is the sampl

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 3:58 PM, Manta wrote: > > Ok this helps definitely! But I still would like to know > > 1. How to change from one index to another within a 'zoo' object Using z <- zooreg(1:10, start = as.yearmon("2000-01"), freq = 12) Try aggregate(z, as.Date, identity) or ti

Re: [R] Help with grouped barplot

2010-11-23 Thread Dennis Murphy
Hi: Here are some possibilities using ggplot2: library(ggplot2) # Create ordered factors bar$area2 <- ordered(bar$area) bar$year2 <- ordered(bar$year) # Side-by-side, aka dodged, bar charts ggplot(bar, aes(x = area2, y = disc, fill = year2)) + geom_bar(aes(group = year2), position = 'dodge

Re: [R] the first. from SAS in R

2010-11-23 Thread William Dunlap
I often use code like Curt's encapsulated in the following isFirstInRun function: isFirstInRun <- function(x,...) { lengthX <- length(x) if (lengthX == 0) return(logical(0)) retVal <- c(TRUE, x[-1]!=x[-lengthX]) for(arg in list(...)) { stopifnot(lengthX == lengt

Re: [R] cross validation using e1071:SVM

2010-11-23 Thread Max Kuhn
Neeti, I'm pretty sure that the error is related to the confusionMAtrix call, which is in the caret package, not e1071. The error message is pretty clear: you need to pas in two factor objects that have the same levels. You can check by running the commands: str(pred_true1) str(species_tes

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Manta
Ok this helps definitely! But I still would like to know 1. How to change from one index to another within a 'zoo' object 2. How to import using as index 'Date' a monthly series (code below). The series in the US CPI from November 1979 to October 2010. z <- zoo(cpius$Value, as.Date("1979-11-30")

Re: [R] Sampling from multi-dimensional kernel density estimation

2010-11-23 Thread Greg Snow
Generating new data from a kernel density estimate is equivalent to choosing a point from your data at random, then generating a point from your kernel centered at the chosen point. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

Re: [R] how do remove those predictor which have p value greater than 0.05 in GLM?

2010-11-23 Thread Greg Snow
What Frank was trying to tell you is that the p-values don't have much meaning if you do stepwise regression (sometimes they are worse than useless). The p-values are computed based on certain assumptions, once you remove a variable because it is "Not Significant", then recompute, those assumpt

[R] How to do a stochastic model in R

2010-11-23 Thread Barroso, Judit
Dear all of you, I would like to get some help from you. Here I attach you a model, that I would like to be stochastic so I would need each time the value of x changed, the values of parameters (ss, emrg, gf, spp, sr) did too according to a normal distribution, with mean its value and standard

Re: [R] autocorrelation in count data

2010-11-23 Thread dave fournier
You can fit this model with AD Model Builder's random effects module. there is an example fitting a Poisson and negative binomial to the venerable polio data set with ar(1) random effects at http://admb-project.org/examples/count-data/negative-binomial-serially-correlated-counts A big

Re: [R] save a regression model that can be used later

2010-11-23 Thread Greg Snow
One possibility for what is happening is that when you load the object it does not automatically load the package as well, so you get an error when working with the object. Try loading lme4 package in a new session, then load the saved object and see if things work for you. -- Gregory (Greg)

Re: [R] Barplot and plot means with confidence intervals in the same plot

2010-11-23 Thread Yuliya Matveyeva
2010/11/23 Ignacio Alborés > I want to obtain a barplot with error bars and a mean plot with error bars > with other scale on the left in the same plot. I need help to get the > same > x axis (centered) when overlay two plots (barplot2 and plotCI (or > lineplot.CI) with errorbars), with difere

Re: [R] how to add frequencies to barplot

2010-11-23 Thread Greg Snow
I would suggest reading the discussion (all the posts) starting at: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html This gives reasons for not doing what you are asking along with some alternatives. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare gre

Re: [R] overlay histograms on map at map coordinates

2010-11-23 Thread Greg Snow
Look at the subplot 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 St

Re: [R] Help with grouped barplot

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 2:49 PM, Art Burke wrote: > Given the data structure below, how can I create a bar plot for the values of > disc for each area grouped by year? > > bar <-structure(list(year = c(2003, 2003, 2003, 2003, 2003, 2003, 2003, > 2007, 2007, 2007, 2007, 2007, 2007, 2007), area = s

[R] Help with grouped barplot

2010-11-23 Thread Art Burke
Given the data structure below, how can I create a bar plot for the values of disc for each area grouped by year? bar <-structure(list(year = c(2003, 2003, 2003, 2003, 2003, 2003, 2003, 2007, 2007, 2007, 2007, 2007, 2007, 2007), area = structure(c(6L, 4L, 1L, 2L, 3L, 5L, 7L, 6L, 4L, 1L, 2L, 3L,

Re: [R] Possible to pretty-printing using str()?

2010-11-23 Thread Janko Thyson
Aha: capture.output(str(x)) Sorry for the two previous eMails, but sometimes posting to the list helps me thinking somehow ;-) Greetz, Janko > -Ursprüngliche Nachricht- > Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > Im Auftrag von Janko Thyson > Gesendet: Die

Re: [R] Possible to pretty-printing using str()?

2010-11-23 Thread Duncan Murdoch
On 23/11/2010 2:35 PM, Janko Thyson wrote: A short annotation: I already considered deparsing the object via deparse(x), but that's not exactly the info I'd like. I'm only interested in a short summary like str() would give me, not in the deparsed object. I think you need to give more details.

Re: [R] Executing multiple .R files

2010-11-23 Thread Henrik Bengtsson
See R.utils package and sourceDirectory(), e.g. sourceDirectory("R/"); You can also specify that you only want to reload files that have been modified, e.g. sourceDirectory("R/", modifiedOnly=TRUE); /Henrik On Tue, Nov 23, 2010 at 7:04 AM, Santosh Srinivas wrote: > Hello R-Helpers, > > I have

Re: [R] Possible to pretty-printing using str()?

2010-11-23 Thread Janko Thyson
A short annotation: I already considered deparsing the object via deparse(x), but that's not exactly the info I'd like. I'm only interested in a short summary like str() would give me, not in the deparsed object. Thx, Janko ## SYSTEM INFO ## Windows XP SP3 R 2.12.0 (patched as of

Re: [R] the first. from SAS in R

2010-11-23 Thread Seeliger . Curt
> > ... > > # I've found I need to lag a column to mimic SAS' first. > > # operator, thusly, though perhaps someone else knows > > # differently. Note this does not work on unordered > > # dataframes! > > lag.k1 <- c(NA, tt$k1[1:(nrow(tt) - 1)]) > > tt$r.first.k1 <- ifelse(is.na(lag.k1), 1, tt$k1

[R] Possible to pretty-printing using str()?

2010-11-23 Thread Janko Thyson
Dear list, I'm looking for a suitable way to sort of "one-line-pretty-print" an arbitrary R object in some of my log outputs. Consider this: cat(paste("The object/value is: ", x, ".", sep=""), sep="\n") No problem if x is of class: - character (length=1) - numeric (length=1) - logical

Re: [R] specifying colours in a ggplot2 piechart

2010-11-23 Thread baptiste auguie
Colour affects the lines and points in ggplot2, whilst fill is for areas (polygons, etc.) By the way, I can't type either -- I meant last_plot(). baptiste On 23 November 2010 20:18, John Kane wrote: > Obviously I cannot type or spell. > > Your solution was great but do you have any idea why >

Re: [R] specifying colours in a ggplot2 piechart

2010-11-23 Thread John Kane
Obviously I cannot type or spell. Your solution was great but do you have any idea why scale_colour_manual(value=mycolours) does not work. More typos on my part or am I misunderstanding what scale_colour_manual(value=mycolours) is supposed to do? Thanks --- On Tue, 11/23/10, baptiste augu

Re: [R] the first. from SAS in R

2010-11-23 Thread Charles C. Berry
On Tue, 23 Nov 2010, seeliger.c...@epamail.epa.gov wrote: Is there any similar function in R to the first. in SAS? ?duplicated a$d <- ifelse( duplicated( a$a ), 0 , 1 ) a$d.2 <- as.numeric( !duplicated( a$a ) ) Actually, duplicated does not duplicate SAS' first. operator, though

Re: [R] specifying colours in a ggplot2 piechart

2010-11-23 Thread baptiste auguie
fixing the various typos in your code, this works, lat_plot() + scale_fill_manual(value=mycolours) HTH, baptiste On 23 November 2010 19:47, John Kane wrote: > Someone was asking how to do a 16 category piechart in OpenOffice Calc and it > appears that it can not be done (which we, probably, s

[R] Barplot and plot means with confidence intervals in the same plot

2010-11-23 Thread Ignacio Alborés
I want to obtain a barplot with error bars and a mean plot with error bars with other scale on the left in the same plot. I need help to get the same x axis (centered) when overlay two plots (barplot2 and plotCI (or lineplot.CI) with errorbars), with diferent y axis. I use par (new=T) but the X

[R] specifying colours in a ggplot2 piechart

2010-11-23 Thread John Kane
Someone was asking how to do a 16 category piechart in OpenOffice Calc and it appears that it can not be done (which we, probably, should be happy about) but I thought that I'd try it in ggplot2. It works but I then thought I'd like to make the colours more distinctive but fro some reason I do

Re: [R] the first. from SAS in R

2010-11-23 Thread Seeliger . Curt
> > Is there any similar function in R to the first. in SAS? > ?duplicated > > a$d <- ifelse( duplicated( a$a ), 0 , 1 ) > > a$d.2 <- as.numeric( !duplicated( a$a ) ) Actually, duplicated does not duplicate SAS' first. operator, though it may suffice for the OP's needs. To illustra

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 1:11 PM, Manta wrote: > > Thanks as always Gabor. > > What I was looking for was to plot the daily series on the same graph of the > monthly using the command 'lines'. That is why I wanted to change the index > of one of the two, as it seems the reason why at the moment it

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Manta
Thanks as always Gabor. What I was looking for was to plot the daily series on the same graph of the monthly using the command 'lines'. That is why I wanted to change the index of one of the two, as it seems the reason why at the moment it is not working! -- View this message in context: http:/

Re: [R] Plot two zoo object with different indexes

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 12:53 PM, Manta wrote: > > Dear R community, I have the following two zoo objects: > > MONTHLY CPI > >> plot(z) >> par("usr") > [1] 1977.76333 2011.15333   70.39856  227.03744 >> z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12) >> str(z) > ‘zooreg’ series from Nov 1

[R] Plot two zoo object with different indexes

2010-11-23 Thread Manta
Dear R community, I have the following two zoo objects: MONTHLY CPI > plot(z) > par("usr") [1] 1977.76333 2011.15333 70.39856 227.03744 > z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12) > str(z) ‘zooreg’ series from Nov 1979 to Oct 2010 Data: num [1:372] 76.2 77 77.8 78.5 79.5 80.3

Re: [R] PROC COMPARE

2010-11-23 Thread Joshua Wiley
Hi James, Here is another option: all.equal() is more general, the sapply() option I wrote assumes both data frames are basically the same, but that maybe a few elements are different (e.g., you have two data sets and are not sure which is more recent). y <- x <- iris # x & y copies of iris ## c

[R] effect that cluster sampling has on count data (extra-multinomial or extra-binomial variation?)

2010-11-23 Thread Powers, Randall - BLS
I'm wondering if R has a package for generating count data subject to extra-multinomial variation (or extra-binomial variation?)?? In other words, the effect that cluster sampling has on count data. For example: Have a multinomial (p,n) distribution with p=(p11, p12,p21,p22) and n=number of unit

Re: [R] the first. from SAS in R

2010-11-23 Thread Charles C. Berry
On Tue, 23 Nov 2010, David Winsemius wrote: On Nov 23, 2010, at 11:04 AM, Charles C. Berry wrote: On Tue, 23 Nov 2010, Dennis Murphy wrote: > Interesting. Check this out: > > u <- sample(c(TRUE, FALSE), 10, replace = TRUE) > > u > [1] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FA

Re: [R] Question about list function

2010-11-23 Thread jim holtman
Try this: > input <- textConnection("var1 a + var2 b + var3 c + var4 d + var5 e") > x <- read.table(input, as.is = TRUE) > close(input) > # create a list > xList <- as.list(x$V2) > names(xList) <- x$V1 > xList $var1 [1] "a" $var2 [1] "b" $var3 [1] "c" $var4 [1] "d" $var5 [1] "e" > On Tue, N

Re: [R] Question about list function

2010-11-23 Thread Henrique Dallazuanna
Try this: as.list(scan("your_txt_file")) On Tue, Nov 23, 2010 at 3:05 PM, Guido Leoni wrote: > Dear List I'm a newbie R user. > I'm utilizing the list function in order to make a var like this: > clusters<-list(a=var1,b=var2) My problem is that the total numer of > variables that I need to

Re: [R] PROC COMPARE

2010-11-23 Thread Henrique Dallazuanna
See all.equal, a toy example: all.equal(iris, Orange) On Tue, Nov 23, 2010 at 3:17 PM, Jim Edd Jones wrote: > Is it possible to use R to compare two datasets to look for discrepancies, > as one would with the SAS procedure PROC COMPARE? > > Any help on this would be greatly appreciated. > > Ja

[R] PROC COMPARE

2010-11-23 Thread Jim Edd Jones
Is it possible to use R to compare two datasets to look for discrepancies, as one would with the SAS procedure PROC COMPARE? Any help on this would be greatly appreciated. James E. Jones 135 Salina St. Lafayette, CO 80026 [[alternative HTML version deleted]] __

Re: [R] cross validation using e1071:SVM

2010-11-23 Thread Neeti
could anyone help me with my last problem. if the question is not clear please let me know thank you Hi everyone I am trying to do cross validation (10 fold CV) by using e1071:svm method. I know that there is an option (“cross”) for cross validation but still I wanted to make a funct

Re: [R] cross validation using e1071:SVM

2010-11-23 Thread Neeti
@Francial Giscard LIBENGUE please post your query again so that with different subject -- View this message in context: http://r.789695.n4.nabble.com/cross-validation-using-e1071-SVM-tp3055335p3055831.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] problem with parameters

2010-11-23 Thread Joshua Wiley
Hi Andrea, Help us help you. Please read this: http://www.R-project.org/posting-guide.html and then reply to the list with more details on what you have, what you have tried, and what you expect the results to be. Then we can get you started (and maybe even finished). To borrow from Sherlock Ho

Re: [R] Three-way ANOVA shows me two-way results

2010-11-23 Thread Mike Marchywka
> From: tal.gal...@gmail.com > Date: Tue, 23 Nov 2010 18:14:39 +0200 > To: m.t.h...@ai.rug.nl > CC: r-help@r-project.org > Subject: Re: [R] Three-way ANOVA shows me two-way results > > It seems your model defines more parameters then your data permits (e.g: > singular). > if you do googl

[R] problem with parameters

2010-11-23 Thread alkalinetrio
Hi, I just downloaded R, but I can't create a matrix with a parameter p. Could someone help me please? Andrea -- View this message in context: http://r.789695.n4.nabble.com/problem-with-parameters-tp3055682p3055682.html Sent from the R help mailing list archive at Nabble.com.

[R] Question about list function

2010-11-23 Thread Guido Leoni
Dear List I'm a newbie R user. I'm utilizing the list function in order to make a var like this: clusters<-list(a=var1,b=var2) My problem is that the total numer of variables that I need to include in my list is up to 200. I've the text string with the complete list of my variables but is too l

Re: [R] Finding the rows with the duplicated index

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 11:49 AM, Santosh Srinivas wrote: > Thanks. Sorry about the naming (just cobbled the example). > The rows are duplicate in the actual data. I am looking for a way to find > the number of duplicate rows for each unique rowindex combination which is > based on columns 1:6. >

Re: [R] Finding the rows with the duplicated index

2010-11-23 Thread Santosh Srinivas
Thanks. Sorry about the naming (just cobbled the example). The rows are duplicate in the actual data. I am looking for a way to find the number of duplicate rows for each unique rowindex combination which is based on columns 1:6. -Original Message- From: Gabor Grothendieck [mailto:ggrothe

Re: [R] How to bold items on a data frame?

2010-11-23 Thread Joshua Wiley
Hi Stephen, bold is presentation type idea, you can do it in reports (e.g., via Sweave in LaTeX with \textbf{} or \mathbf{}), or graphs from R (e.g., make your title bold: expression(bold("Your Title"))), but it is not something you do in R itself. Some front ends to R or text editors may provide

Re: [R] question about constraint minimization

2010-11-23 Thread Hans W Borchers
dhacademic gmail.com gmail.com> writes: > Hi, > > I have struggled on this "bound optimization with equality constraint" by > using optim function for two days, but still fail to prepare a good input. > Can anyone help to prepare the input for my specific case? Many thanks. > > Best, > Hao Yo

[R] How to bold items on a data frame?

2010-11-23 Thread Stephen Liu
Hi folks, I ran following commands to create a data file: Year <- c(1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990) Yield <- c(60, 50, 70, 70, 80, 50, 60, 40) Concentration% <- c(30, 40, 50, 60, 70, 80, 90, 100) Temperature <- c(56, 47, 53, 53, 56, 47, 44, 44) datafile <- data.frame(Year,Yield,C

Re: [R] the first. from SAS in R

2010-11-23 Thread David Winsemius
On Nov 23, 2010, at 11:04 AM, Charles C. Berry wrote: On Tue, 23 Nov 2010, Dennis Murphy wrote: Interesting. Check this out: u <- sample(c(TRUE, FALSE), 10, replace = TRUE) u [1] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE class(u) [1] "logical" u + 0 [1] 0 0 1 0 0 1 0 0

Re: [R] Finding the rows with the duplicated index

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 11:04 AM, Santosh Srinivas wrote: > Hello Group, > > I have a huge time series dataset with sample below. I am basically trying > to read it into a zoo object with columns 1:6 to index. Zoo issues a warning > that some of the rows have duplicated index. > > dput(z) > struct

Re: [R] Slow update(insert) on Data.frame

2010-11-23 Thread Charles C. Berry
On Tue, 23 Nov 2010, Joel wrote: Hi When I try to update an number in a large data.frame by its pos It's really slow it take almost a sec to do this and I wonder why and if where is any faster way to update a number in a data.frame ive tried DF$col[POS]<-number DF[xPOS,yPOS]<-number See

Re: [R] the first. from SAS in R

2010-11-23 Thread David L Lorenz
It all has to do with the precedence of the ! operator. Compare !duplicated(v) + 0 with (!duplicated(v)) + 0 Dave From: "Charles C. Berry" To: Dennis Murphy Cc: r-help@r-project.org Date: 11/23/2010 10:08 AM Subject: Re: [R] the first. from SAS in R Sent by: r-help-boun...@r-project.org On

Re: [R] Three-way ANOVA shows me two-way results

2010-11-23 Thread Tal Galili
It seems your model defines more parameters then your data permits (e.g: singular). What you can do is try something like this: summary(aov(formula('FP ~ (lum + obj + man)^2 - Error(vp/(lum + obj + man)^2)),data=dataf)) (notice the use of + and ^) This is something your data might permit (assumi

Re: [R] the first. from SAS in R

2010-11-23 Thread Charles C. Berry
On Tue, 23 Nov 2010, Dennis Murphy wrote: Interesting. Check this out: u <- sample(c(TRUE, FALSE), 10, replace = TRUE) u [1] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE class(u) [1] "logical" u + 0 [1] 0 0 1 0 0 1 0 0 0 0 0 + u [1] 0 0 1 0 0 1 0 0 0 0 v <- rpois(10, 3)

[R] Finding the rows with the duplicated index

2010-11-23 Thread Santosh Srinivas
Hello Group, I have a huge time series dataset with sample below. I am basically trying to read it into a zoo object with columns 1:6 to index. Zoo issues a warning that some of the rows have duplicated index. dput(z) structure(list(TrdTimestamp = structure(list(sec = c(19, 19, 18, 10, 12, 43, 4

[R] Slow update(insert) on Data.frame

2010-11-23 Thread Joel
Hi When I try to update an number in a large data.frame by its pos It's really slow it take almost a sec to do this and I wonder why and if where is any faster way to update a number in a data.frame ive tried DF$col[POS]<-number DF[xPOS,yPOS]<-number Thx //Joel -- View this message in contex

Re: [R] Executing multiple .R files

2010-11-23 Thread jim holtman
?source On Tue, Nov 23, 2010 at 10:04 AM, Santosh Srinivas wrote: > Hello R-Helpers, > > I have a directory with some ".R" files that I execute every day. > I want to write a script that executes each one of time sequentially. > > Is there a statement for this? > > Thank you. > >

Re: [R] the first. from SAS in R

2010-11-23 Thread Charles C. Berry
On Tue, 23 Nov 2010, Joel wrote: Is there any similar function in R to the first. in SAS? What it dose is: Lets say we have this table: a b c 1 1 5 1 0 2 2 0 2 2 0 NA 2 9 2 3 1 3 and then I want do to do one thing the first time the number 1 appers in a and something else the

Re: [R] the first. from SAS in R

2010-11-23 Thread Dennis Murphy
Interesting. Check this out: u <- sample(c(TRUE, FALSE), 10, replace = TRUE) > u [1] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE > class(u) [1] "logical" > u + 0 [1] 0 0 1 0 0 1 0 0 0 0 > 0 + u [1] 0 0 1 0 0 1 0 0 0 0 v <- rpois(10, 3) > !duplicated(v) [1] TRUE FALSE TRUE T

[R] Searching dataset

2010-11-23 Thread Stephen Liu
Hi folks, > help.search("item_name") displays a list of dataset containing the item_name. If I need to search containing more than one item_name. What will be the command TIA B.R. Stephen L __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] "help"

2010-11-23 Thread Ben Bolker
Francial Giscard LIBENGUE gmail.com> writes: > > S'il vous plait, j'ai un problème avec la fonction gamma je n'arrive pas à > bienécrire l'exposant j'ai utilisé ^ et ça ne marche pas. > cordialemont > ici on parle anglais (je ne sais pas s'il y a une autre liste ou on pourrait poser des ques

Re: [R] how to add frequencies to barplot

2010-11-23 Thread Juliet Hannah
Also check out the following post: http://permalink.gmane.org/gmane.comp.lang.r.general/210897 On Sat, Nov 20, 2010 at 4:32 PM, casperyc wrote: > > Hi, > > I have count data > > x2=rep(c(0:3),c(13,80,60,27)) > > x2 >  0  1  2  3 > 13 80 60 27 > > I want to graph to be ploted as > > barplot(table

[R] Executing multiple .R files

2010-11-23 Thread Santosh Srinivas
Hello R-Helpers, I have a directory with some ".R" files that I execute every day. I want to write a script that executes each one of time sequentially. Is there a statement for this? Thank you. __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] Sporadic errors when training models using CARET

2010-11-23 Thread Max Kuhn
Kendric, I've seen these too and traceback() usually goes back to ksvm(). This doesn't mean that the error is there, but the results fo traceback() from you would be helpful. thanks, Max On Mon, Nov 22, 2010 at 6:18 PM, Kendric Wang wrote: > Hi. I am trying to construct a svmLinear model using

Re: [R] "help"

2010-11-23 Thread Spencer Graves
La langue de cette liste ci est desolais anglais. S'il vous plait, nous devon un example. J'ai trouve: > 2^3 [1] 8 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Hope this helps. Spencer On

[R] Three-way ANOVA shows me two-way results

2010-11-23 Thread Marius 't Hart
Hi all, I'm doing a 3-way ANOVA like this: summary(aov(formula('FP ~ (lum * obj * man)3 - Error(vp/(lum * obj * man)3)'),data=dataf)) But in the output I only get 1- and 2-way effects, like this one: Error: vp:obj:man Df Sum Sq Mean Sq F value Pr(>F) obj:man 1 1.5291e-34 1.5291e-34 5.7011 0.05

Re: [R] Reading parts of data files

2010-11-23 Thread Gabor Grothendieck
On Tue, Nov 23, 2010 at 6:05 AM, fbielejec wrote: > Dear, > > I'm doing analysis where I need to work on relatively large (50-60 MB) > text files, though I'm really interested only in parts with binary > variables (named indicators1, indicators2, ... etc.) > > Every text file contains other numeri

Re: [R] question about constraint minimization

2010-11-23 Thread Ravi Varadhan
You need to spend some time and learn the basics of R. There are several excellent tutorials available on the CRAN R-project website. This will be a very good investment of your time. After you have spent a couple of days learning the basics, try using my package to solve your problem. Best, R

  1   2   >