Re: [R] Reading in a csv - 2 different results

2014-06-21 Thread peter dalgaard
On 21 Jun 2014, at 20:20 , David Winsemius wrote: > # In the line above we see non-matching double quotes. I would have guessed > that it would throw an error or simple ask you for more input due to the non > matching quotes.. >> data <- sapply(temp, read.csv) > > If that is not the problem (

Re: [R] local and global variables

2014-06-21 Thread Bert Gunter
What you want here, of course, is pass by reference. It can be done in R (via environments), but in general, it violates the functional programming paradigm that mostly underlies R. So you should heed the advice given to you by Duncan and Jeff. Cheers, Bert Bert Gunter Genentech Nonclinical Bio

Re: [R] local and global variables

2014-06-21 Thread Jeff Newmiller
You are not following the Posting Guide. This is a plain text mailing list (HTML does not necessarily show us what you see). Also, you should be providing a reproducible example that we can run to understand what you are actually dealing with. The only general advice I can give you at this poin

Re: [R] local and global variables

2014-06-21 Thread Duncan Murdoch
On 22/06/2014, 6:00 AM, Ragia Ibrahim wrote: > Dear group > I have some thing like the following code... > ##start > my_list (global object) > > function 1 > { > list1<-mylist > > function2(list1) > function3(list1) > function4(list1) > } > > function2(list1) > { > assign values via <<- to the

[R] local and global variables

2014-06-21 Thread Ragia Ibrahim
Dear group I have some thing like the following code... ##start my_list (global object) function 1 { list1<-mylist function2(list1) function3(list1) function4(list1) } function2(list1) { assign values via <<- to the object items } function3(list1) { assign values via <<- to the object items }

Re: [R] ANOVA for proportions with large mass on an extreme of [0, 1]

2014-06-21 Thread Joaquin Rapela
Bert, My queries are directly related to R: 1. Can the R package frm can be used to compare nested models. If so, how. 2. Are there alternative R packages to perform ANOVAs on a dependent variable that is a proportion with significant mass one one extreme? Also, my statistical problem is well

[R] Error creating daisy matrix in R cluster package - Cannot allocate vector of size 66.0 Gb

2014-06-21 Thread Scott Davis
My purpose involves creating a dissimilarity matrix using the daisy package in R before applying k-mediod clustering for customer segmentation. The dataset has 133,153 observations of 35 variables in a data.frame with numerical, categorical, blank cells and missing values. Missing values refer to N

Re: [R] EOF error reading csv file

2014-06-21 Thread Jim Lemon
On Sun, 22 Jun 2014 06:00:19 AM Chitra Baniya wrote: > Can someone go through the same and suggest what I am missing out. > > > cftc = read.table("cftcdata_ncn.csv", sep = ',', header = TRUE, fill = > > TRUE) > Warning message: > In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.string

[R] EOF error reading csv file

2014-06-21 Thread Chitra Baniya
Can someone go through the same and suggest what I am missing out. > cftc = read.table("cftcdata_ncn.csv", sep = ',', header = TRUE, fill = TRUE) Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string Hi, I guessed you have also tried wi

Re: [R] Layout of two graphs on a page...

2014-06-21 Thread Jim Lemon
On Sat, 21 Jun 2014 11:49:46 AM Kate Ignatius wrote: > I'm trying to have a layout of two graphs on a page... this has worked > before... but I changed up the way I do my venn diagrams so now > instead of the Venn Diagram being at the bottom of the page below the > bar/line graph it takes up the

Re: [R] Reading in a csv - 2 different results

2014-06-21 Thread David Winsemius
On Jun 20, 2014, at 3:42 AM, svendeswan wrote: > Hi, > I am a beginner in R and already read and (thought that I) understood the R > introduction tutorial. However there is this reading .csv which I cant > solve. The question is: Why has data in the both cases a different content? > > I have a d

Re: [R] lattice : superpose symbols with a great many points

2014-06-21 Thread David Winsemius
On Jun 20, 2014, at 12:45 PM, Laurent Rhelp wrote: > Hi, > > I like to use with xyplot (package lattice) the groups argument and > superpose.symbol to compare several curves. But, when there are a great many > points, the symbols are very close and the graph becomes unreadable. Would > there

Re: [R] counting the number of rows that satisfy a certain criteria

2014-06-21 Thread arun
Hi, Try: set.seed(42)  X <- as.data.frame(matrix(sample(0:1, 4*50,replace=TRUE), ncol=4))  table(X[1:2])[4] #[1] 15 sum(rowSums(X[1:2])==2) #[1] 15 A.K. On Saturday, June 21, 2014 10:59 AM, Kate Ignatius wrote: I have 4 columns, and about 300K plus rows with 0s and 1s. I'm trying to count h

Re: [R] ANOVA for proportions with large mass on an extreme of [0, 1]

2014-06-21 Thread Bert Gunter
Although your queries certainly intersect R, they are primarily about statistical modeling, which is OT for this list. Your issues also appear to be complex. I would therefore suggest that you eschew remote Internet advice and consult a local statistical expert for help. Cheers, Bert Bert Gunter

Re: [R] Using R Studio Version 0.98.507, having trouble with read.table and an Excel CSV file, keep getting '+'

2014-06-21 Thread Steve Friedman
Hello Richard Initially it appears that you left off a closing " mark at the end of the file name. Also why don't you use read csv? Steve On Jun 21, 2014 12:01 PM, "Richard Lerner" wrote: > I saved what I consider a medium size Excel file--about 2000x 40 as a CSV. > I am NOT sure the save went

[R] ANOVA for proportions with large mass on an extreme of [0, 1]

2014-06-21 Thread Joaquin Rapela
I am trying to perform an ANOVA on a dependent variable that has large mass on the 1 side of the (0, 1] interval. I decided to use Fractional Regression Models, as implemented in the package frm. This package seems well-suited for my problem, but I don't see how to perform model comparisons of nes

[R] Using R Studio Version 0.98.507, having trouble with read.table and an Excel CSV file, keep getting '+'

2014-06-21 Thread Richard Lerner
I saved what I consider a medium size Excel file--about 2000x 40 as a CSV. I am NOT sure the save went well as it took over five minutes to do it (Intel i7 running at 240 GHz, 12 GB RAM). When I put in the following code , I get a "+" instead of ">". read.table("c:/users/Richard lerner/downloads/

[R] Layout of two graphs on a page...

2014-06-21 Thread Kate Ignatius
I'm trying to have a layout of two graphs on a page... this has worked before... but I changed up the way I do my venn diagrams so now instead of the Venn Diagram being at the bottom of the page below the bar/line graph it takes up the whole page and its overlays the bar/line graph placed on the to

Re: [R] counting the number of rows that satisfy a certain criteria

2014-06-21 Thread Kate Ignatius
Thanks! On Sat, Jun 21, 2014 at 11:05 AM, Jorge I Velez wrote: > Hi Kate, > > You could try > > sum(X[, 1] == 1 & X[, 2] == 1) > > where X is your data set. > > HTH, > Jorge.- > > > > On Sun, Jun 22, 2014 at 12:57 AM, Kate Ignatius > wrote: >> >> I have 4 columns, and about 300K plus rows with

Re: [R] Trellis devices and pointize

2014-06-21 Thread Deepayan Sarkar
On Thu, Jun 12, 2014 at 2:31 PM, Patrick Connolly wrote: > On Mon, 09-Jun-2014 at 08:33AM +0100, Prof Brian Ripley wrote: > > |> The issue here is not trellis.device. > |> > |> You are using lattice plots (without mentioning lattice), which are > |> based on package 'grid' and so using the grid su

Re: [R] counting the number of rows that satisfy a certain criteria

2014-06-21 Thread Jorge I Velez
Hi Kate, You could try sum(X[, 1] == 1 & X[, 2] == 1) where X is your data set. HTH, Jorge.- On Sun, Jun 22, 2014 at 12:57 AM, Kate Ignatius wrote: > I have 4 columns, and about 300K plus rows with 0s and 1s. > > I'm trying to count how many rows satisfy a certain criteria... for > instan

[R] counting the number of rows that satisfy a certain criteria

2014-06-21 Thread Kate Ignatius
I have 4 columns, and about 300K plus rows with 0s and 1s. I'm trying to count how many rows satisfy a certain criteria... for instance, how many rows are there that have the first column == 1 as well as the second column == 1. I've tried using rowSums and colSums but it keeps giving me this type

Re: [R] Principal component analysis with EQUAMAX rotation

2014-06-21 Thread William Revelle
Dear Orvalo Augusto, If you are using a PC, you need to get the zip file, not the tar.gz file. It is at http://personality-project.org/r/src/contrib/ For Macs it is an “other repository” (source option) at http://personality-project.org/r/ Bill On Jun 21, 2014, at 12:36 AM, Orvalho A

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-21 Thread Jeff Newmiller
As much as I admire RStudio for making these documentation formats easy to use, they did not invent any of them. The closest they came to that was hiring Yihui. Having occupied our time with your questions, it would be polite if you closed the topic by explaining which approach you settled on an

Re: [R] zuzufarah Help with ggplot 2 error: Aesthetics must either be length one, or the same length as the dataProblems

2014-06-21 Thread John Kane
Data? Please have a look at https://github.com/hadley/devtools/wiki/Reproducibility and/or http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example I don't see where you are tellling R what data.frame you are using. p1 <- ggplot(NULL, aes(WUA_discharge,WUA_ta

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-21 Thread Luca Cerone
Dear all thank you very much for all the advices and help :) I think that Rstudio formats do what I need! 2014-06-21 3:31 GMT+02:00 David Winsemius : > > On Jun 20, 2014, at 2:40 AM, Luca Cerone wrote: > >> Hi Berend, sorry if it OT (though I think that the process is pretty >> much Rstudio inde