[R] help interpreting dudi.pco

2012-11-17 Thread avadhoot velankar
I am working on morphometry of hairs and want to see if selected variables are giving significantly distinct groups. I am new to both R and principal coordinate analysis. Scatter plot is showing distinct groups but i dont know how to refine the analysis and interprete it. [[alternative HT

Re: [R] dealing with Date vars

2012-11-17 Thread Jeff Newmiller
Mmm... sorry, psychic powers not working today. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff NewmillerThe . . Go Live... DCN:

Re: [R] [newbie] convert 3D spatial array to dataframe

2012-11-17 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-help/2012-November/329438.html >> summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get) >> to a dataframe suitable for use by lattice::levelplot(), e.g., >> levelplot(conc ~ lon * lat | lev, data = data.frame) much detail omitted ... >> I'm gues

Re: [R] about scor {bootstrap} R version 2.15.2

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 5:50 PM, Tania Patiño wrote: Hello all, could you tell me if there is an example like this one that appears on the next link: http://www.inside-r.org/packages/cran/bootstrap/docs/scor related to the Open/Closed Book Examination Data but in R version 2.15.2 ? Because I

[R] dealing with Date vars

2012-11-17 Thread dms
Hi all, I'm writing a function that summarizes objects, however, when a Date variable is present in the objects it doesn't work. How can I handle with this problem? D __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] [newbie] convert 3D spatial array to dataframe

2012-11-17 Thread ilai
Errr... You could reshape to a long format data.frame but an arguably easier way: dimnames(array.3d) <- list(lat= 1:7 , long = 1:11 , lev = 1:5) # not needed just for clarity levelplot(array.3d) On Sat, Nov 17, 2012 at 9:36 PM, Tom Roche wrote: > > summary: how to convert a 3D array (as obtaine

[R] [newbie] convert 3D spatial array to dataframe

2012-11-17 Thread Tom Roche
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get) to a dataframe suitable for use by lattice::levelplot(), e.g., levelplot(conc ~ lon * lat | lev, data = data.frame) details: I have atmospheric data in netCDF files specifying gas concentrations over a 3D space with dimensio

Re: [R] hessian fails for box-constrained problems when close to boundary?

2012-11-17 Thread Paul Gilbert
Matthieu (regarding the final question, but not the ones before that.) The short answer is that you seem to have a solution, since hessian in numDeriv works. The long answer follows. Outside a constraint area one cannot assume that a function will evaluate properly. Some constraints are impo

Re: [R] euclidean dist. between matrices

2012-11-17 Thread arun
HI, May be this helps: set.seed(18) A<-matrix(sample(1:4000,15*365,replace=TRUE),ncol=15) set.seed(25) B<-sample(1:800,1*365,replace=TRUE)  res<-do.call(rbind,lapply(split(A,col(A)),function(x) dist(rbind(x,B  head(res) #  [,1] #1 37812.43 #2 38258.21 #3 39025.13 #4 37572.35 #5 37885.32 #6

Re: [R] euclidean dist. between matrices

2012-11-17 Thread David L Carlson
I may not understand correctly, but you have a matrix A with 15 rows and 365 columns and a second matrix B with 1 row and 365 columns. You say you want to compute the Euclidean distance between the first column of A (15 numbers) against B. That won't work since the first column of B is a single num

Re: [R] Download a file from url

2012-11-17 Thread veepsirtt
Hi R, I installed wget and tried to download the file from this http://nseindia.com/content/equities/scripvol/datafiles/16-11-2012-TO-16-11-2012ACCEQN.csv but it fails. How to get it using wget? thanks veepsirtt #Define Working Directory, where files would be saved setwd('G:/NIFTY') #Define sta

Re: [R] Failing to install {rggobi} on win-7 R 2.12.0

2012-11-17 Thread SRS+
I also had issues installing the rggobi package into R (v 2.14, 32 bit on Vista 64) . I believe the problem rests in the install script. It has minor typos. I did manage to find an install script that did work. Try pasting this into R. source("http://www.ggobi.org/downloads/install.r";)

[R] euclidean dist. between matrices

2012-11-17 Thread eliza botto
Dear Users,I have two matrices A=15*365 and B=1*365. i want to calculate "Euclidean Distance" between these matrices in such a way that i should have euclidean distance of matrix B against all the columns of matrix A. More precisely, first i want euclidean dist. of column 1 of A against B, then

[R] about scor {bootstrap} R version 2.15.2

2012-11-17 Thread Tania Patiño
Hello all, could you tell me if there is an example like this one that appears on the next link: http://www.inside-r.org/packages/cran/bootstrap/docs/scor related to the Open/Closed Book Examination Data but in R version 2.15.2 ? Because I search the data(scor) on the environment R version 2.15.

Re: [R] pairing data using combn with criteria

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 4:05 PM, arun wrote: HI, If the order of individuals are changed or if some individuals are missing, this method may need modification. ind <- c('1','3','4','8') fam <- c('1','2','1','2') dat1 <- data.frame(ind,fam) combn( row.names(dat1), 2, FUN = function(b){

Re: [R] library/function to compare two phrases?

2012-11-17 Thread Brian Feeny
Thank you Michael and David. I am onto agrep and adist and they look very useful for what I am wanting to do. My initial results are promising! Brian On Nov 17, 2012, at 6:20 PM, R. Michael Weylandt wrote: > On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote: >> I am looking for a library/

Re: [R] fold change calculation

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 9:55 AM, Vittoria Roncalli wrote: Hi, I am really new to edge R and I have used it to calculate gene expression with RNASeq data comparing 2 different conditions. I used a P value of 0.05 and I got a list of DGE contigs up and down regulated. WhatI was wondering is how to

Re: [R] pairing data using combn with criteria

2012-11-17 Thread arun
HI, If the order of individuals are changed or if some individuals are missing, this method may need modification. ind <- c('1','3','4','8')   fam <- c('1','2','1','2')   dat1 <- data.frame(ind,fam)  combn( row.names(dat1), 2, FUN = function(b){ if (dat1[b[1], "fam" ] != dat1[b

Re: [R] library/function to compare two phrases?

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 3:20 PM, R. Michael Weylandt wrote: > On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote: >> I am looking for a library/function in R that can compare two phrases and >> give me a score, or somehow classify them as correct as possible. >> >> The "phrases" are obfuscated/me

Re: [R] pairing data using combn with criteria

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 10:07 AM, benjamin_jarrett wrote: > Hi David, > > Thanks for replying. Unfortunately I can't get it to work. Here is some > (very simplified) data to help illustrate my problem. > > ind <- c('1','2','3','4') > fam <- c('1','2','1','2') > data <- data.frame(ind,fam) > > ind

Re: [R] library/function to compare two phrases?

2012-11-17 Thread R. Michael Weylandt
On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote: > I am looking for a library/function in R that can compare two phrases and > give me a score, or somehow classify them as correct as possible. > > The "phrases" are obfuscated/messy. I am not concerned about which is > "correct" (for example

[R] library/function to compare two phrases?

2012-11-17 Thread Brian Feeny
I am looking for a library/function in R that can compare two phrases and give me a score, or somehow classify them as correct as possible. The "phrases" are obfuscated/messy. I am not concerned about which is "correct" (for example spell checking), I am only concerned in grouping them so that

Re: [R] Reshaping a dataframe

2012-11-17 Thread eric
Could it be that my data is showing up as factors ? > class(x) 1] "data.frame" str(x) data.frame':284 obs. of 3 variables: $ Region : Factor w/ 4 levels "AP","EU","LA",..: 1 1 1 1 1 1 1 1 1 1 ... $ YearMon: int 200701 200702 200703 200704 200705 200706 200707 200708 200709 200710 ... $ kg

Re: [R] Reshaping a dataframe

2012-11-17 Thread eric
Didn't try the other two methods as I spent a bit of time trying to learn about reshape2. I was also able to melt the data and that went fine (although based on your post, melting is not needed). Any ideas on why reshape2 dcast is giving fits ? -- View this message in context: http://r.78969

Re: [R] Reshaping a dataframe

2012-11-17 Thread eric
What am I doing wrong ? Using the method you proposed on SLIGHTLY different data. > head(x) Region YearMon kg AP 200701 290,311 AP 200702 322,671 AP 200703 216,600 AP 200704 450,711 AP 200705 245,215 AP 200706 212,492 j <-dcast(x,YearMon~Region,value.va

Re: [R] pairing data using combn with criteria

2012-11-17 Thread benjamin_jarrett
Hi David, Thanks for replying. Unfortunately I can't get it to work. Here is some (very simplified) data to help illustrate my problem. ind <- c('1','2','3','4') fam <- c('1','2','1','2') data <- data.frame(ind,fam) ind is the unique ID for each individual, and fam is which family the individual

Re: [R] Split data frame and create a new column

2012-11-17 Thread arun
HI, Just a modification of Rui's function: fun1<-function(x){ r1<-unlist(strsplit(x,"L\\d+|G|P|S|max|mean|10")) r1<-r1[r1!=""] r2<-r1[!grepl("\\_",r1)] r3<-integer(length(x)) r3[grepl("^L",x)]<-gsub("L(\\d+).*","\\1",x[grep("L\\d+",x)]) r3[grepl("_\\d+$",x)]<-gsub("[\\_]","",r1[grepl("\\_",r1)])

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread John Muschelli
That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL ( http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases). Firefox still has array initialiser too large for this one contour, but Safari and

[R] fold change calculation

2012-11-17 Thread Vittoria Roncalli
Hi, I am really new to edge R and I have used it to calculate gene expression with RNASeq data comparing 2 different conditions. I used a P value of 0.05 and I got a list of DGE contigs up and down regulated. WhatI was wondering is how to convert the logFC value that appear in the output of the exa

[R] Reshaping a dataframe

2012-11-17 Thread eric
Seems like this should be easy but I'm struggling a bit. How do I rearrange a data frame to go from the first one to the second shown below ? State Datelbs TX 200701 400 TX 200702 650 TX 200703 950 TX 200704 1000 FL 200701 200 FL

Re: [R] coarsening levels problem

2012-11-17 Thread Murray Jorgensen
Thanks very much Arun! Murray On 18/11/12 11:07 AM, arun wrote: HI, There were some "spaces" inside the quotes that created the problem. reg <- structure(c(6L, 6L, 1L, 7L, 1L, 1L, 1L, 5L, 2L, 1L, 6L, 3L, 1L, 1L, 7L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 7L, 6L, 6L, 1L, 1L, 1L, 1L, 6L, 2L, 7L), .Label =

Re: [R] coarsening levels problem

2012-11-17 Thread arun
HI, There were some "spaces" inside the quotes that created the problem.  reg <- structure(c(6L, 6L, 1L, 7L, 1L, 1L, 1L, 5L, 2L, 1L, 6L, 3L, 1L, 1L, 7L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 7L, 6L, 6L, 1L, 1L, 1L, 1L, 6L, 2L, 7L), .Label = c(" auckland", " christchurch", " hb", " manawatu", " taranak

Re: [R] Strange problem with reading a pipe delimited file

2012-11-17 Thread Duncan Murdoch
On 12-11-17 4:34 PM, Brian Feeny wrote: On Nov 17, 2012, at 4:27 PM, Duncan Murdoch wrote: I would suggest reading the help file: read.delim only looks at the first 5 lines to determine the number of columns if you don't specify the colClasses. Duncan Murdoch Duncan, I have tried to pas

Re: [R] Strange problem with reading a pipe delimited file

2012-11-17 Thread Brian Feeny
Duncan, I believe I follow you now, I have done like so with expected results: ncol <- max(count.fields("paths.txt", sep = "|")) test <- read.delim("paths.txt", sep="|", quote=NULL, header=F, colClasses="character", fill=TRUE, col.names = paste("V", seq_len(ncol), sep = "")) Thank you for you

Re: [R] Strange problem with reading a pipe delimited file

2012-11-17 Thread Brian Feeny
On Nov 17, 2012, at 4:27 PM, Duncan Murdoch wrote: >> > > I would suggest reading the help file: read.delim only looks at the first 5 > lines to determine the number of columns if you don't specify the colClasses. > > Duncan Murdoch > Duncan, I have tried to pass colClasses but R complains

[R] coarsening levels problem

2012-11-17 Thread Murray Jorgensen
Greetings from New Zealand. I hope that my difficulties are clear from the following output. Ideas gratefully received! Murray Jorgensen cc <- scan() 3000 3500 2500 2500 3000 3000 3000 3000 3000 2000 2000 2000 2000 4800 3000 4500 3000 2000 2000 4400 3000 3000 2500 3000 3000 2000 3000 2000 20

Re: [R] Strange problem with reading a pipe delimited file

2012-11-17 Thread Duncan Murdoch
On 12-11-17 4:18 PM, Brian Feeny wrote: I am trying to read in a pipe delimited file that has rows with varying number of columns, here is my sample data: A|B|C|D A|B|C|D|E|F A|B|C|D|E A|B|C|D|E|F|G|H|I A|B|C|D A|B|C|D|E|F|G|H|I|J You can see line 6 has 10 columns. Yet, I can't explain why R

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread Duncan Murdoch
On 12-11-17 3:11 PM, Duncan Murdoch wrote: On 12-11-17 1:51 PM, John Muschelli wrote: That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlas

[R] Strange problem with reading a pipe delimited file

2012-11-17 Thread Brian Feeny
I am trying to read in a pipe delimited file that has rows with varying number of columns, here is my sample data: A|B|C|D A|B|C|D|E|F A|B|C|D|E A|B|C|D|E|F|G|H|I A|B|C|D A|B|C|D|E|F|G|H|I|J You can see line 6 has 10 columns. Yet, I can't explain why R does like so: > test <- read.delim("mypat

Re: [R] Using cbind to combine data frames and preserve header/names

2012-11-17 Thread Brian Feeny
David and Rainer, Thank you both for your responses, you got me on track, I ended up just doing like so: trainset <- read.csv('train.csv',head=TRUE) trainset[,-1] <- binarize(trainset[,-1]) trainset$label <- as.factor(trainset$label) I appreciate your help Brian On Nov 17, 2012, at 11:25 AM

Re: [R] Install 64 bit version of package on OS X

2012-11-17 Thread Berend Hasselman
On 17-11-2012, at 19:54, Saptarshi Guha wrote: > I'm trying to install a package on OS X (Snow Leopard) using the following > command, but instead of respecting the arch directive it install i386. 1. This belongs on R-SIG-Mac. And it didn't install the x86_64 architecture? Are you sure? Any er

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread Duncan Murdoch
On 12-11-17 1:51 PM, John Muschelli wrote: That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases). Firefox still has array initialiser to

Re: [R] problem with "any" function

2012-11-17 Thread Matthias Gondan
The warning 1: In (ind.c == TRUE) & (ind.sgn == TRUE) : longer object length is not a multiple of shorter object length means that ind.c and ind.sgn have different lengths, for whatever reason. Although R continues the routine, the warning should, in general, not be ignored. Try: 1:3 + 1:2

Re: [R] Re problem with "any" function

2012-11-17 Thread Rui Barradas
Hello, Why don't you keep it on the list? I'm Ccing R Help. If you put print statements just before the any(), print(ind.c) print(ind.r) print(ind.sgn) you'll see that all values are FALSE. So the problem is _not_ with any(). You must look somewhere else on the function. Hope this helps,

Re: [R] problem with "any" function

2012-11-17 Thread Rui Barradas
Hello, First of all, that's not an error message, it's a warning. As for your condition, it's too complicated. You don't need to test a logical value for equality to TRUE, it's redundant. And any(x, y) is equivalent to any(x, y, x & y). Try any(ind.c, ind.r, ind.sgn) and you'll be fine. Hope

[R] Install 64 bit version of package on OS X

2012-11-17 Thread Saptarshi Guha
I'm trying to install a package on OS X (Snow Leopard) using the following command, but instead of respecting the arch directive it install i386. How can this be resolved? R --arch=x86_64 CMD INSTALL * installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library

[R] problem with "any" function

2012-11-17 Thread Haris Rhrlp
Dear R users, I have the "any" function of R  any(ind.c, ind.r, ind.sgn) all are logical factors  it works fine when any of three is true but when they are combined it doesnt work. i tried this any(ind.c, ind.r, ind.sgn,((ind.c==TRUE) & (ind.r==TRUE)), ((ind.c==TRUE) & (ind.sgn==TRUE)),((ind.

Re: [R] about lm

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 8:56 AM, FJ M wrote: attach(attach(dat)) should be attach(dat) Is attach() broken? I've been using attach() successfully for months. I was surprised that header=TRUE did not map the headers to the data. ???. 'header=TRUE' changes how read.table() and derivatives han

Re: [R] about lm

2012-11-17 Thread R. Michael Weylandt
On Sat, Nov 17, 2012 at 4:56 PM, FJ M wrote: > > attach(attach(dat)) > > should be > > attach(dat) > > Is attach() broken? I've been using attach() successfully for months. I was > surprised that header=TRUE did not map the headers to the data. But since > attach() worked, I've never asked for a

Re: [R] about lm

2012-11-17 Thread FJ M
attach(attach(dat)) should be attach(dat) Is attach() broken? I've been using attach() successfully for months. I was surprised that header=TRUE did not map the headers to the data. But since attach() worked, I've never asked for an enhancement to the various read functions. Thanks, F

Re: [R] transform input argument (matrix) of function

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 7:41 AM, Omphalodes Verna wrote: Dear list! I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additio

Re: [R] transform input argument (matrix) of function

2012-11-17 Thread Rui Barradas
Hello, Your function fun2 (in fact both of them) changes a _copy_ of df1, not df1 itself. To have a copy of the output of fun2 you need to assign the value of fun2 outside it. df2 <- fun2(df1) Now df2 has what you want. (If I understand it well.) Hope this helps, Rui Barradas Em 17-11-2012 1

Re: [R] lines density

2012-11-17 Thread Robert Baer
On 11/17/2012 4:38 AM, bgnumis wrote: > Hi all, > > I attach a picture, with my output plot. > > I put this command to obtain it: > > hist(MCT[,2],probability=TRUE,xlab=" ",ylab="Max",main="M distribution") > lines(density(MCT[,2]), lwd = 2) > > The problem is that when I extract the "bell" is too

Re: [R] about lm

2012-11-17 Thread David Winsemius
On Nov 17, 2012, at 4:29 AM, FJ M wrote: dat=read.csv("c:\\ven.csv",header=TRUE,sep=";"); attach(attach(dat)) It is generally less error prone to avoid attach (even once). dat lm.1<-lm(ve~ su) And instead use: lm.1<-lm(ve~ su, data=dat) summary(lm.1) GL Frank Date: Fri, 16 Nov 2012 2

Re: [R] Using cbind to combine data frames and preserve header/names

2012-11-17 Thread David Winsemius
On Nov 16, 2012, at 9:39 PM, Brian Feeny wrote: I have a dataframe that has a header like so: class value1 value2 value3 class is a factor the actual values in the columns value1, value2 and value3 are 0-255, I wish to binarize these using biclust. I can do this like so: binarize(dat

Re: [R] lines density

2012-11-17 Thread Duncan Murdoch
On 12-11-17 5:38 AM, bgnumis wrote: Hi all, I attach a picture, with my output plot. I put this command to obtain it: hist(MCT[,2],probability=TRUE,xlab=" ",ylab="Max",main="M distribution") lines(density(MCT[,2]), lwd = 2) The problem is that when I extract the "bell" is too high? And the hi

Re: [R] survfit & number of variables != number of variable names

2012-11-17 Thread David Winsemius
On Nov 16, 2012, at 6:05 PM, Georges Dupret wrote: This works ok: cox = coxph(surv ~ bucket*(today + accor + both) + activity, data = data) fit = survfit(cox, newdata=data[1:100,]) but using strata leads to problems: cox.s = coxph(surv ~ bucket*(today + accor + both) + strata(activity

Re: [R] Optimizing

2012-11-17 Thread Gabor Grothendieck
On Wed, Nov 14, 2012 at 8:23 PM, Sam Asin wrote: > Hello, > > I am fairly new with R and am having trouble finding an optimal group. I > checked the help functions for the various optimize commands and it was a > little over my head. > > I have a dataset with 4 columns, name, type, value, and cos

Re: [R] manipulating longitudinal data in r

2012-11-17 Thread arun
HI, Try this:  ke$b<-ave(ke$a,ke$patid,FUN=max)  ke #  patid a b #1 1 1 2 #2 1 2 2 #3 1 2 2 #4 2 1 1 #5 3 1 2 #6 3 2 2 A.K. - Original Message - From: Kemi Racheal To: R-help@r-project.org Cc: Sent: Saturday, November 17, 2012 3:56 AM Subject: [R] manipulating

[R] manipulating longitudinal data in r

2012-11-17 Thread Kemi Racheal
Dear list member, I have the following data example ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2)) I want to add another variable b, such that the max of 'a' by id is returned i.e data ke becomes ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2),b=c(2,2,2,1,2,2)) Any help will be a

Re: [R] transform input argument (matrix) of function

2012-11-17 Thread R. Michael Weylandt
I'm afraid I don't really understand what you're searching for, but note that your functions can be written without assignment/return: fun3 <- function(x) invisible(cbind(xy[,1], xy[,2], xy[,1] + xy[,2])) Cheers, Michael On Sat, Nov 17, 2012 at 3:41 PM, Omphalodes Verna wrote: > Dear list! > >

[R] transform input argument (matrix) of function

2012-11-17 Thread Omphalodes Verna
Dear list!   I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example: fun1 <- function(xy) { x

Re: [R] Split data frame and create a new column

2012-11-17 Thread Rui Barradas
Hello, I don't know if this is general purpose but try x <- scan(what = "character", text=" L1o3maxG10 L1o3P10 L2o3G10 noxP10 pm25S_01 comeanS_03 noxP_04") fun <- function(x){ r1 <- unlist(strsplit(x, "L[[:digit:]]+|G|P|S")) r1 <- r1[nchar(r1) != 0] r1 <- r1[rep(c(TRUE, FALSE), len

Re: [R] Calling R object from R function

2012-11-17 Thread R. Michael Weylandt
If I understand your goal (still fuzzy) -- why don't you factor out the bits you want to calculate repeatedly into their own little utility function? That's just basic stuctured programming. On Thu, Nov 8, 2012 at 5:25 PM, frespider wrote: > Hi, > > I edit my post, Can you please help with this m

Re: [R] Optimizing

2012-11-17 Thread R. Michael Weylandt
On Thu, Nov 15, 2012 at 7:49 PM, Sam Asin wrote: > Hey, > > It's actually not homework, what gave you that impression? Real data sets don't usually have people named A,B,C with wages 3,4,5. ;-) To your question at hand, it's close to a classic problem in combinatorial optimization known as the k

Re: [R] Basic Stats question

2012-11-17 Thread Jeff Newmiller
If you read the posting guide mentioned at the bottom of every list message, it indicates that this is not really a forum for statistics theory discussions. Once you understand the theory well enough to know which algorithms you want to use (and the assumptions that go along with them), there a

Re: [R] Can R change my input at higher precision

2012-11-17 Thread R. Michael Weylandt
See http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Michael On Sat, Nov 17, 2012 at 12:56 PM, Gonçalo Ferraz wrote: > I just found a problem that may be causing an error in a computation with > very small numbers: > > I tell R that > > thetaP <

Re: [R] about lm

2012-11-17 Thread R. Michael Weylandt
On Sat, Nov 17, 2012 at 12:29 PM, FJ M wrote: > > dat=read.csv("c:\\ven.csv",header=TRUE,sep=";"); > attach(attach(dat)) Ahh! Two at once! Why -- for the love of god, why! :-P M __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] Can R change my input at higher precision

2012-11-17 Thread Gonçalo Ferraz
I just found a problem that may be causing an error in a computation with very small numbers: I tell R that thetaP <- 5.531003 and when I ask R to show me thetaP with more precision, it gives me thetaP [1] 5.5310030114 and even more surprising, if I write thetaP <- 5.5310030

Re: [R] about lm

2012-11-17 Thread FJ M
dat=read.csv("c:\\ven.csv",header=TRUE,sep=";"); attach(attach(dat)) dat lm.1<-lm(ve~ su) summary(lm.1) GL Frank > Date: Fri, 16 Nov 2012 20:42:39 +0100 > From: soniaam...@gmail.com > To: r-help@r-project.org > Subject: [R] about lm > > Dear friends, > I have a csv file entitled ven.csv locat

[R] Basic Stats question

2012-11-17 Thread Partha Sinha
Dear All I am a stats newbie and have a basic stats question; i have y as dependent variable and x1 to x5 as dependent variable. I need to know which variables x1 to x5 are actually affecting y. How do I find out? can an example be given which makes things clear (if possible)? Thanks Parth ___

Re: [R] polycor package

2012-11-17 Thread yrosseel
Dear Laura, John is correct. The error is produced by the sem() function in the lavaan package. The reason is that you did not use proper names for the function arguments. The correct call should be: sem.cdu= sem(cdu, sample.cov=hetcor, sampl.nobs=1861, meanstructure=F,fixed.x=F) But more

Re: [R] how to create a tree in R

2012-11-17 Thread Marc Girondot
Le 17/11/12 03:32, Tania Patiño a écrit : Hello all, could you explain to me how to create a tree in R, and if you can explain every line of code that will be great. Which are the libraries that are needed and where I can find more examples. Thank you! Tania We expect that you give more pre