Displaying 20 results from an estimated 75 matches for "column1".
Did you mean:
column
2006 Jun 07
4
Question: coding protected methods
...and coding Ruby in Rails,
however it''s my 3rd day with this beast :) so I''m asking :
When I added protected methods to the model before it was like:
protected
method....................
end
Would this be a valid way to write a protected method as well ?:
attr_protected :column1, :column2
Perhaps this particular call is already protected inherent to the
call, yet do I need to
surround it with "protected" and "end" ?
TIA
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/...
2010 Jun 22
0
Scrolling a tkcanvas non-starter
Hello,
Is it possible to scroll a canvas that has a column of listboxes in it? Does scrolling only work with listboxes and text widgets?
The following code displays the scrollbar, but
- it has no thumb
- does not respond to mouse clicks.
- the vertical height of the tkcanvas (i.e. column1) is unconstrained. It's lower edge is out of view, and the lower button on the scrollbar is out of view.
I expected the scrollbar and canvas to have a height of 200 pixels and to be able to use the scrollbar to bring different listboxes into view.
I created this from examples on the forum, but...
2010 May 31
2
accessing a data frame with row names
Readers,
I have entered a file into r:
,column1,column2
row1,0.1,0.2
row2,0.3,0.4
using the command:
dataframe<-read.table("/path/to/file.csv",header=T,row.names=1)
When I try the command:
dataframe[,2]
I receive the response:
NULL
I was expecting:
row1 0.2
row2 0.4
What is my error with the syntax please?
Yours,
r251
man...
2004 Nov 23
5
number of pairwise present data in matrix with missings
is there a smart way of determining the number of pairwise present data
in a data matrix with missings (maybe as a by-product of some
statistical function?)
so far, i used several loops like:
for (column1 in 1:99) {
for (column2 in 2:100) {
for (row in 1:500) {
if (!is.na(matrix[row,column1]) & !is.na(matrix[row,column2])) {
pairs[col1,col2] <- pairs[col1,col2]+1
}
}
}
}
but this seems neither the most elegant nor an utterly fast solution.
thanks for suggesti...
2008 Feb 26
1
Split data.frames depeding values of a column
Hello to all
is there a function wich splits a data.frame (column1,column2,column3,....)
into
data1 <-(column1,column3....) #column2 = 1
data2 <-(column1,column3....) #column2 = 2
data3 <-(column1,column3....) #column2 = 3
...
Regards Knut
2009 May 14
2
Function to read a string as the variables as opposed to taking the string name as the variable
I am writing a custom function that uses an R-function from the
reshape package: cast. However, my question could be applicable to
any R function.
Normally one writes the arguments directly into a function, e.g.:
result=cast(table1, column1 + column2 + column3 ~ column4,
mean) (1)
I need to be able to write this statement as follows:
result=cast(table1, string_with_columns ~ column4, mean) (2)
string_with_columns = group of functions that ultimately outputs:
"column1 + column2 + column3"
Statement 1...
2009 Jul 07
2
How to separate the string?
Hi everyone,
Hi want to separate the string(column1) for example
column1 column2 column3 column4 column5 column6
bear b e a r
cat c a t
tiger t i g e r
I know how to do this in excel where using MID function.
Now I want...
2006 Apr 12
9
Showing Images from a file store
Hi all.
I am wrting a small content management tool for my company and was
trying to display some images from our file store shown below.
<td> <img src="\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"/>
The app was displaying the image when it is under the \public\images
directory.
Is there anything special we need to do to get a file from outside the
root of the application?
Any help
2010 Feb 27
1
New Variable from Several Existing Variables
...be "Yes", however if any one of the three existing variables is
a "No", then then new variable should be a "No". I would then use that new
variable as an exclusion for data in a new or existing dataset (i.e., if
NewVariable = "No" then delete):
Take this:
Column1, Column2, Column3
Yes, Yes, Yes
Yes, No, Yes
No, No, No
No, Yes, No
Yes, Yes, No
Generate this:
Column1, Column2, Column3, NewVariable1
Yes, Yes, Yes, Yes
Yes, No, Yes, No
No, No, No, No
No, Yes, No, No
Yes, Yes, No, No
And end up with this:
Column1, Column2, Column3, NewVariable1
Yes, Yes, Yes,...
2009 Jun 15
2
Help with syntax error
Hi,
I have written boxplot commands of this form before, but I don''t quite understand why the function call is reporting a syntax error in this instance. All parameters passed to the function are strings.
Thanks in advance.
Payam
> simplevar <- function(wframe,column1,column2) {
+ tframe <- get(wframe)
+ x1 <- which(names(wframe)==column1)
+ x2 <- which(names(wframe)==column2)
+ print(tframe[x1])
+ print(tframe[x2])
+ gtitle <- paste(names(tframe[x2])," vs. ", names(tframe[x1])
+ quartz(width=7,height=5,dpi=200)...
2012 May 21
3
Replace a variable by its value
I have a dataset called "raw-data" . I am trying to use the following code -
col_name<-names(raw_data)
for (i in 1:(length(names(raw_data))-2))
{
tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i])
chisqtest<-chisq.test(tbl)
}
Say the 1st column of my raw_data is Column1. The idea is when i=1 then
raw_data$col_name[i] will automatically become raw_data$Column1 , which is
not happening. Kindly help?
--
View this message in context: http://r.789695.n4.nabble.com/Replace-a-variable-by-its-value-tp4630734.html
Sent from the R help mailing list archive at Nabble.com.
2003 Aug 07
2
Question about 'NA'
Hi all,
Ive got a database with 10 columns (different
variables) for 100 subjects, each column with
different # of NA's. I'd like to know if it is
possible to use a function to exclude the NA's using
only a specific column, lets say:
Data2 <- omit.exclude(Data1$column1) ??, then
Data3 <- omit.exclude(Data1$column2) and so on
I tried the code above but with no results
Thanks for any help
CM
__________________________________
Yahoo! SiteBuilder - Free, easy-to-use web site design software
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
...a median value of 7.642552 but I only want it to be displayed as 7.6.
Thank you so much for your help. I am very sorry for troubling you but I am very very new to this programming and to R as you can see.
<quote author='arun kirshna'>
Hi,
Lines1<-readLines(textConnection("Column1 -1,2,3,4,5,6,6,7
COlumn2- 3,4,5,6,7,8,8
Column3-- 45,66,7,8,89,
COlumn4-5,6,7,7,8,9
Column5 -5,6,7,8,8"))
vec1<-unlist(strsplit(Lines1,"-"))
dat1<-as.data.frame(t(read.table(text=vec1[grepl(",",vec1)],sep=",",fill=TRUE)))
row.names(dat1)<-NULL
colnames(...
2004 Oct 25
2
Reading sections of data files based on pattern matching
...s which I want
to analyze plot etc.
Since this will be used many people at the department I wanted to make
sure that will do this in the best way.
For instance I want to read a snippets of data from a text that look
like this.
-------------------------------
Lots of stuff
...
@@Start Values@@
Column1 Column2 Column3 ...
Row1 1 2 3 ...
...
@@End Values@@
More stuff
...
@@Start OtherValues@@
Column1 Column2 Column3 ...
Row1 1 2 3 ...
...
@@End OtherValues@@
I looked in the help files and found grep which operates on character
strings, do I have to like this then?
1. Read file with readLines...
2007 Dec 24
2
expand.grid function
...several times and like the results it gives me. I
am now trying something with it that I have not been able to get to work.
For any n column matrix I would like to run this function on those n columns
and store the results.
For example, if my matrix has 1 column then this is just expand.grid(x =
column1). If my matrix has two columns, then I want expand.grid(x =
column1, y = column2), and so on for any number of columns...
In a program I am writing, the user can specify any matrix. Does anyone
know of a way for R to calculate this based on what the input matrix is?
e.g. if this user gives a 3...
2024 Jun 06
2
R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis
...output$data_info <- renderText({
req(data())
"Preview of the data uploaded:"
})
output$data_head <- renderPrint({
req(data())
head(data(), 20)
})
# Select response variable
output$column_selector_1 <- renderUI({
req(data())
selectInput("column1","Select response variable", choices =
names(data()))
})
# Select first independent variable
output$column_selector_2 <- renderUI({
req(data())
selectInput("column2", "Select first independent variable", choices =
names(data()))
})
# Selec...
2009 Jun 17
6
script help
Hi
?
I have a file. list.txt (two columns)
?
column1??? column2
name??????? address
?
?
I need to put in the letter file letter.txt eg:
?
Dear: Chloe
Address: CA
?
Can I use this
?
for i `cat list.txt` | sed 's/Chloe/$i.1; /CA/$i.2/g' $i.letter.txt
?
Thank you for your help
?
?
?
?
?
__________________________________________________...
2006 May 09
9
Active Record HELP!!!!!
Hello,
Can someone kindly tell what the heck creating a relationship does in
active record?
I understand the idea of joining the tables and such. But how do I use
it? Is it available in a scaffold? How about when I want to view a
record and want to see all the joined data from the other table? Do I
have to manually code the data I want from the other table? Does this
automatically make the
2005 Dec 31
3
Semi-Dynamic table sorting (without AJAX)
...a simple method for doing so by using links in the
titles. Having actually tried to implement this strategy, I have come
across several refinements that I would like to share.
First...
your table view should look like this...
...
<table>
<tr>
<th><%= link_to ''Column1'', :sort=>''column1'' %>
<th><%= link_to ''Column2'', :sort=>''column2'' %>
</tr>
.....
</table>
...
your ''model'' controller ''list'' action should look like this....
def...
2006 Apr 06
1
reshape question
Hi,
I have a data fram like this:
date column1 column2 column3 value1 value2 value3
1-1 A B C 10 5 2
2-1 A B D 5 2 0
3-1 A B E 17 10 7
How can I reshape it to:
date column1 column2 column3 v x
1-1 A B C value1 10
1-1 A B C value2 5
1-1 A B C value3 2
2-1 A B D value1 5
2-1 A B D value2 2
2-1 A B D value3 0
3-1 A B E value1 17
3-1 A B E value2...