Displaying 20 results from an estimated 83 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...
2024 Dec 11
1
Cores hang when calling mcapply
...; library(arrow)
>
> # Step A: Load data efficiently as data.table
> dt <- as.data.table(
> open_dataset(
> sources = input_files,
> format = 'csv',
> unify_schema = TRUE,
> col_types = schema(
> "ID_Key" = string(),
> "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
>...
2024 Dec 12
1
Cores hang when calling mcapply
...it works, and takes about 15 minutes on our server configuration:
temp <-
??????open_dataset(
????????????sources = input_files,
????????????format = 'csv',
????????????unify_schema = TRUE,
????????????col_types = schema(
????????????"ID_Key" = string(),
????????????"column1" = string(),
????????????"column2" = string()
????????????)
??????) |> as_tibble()
??????
??keeptabs <- split(temp, temp$ID_Key)
if(isTRUE(multicore)){
keeptabs <- mclapply(1:length(keeptabs), function(i) crewjanitormakeclean(keeptabs[[i]],c("column1",&q...
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...
2024 Dec 12
1
Cores hang when calling mcapply
...ct to `reshape2::dcast()`, but since that appears to be deprecated, it will fail in future versions at some point.
To avoid this, consider converting?`keeptabs` into a `data.table` directly before calling `dcast()`. For example:
>?setDT(keeptabs)
> out1 <- dcast(keeptabs, ID_Key ~ column1, fun.aggregate = length, value.var = "column1")
> out2 <- dcast(keeptabs, ID_Key ~ column2, fun.aggregate = length, value.var = "column2")
If?`keeptabs` is a `data.table` at the time of calling `dcast()`, this ensures the `data.table` method of `dcast()` is used...
2024 Dec 11
1
Cores hang when calling mcapply
...; library(arrow)
>
> # Step A: Load data efficiently as data.table
> dt <- as.data.table(
> open_dataset(
> sources = input_files,
> format = 'csv',
> unify_schema = TRUE,
> col_types = schema(
> "ID_Key" = string(),
> "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
> TR...
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.
2024 Dec 11
1
Cores hang when calling mcapply
...t; > dt <- as.data.table(
> > >?? open_dataset(
> > >??? sources = input_files,
> > >??? format = 'csv',
> > >??? unify_schema = TRUE,
> > >??? col_types = schema(
> > >????? "ID_Key" = string(),
> > >????? "column1" = string(),
> > >????? "column2" = string()
> > >??? )
> > >? ) |>
> >
> > >??? collect()
> > > )
> > >
> > > # Step B: Clean names once
> > > # Assume `crewjanitormakeclean` essentially standardizes...
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...