Re: [R] bnlearn and very large datasets (> 1 million observations)

2013-11-29 Thread Prof Brian Ripley
On 30/11/2013 04:52, Jejo Koola wrote: Hi Anyone have experience with very large datasets and the Bayesian Network package, bnlearn? In my experience R doesn't react well to very large datasets. Maybe, but a million is not 'very large': R handles billions of observations without problems on

Re: [R] Relative Cumulative Frequency of Event Occurence

2013-11-29 Thread Burhan ul haq
Hi Arun, Thanks again. Comment noted :) Amazing use of regular expressions in your solutions. Any reference, or book you would recommend. Cheers ! On Fri, Nov 29, 2013 at 10:56 PM, arun wrote: > Hi Burhan, > > No problem. One suggestion in this code would be: > with(df.1, cumsum(E.Occur=

Re: [R] Multiple regressions with changing dependent variable and time span

2013-11-29 Thread arun
Hi, The link seems to be not working.  From the description, it looks like: set.seed(432) dat1 <- as.data.frame(matrix(sample(200,154*337,replace=TRUE),ncol=337))  colnames(dat1) <- c(paste("F",1:3,sep="."),paste("r",1:334,sep=".")) lst1 <- lapply(paste("r",1:334,sep="."),function(x) cbind(dat1[,c

[R] bnlearn and very large datasets (> 1 million observations)

2013-11-29 Thread Jejo Koola
Hi Anyone have experience with very large datasets and the Bayesian Network package, bnlearn? In my experience R doesn't react well to very large datasets. Is there a way to divide up the dataset into pieces and incrementally learn the network with the pieces? This would also be helpful incase

Re: [R] Help with "Cast" Function

2013-11-29 Thread Burhan ul haq
Hi, First, a big thanks to all those who replied. I am including all the replies in one email for easier reference later: # Input from David # reshape(df.1, idvar=1:2, sep="_", direction="long", varying=names(df.1)[3:8]) #

[R] Multiple regressions with changing dependent variable and time span

2013-11-29 Thread nooldor
Hi all! I am just starting my adventure with R, so excuse me naive questions. My data look like that: I have 3 independent variables (F.1, F.2 and F.3) and 334 other variables (r.1, r.2, ... r.334) - each one of these will be dep

Re: [R] Adding NA values in random positions in a dataframe

2013-11-29 Thread Bert Gunter
An essentially identical approach that may be a tad clearer -- but requires additional space -- first creates a logical vector for the locations of the NA's in the unlisted data.frame. Further NA positions are randomly added and then the augmented vector is used as a logical matrix to index where t

[R] mat2listw function

2013-11-29 Thread Jacquelyn Pless
Hi all, I am attempting to create a weights object and perform a Moran I test as well. I have a very large spatial weights matrix (roughly 22,000x22,000) that was created in Excel and read into R, and I'm now trying to implement: library(spdep) SW=mat2listw(matrix) I am getting the following err

Re: [R] Help with "Cast" Function

2013-11-29 Thread David Winsemius
On Nov 29, 2013, at 9:42 AM, Burhan ul haq wrote: > Hi, > > This is the input data frame: > > ### > df.1 = read.table(header=T,text=" > id gender WMC_alcohol WMC_caffeine WMC_no.drug RT_alcohol RT_caffeine > RT_no.drug > 1 1 female 3.7 3.7 3.9 488 236

Re: [R] How to draw a shade overlapping of three circles (or other shapes) with certain areas?

2013-11-29 Thread Carl Witthoft
Pardon the pedantry, but doyou know what a "Venn Diagram" is? Because there are two or three packages at CRAN which will generate Venn diagrams for you given exactly that sort of source data. Yi.Zou wrote > Hi all, > > I am thinking of making a graph with three dataset A,B,C with shared > c

Re: [R] Help with "Cast" Function

2013-11-29 Thread Carl Witthoft
I see your desired output has rather fewer data than the input data frame. Instead of making us pore over a bunch of numbers, can you explain exactly what filtering you wish to do to get the specific subset of {male/female} {alcohol/caffeine} you're trying to get? BHM wrote > Hi, > > This is

[R] the wilcox.test() and pairwise.wilcox.test are producing different results

2013-11-29 Thread Adel
Dear list member, I want to compare if the rank order is significantly different for seven different measures. So we have same sample but different measures which reduces the problem to a paired one sample Wilcox test if I understood the test correctly. In constructed toy examples for my sake of

Re: [R] Relative Cumulative Frequency of Event Occurence

2013-11-29 Thread arun
Hi Burhan, No problem.  One suggestion in this code would be:   with(df.1, cumsum(E.Occur==TRUE)/(seq_len(nrow(df.1  ##==TRUE is not needed  identical( with(df.1, cumsum(E.Occur)/(seq_len(nrow(df.1,   with(df.1, cumsum(E.Occur==TRUE)/(seq_len(nrow(df.1 )  is.logical(TRUE) #[1] TRUE

Re: [R] XLConnect readWorksheet comma decimal sign

2013-11-29 Thread David Winsemius
On Nov 29, 2013, at 10:30 AM, Knut Krueger wrote: > Am 29.11.2013 18:31, schrieb David Winsemius: >> On Nov 29, 2013, at 6:18 AM, Knut Krueger wrote: >> >>> Am 25.11.2013 13:06, schrieb Knut Krueger: > how can I read exel files where the decimal sign is comma instead dot. > I get the dat

[R] Help with "Cast" Function

2013-11-29 Thread Burhan ul haq
Hi, This is the input data frame: ### df.1 = read.table(header=T,text=" id gender WMC_alcohol WMC_caffeine WMC_no.drug RT_alcohol RT_caffeine RT_no.drug 1 1 female 3.7 3.7 3.9 488 236 371 2 2 female 6.4 7.3 7.9 607 376 349 3 3 female 4.6 7.4 7.3 643 226

Re: [R] the wilcox.test() and pairwise.wilcox.test are producing different results

2013-11-29 Thread arun
Hi, Have you tried p.adjust="none"  pairwise.wilcox.test(daily_long$value,daily_long$variable, paired=T,p.adj="none") pairwise.wilcox.test(Ozone, Month, p.adj = "none") A.K. Dear list member,   I want to compare if the rank order is significantly different for seven different measures. So w

Re: [R] Relative Cumulative Frequency of Event Occurence

2013-11-29 Thread Burhan ul haq
Hi Arun, Thanks a lot. It works perfectly. Here is the complete code - for all those who are interested to see "Rel Cum Freq oscillating to reach the Expected Value" # Bernouilli Trial where: v.fly=c("G","B") # Outcome is Green or Blue fly n=100 # No of Events / Trials v.smp = seq(1:n) # Event I

Re: [R] XLConnect readWorksheet comma decimal sign

2013-11-29 Thread Jeff Newmiller
Please understand that this is a contributed package, and definitive assistance can only be provided by the package author. Type maintainer("XLConnect") for contact information, and read the package info at cran.r-project.org/web/packages/XLConnect/index.html. R-devel is unlikely to be a more

Re: [R] Adding NA values in random positions in a dataframe

2013-11-29 Thread arun
Hi, I used that because 10% of the values in the data were already NA. You are right.  Sorry, ?match() is unnecessary.  I was trying another solution with match() which didn't work out and forgot to check whether it was adequate or not. set.seed(49) dat1[!is.na(dat1)][sample(seq(dat1[!is.na(da

Re: [R] XLConnect readWorksheet comma decimal sign

2013-11-29 Thread Knut Krueger
Am 29.11.2013 18:31, schrieb David Winsemius: On Nov 29, 2013, at 6:18 AM, Knut Krueger wrote: Am 25.11.2013 13:06, schrieb Knut Krueger: how can I read exel files where the decimal sign is comma instead dot. I get the data as ascii and when converting "3,5" with as.numeric the 3,5 will be c

Re: [R] XLConnect readWorksheet comma decimal sign

2013-11-29 Thread David Winsemius
On Nov 29, 2013, at 6:18 AM, Knut Krueger wrote: > Am 25.11.2013 13:06, schrieb Knut Krueger: >> >>> how can I read exel files where the decimal sign is comma instead dot. >>> I get the data as ascii and when converting "3,5" with as.numeric the 3,5 >>> will be converted to NA >> > I think h

Re: [R] Lasso function that can handle NA values

2013-11-29 Thread Bert Gunter
?na.omit ?? But it is certainly true that omitting missing values first and analyzing the remaining data can: 1. Leave you with no data to analyze 2. Result in biased and misleading conclusions if the missingness mechanism is related to the covariates. In general, handling data with missing va

[R] Lasso function that can handle NA values

2013-11-29 Thread Laura Buzdugan
Hi everyone, I have a large dataset with missing values. I tried using glmnet, but it seems that it cannot handle NA values in the design matrix. I also tried lars, but I get an error too. Does anyone know of any package for computing the lasso solution which handles NA values?

Re: [R] XLConnect readWorksheet comma decimal sign

2013-11-29 Thread Knut Krueger
Am 25.11.2013 13:06, schrieb Knut Krueger: how can I read exel files where the decimal sign is comma instead dot. I get the data as ascii and when converting "3,5" with as.numeric the 3,5 will be converted to NA I think here is a major bug because no warning is genereated. It is impossibl

Re: [R] help ANN

2013-11-29 Thread S Ellison
> I would like to create an artificial neural network with R but I don't know > its > parameters jet (number of layers, number of neurons,...). > I downloaded the package ANN and I use the function "ANNGA", but I'm > afraid I haven't really created a neural network. In fact, at the end of the > pr

[R] Formatting output of plotKML

2013-11-29 Thread Calum Galleitch
Hello, I previously submitted the below query to r-sig-geo, but have had no response. Before I start bothering individual maintainers, I wonder if anyone on this list has any experience with the package and (or!) can diagnose my problems? Thanks, Calum Hello, I am having a little trouble with