search for: columname

Displaying 13 results from an estimated 13 matches for "columname".

Did you mean: columnname
2009 Jul 15
4
Extract pairs (rowname, columname) from a matrix where value is 0
Dear sir, I have a matrix like a<-matrix(c(0,2,0,4,0,6,5,8,0),nrow=3) colnames(a)<-c("F1","F2","F3") rownames(a)<-c("A1","A2","A3") a F1 F2 F3 A1 0 4 5 A2 2 0 8 A3 0 6 0 I want to extract all pairs (rownames, columnames) from which the value in the matrix is 0 The result should be something like this A1, F1 A2, F2 A3, F1 A3, F3 how it is possible? thanks for your help.... Best Regards Alberto [[alternative HTML version deleted]]
2012 May 25
1
columnames changes behaviour of formula
Hello. precompiled R-2.15.0, svn58871, macosx 10.7.4. I have discovered that defining column names of a dataframe can alter the behaviour of lm(): d <- c(4,7,6,4) x <- data.frame(cbind(0:3,5:2)) coef(lm(d~ -1 + (.)^2,data=x)) X1 X2 X1:X2 -1.77 0.83 1.25 R> R> OK, so far so good. But change the column names of 'x' and the behaviour changes: colnames(x) <-
2009 Jun 25
2
variable driven summary of one column
...t a variable driven summary of one column of my data.frame? Usually I would do > summary(data$columnname) to get a summary of column named "columnname" of my data.frame named "data". In my case the columnname is not static but can be set dynamically. So I save the chosen columname in something like variable <- "columnname" but how can I now get the summary of the specified column? summary(data$get("variable")) doesn't work. summary(paste("data$", variable, sep="") doesn't work either! and if I try summary(data[get("var...
2006 Jun 20
0
inplace assignment: solution
...> data.frame[some.condition & another.condition, big.list.of.columns] * 2 + 55 > > or anything else. Equally, there could be any method of subsetting, or > any expression that can be an assignment target, on the left hand > side: > > data.frame[[some.complex.expression.for.columnames]] > <-data.frame[[some.complex.expression.for.columnames]] * 333 + foo * > 56 > > rownames(matrix)[45:53] <- paste(rownames(matrix)[45:53], "blah") > > > David > > On 16/06/06, Adaikalavan Ramasamy <ramasamy at cancer.org.uk> wrote: > > I do n...
2011 Sep 23
1
Newbie question: Converting Table
Hi, I'm new to R, and I have searched helpfiles and this forum on my 2 questions. Hope you guys can help me out! :-) Many thanks in advance! Cheers, Lars Q1: I imported a csv file with columnames subject and class. There are about 1000 different classes... It looks like this: subject1, class1 subject1, class2 subject2, class1 subject2, class3 ... subject999, class1 subject999, class2 Now I want to transform this in R into a table (with columnnames subject,class1,class2,...) like: subject...
2006 Mar 22
2
has_many, belongs_to
I have one table(profiles) where each row has many rows in another table(carriers). If I write profile.carriers I get a collection containing all carriers that belong to the current profile. My question is: how do I sort the collection profile.carriers? I would like to sort it on one of the columns (found in the table carriers). Can I override some method in the carrier model or somewhere
2003 Nov 12
4
column extraction by name ?
I have a data frame (df) with colums x, y and z. e.g. df <- data.frame(x = sample(4), y = sample(4), z = sample(4)) I can extract column z by: df$z or df[3] I can also extract columns x,y by: df[1:2] or by df[-3]. Is it possible to extract x,y columns in a "symbolic" fashion i.e. by equivalent of df[-z] (which is illegal) ??? Or alternativeley, is there an equivalent of
2006 Jan 03
0
newbie question about .titlecase of .titleize
...ffolding. I achieved to add some extra inputvalidation but i also want to add some code that changes some specific textfields with the .titlecase / .titleize and then stores it to the database. I had to add the validation code to the model file, is this also the place to add the titlecase ? the columname of the regarding textfield is last_name(db)/lastname(ror) -- Posted via http://www.ruby-forum.com/.
2003 Feb 17
1
R environment advice?
...d do some minor tabluation...for instance: channel <- odbcConnect(yada, yada, yada) surveyresults <- (channel, select * from sometable) multiresults <- (channel, select * from othertable) multiresults.columnname <- multiresults[,1] # or column 2 or 3 or 4 or so on... multiresults.columname.table <- table(multiresults.columnname) etcetera, etcetera. I would like to create a single file that I could share that would load this environment up for a new R user for this dataset. If any of you wouldn't mind taking the time explaining how you would go about doing something like th...
2013 Apr 08
1
qgraph: correlation matrix variable names
We aim to visualize a 17*17 correlation matrix with the package *qgraph*, consisting of 16 variables. Without variable names in the input file, that works perfectly R> qgraph(data) but we'd like variable names instead of numbers for variables. In a correlation matrix, the first row and the first column usually have variable names. We've been unsuccessful so far to read such a file
2007 Oct 14
5
Ruby/Informix 0.6.1 released
...was returning an empty array from within the Informix ActiveRecord adapter (ActiveRecord::ConnectionAdapters::InformixAdapter#columns) if called for different tables. This bug was raising the following error in Ruby on Rails: undefined method columname= Noticed by Andrés Rafael <aandresrafael at gmail dot com> -- Gerardo Santana --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email...
2008 May 15
2
Adding columns to dataframe
Hi, I have a dataframe SDF1 that looks like this: Char1 Char2 Char 3 W.2007.02 W.2007.09 W.2007.16 W.2008.13 A C1 F1 F2 F3 A C2 F4 B C3 F5 F6 I have another dataframe SDF2 with 163 cols that has the following column names Char1 Char2 Char 3 W.2007.02 W.2007.03 W.2007.04
2009 Jun 29
5
Help
Hi group, I found a module for adaptive kernel density estimation for Stata users, but unfortunetly I don't have access to Stata, can I find a similar approach using R? Thank u so much 4 ur time. [[alternative HTML version deleted]]