Displaying 20 results from an estimated 1000 matches similar to: "help with file"
2006 May 23
3
ez-where headscratch
Hi there,
I''m puzzled by this apparently simple query I can''t manage to reassemble
using ez_where plugin.
cond = Caboose::EZ::Condition.new :my_table do
start_on < Time.now
any {end_on > Time.now; end_on.nil?}
end
I keep getting the following result :
>> cond.to_sql
=> ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
2009 Oct 01
1
Help me replace a for loop with an "apply" function
...if that is possible
My task is to find the longest streak of continuous days a user participated
in a game.
Instead of writing an sql function, I chose to use the R's rle function, to
get the longest streaks and then update my db table with the results.
The (attached) dataframe is something like this:
day user_id
2008/11/01 2001
2008/11/01 2002
2008/11/01 2003
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to
dump the DB, modify the table''s structure, then go and modify EVERY
insert statement.
The insert statements look like (from memory):
INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''',
''some_other
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello,
I have a situation where the foreign key into a table doesn''t
correspond to that table''s primary key:
my_table
-------------
id (pk)
name
...
other_table
--------------
id (pk)
my_table_name (fk references my_table(name))
...
I want to be able to say something like:
class OtherTable < ActiveRecord::Base
belongs_to :my_table, :foreign_key => { :my_table_name
2005 Mar 23
1
Complete Linkage Clustering techniques
Dear R
I recently asked for a cluster analysis
Using
* cluster.results <- hclust(iris.dist, method="complete")
* but nothing happened i.e the previous scatterplot matrix still
showed up whereas I was expecting a dendogram.
Could it be that because I had used cutree before on the scatter plots that
it somehow mucked it up. I tried detach then attach and commenced making the
data
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I
like to keep related columns together. Is there a way to specify
where the column is added in a table with migrations? For example, in
MySQL you can do:
ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column
I was hoping migrations would support something like this:
add_column :my_table, :new_column, :integer,
2011 Dec 12
1
Is there a way to print branch distances for hclust function?
The R function hclust is used to do cluster analysis, but based on R
help I see no way to print the actual fusion distances (that is, the
vertical distances for each connected branch pairs seen in the cluster
dendrogram).
Any ideas? I'd like to use them test for significant differences from
the mean fusion distance (i.e. The Best Cut Test).
To perform a cluster analysis I'm using:
x
2010 Jun 10
1
Can RMySQL be used for a paramterized query?
I have not found anything about this except the following from the DBI
documentation :
Bind variables: the interface is heavily biased towards queries, as opposed
> to general
> purpose database development. In particular we made no attempt to define
> “bind
> variables”; this is a mechanism by which the contents of R/S objects are
> implicitly
> moved to the database during SQL
2012 Dec 04
1
How do I get internal nodes of dendograms produced by R?
I am using R for hierarchical clustering of a number of documents.
I have a distance matrix on which I have applied hclust method. When I plot
the result of hclust method, I can see the dendogram plotted. What I need
now is the dendogram stored as a tree in a data structure. My goal is to
automatically label all internal nodes. For that, I need to know, which
leaf nodes make a first level
2009 Apr 07
2
heatmap.2 no reordering of the columns and rows
Hi,
I need to generate a heatmap on a square matrix and wouldn't want to reorder the columns and the rows on the heatmap display.
I have used the options Rowv=NULL and Colv=NULL but doesn't seem to work. Following is a snippet of the heatmap function i am using.
args <- commandArgs();
inputfile <- args[2]
imgfile <- args[3]
bitmap(imgfile, height=15, width=15, res=100,
2012 May 29
1
community finding in a graph and heatplot
Hi everyone,
I am using the fastgreedy.community function to get the $merges matrix and the $modularity vector. This serves my purpose of testing modularity of my graph. But I am "greedy" to plot the heat map and dendrrogram based on the $merges dendogram matrix. I know that heatplot does the graphics part but I am not sure if the dendogram generated by the heatplot will match the one
2002 Aug 27
1
2 questions about cluster analysis
Hello everyone!
I have two questions regarding cluster analysis with the package 'cluster'
:
1. I have a dissimilarity matrix in csv format, and I would like to use
it to generate a dendogram using 'hclust'. How do I make that matrix
compatible with the function? I think it has to be similar to the objects
generated by the 'dist' function. Any ideas?
2. Does
2012 Mar 15
1
Get Details About Clusters
Hi everybody!
Anybody knows how can I get detalied information about clusters after using hclust?
The issue is that if I have some items in different clusters, I would like to get the cluster where each item is placed.
Taking into account that my data set is too large, it is not useful to have the dendogram or a graphic, and really I need something like a simple table with item label and cluster
2017 Jun 09
2
Dendogram from RNAseq read count to show correlation between biological replicate using R
Dear all,
I need to make dendogram from read count in a csv file across 34 samples
including biological replicate.
Please share R code or package to do this.
Do I also need to normalized read count before using read data?
Thanks
[[alternative HTML version deleted]]
2005 Mar 24
2
font sizes for row.names of dendograms
Dear R
I recently performed a cluster analysis. It produced the dendogram no
problem but unfortunately the font size of the row.names were all cluttered
due to their large size
So I tried to change the font size using
plclust(cluster.results, labels=iris$specie, cex=0.8)
and R came back to me saying
Error in plclust(cluster.results, labels = iris$specie, cex = 0.8) :
unused argument(s)
2018 Feb 15
3
[Bug 1226] New: Segmentation fault when printing a rule checking byte zero of NFT_PAYLOAD_LL_HEADER
https://bugzilla.netfilter.org/show_bug.cgi?id=1226
Bug ID: 1226
Summary: Segmentation fault when printing a rule checking byte
zero of NFT_PAYLOAD_LL_HEADER
Product: nftables
Version: unspecified
Hardware: x86_64
OS: Debian GNU/Linux
Status: NEW
Severity: normal
Priority: P5
2006 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there !
I try to figure out how to do something like this in Rails :
SELECT * FROM my_table WHERE name LIKE ''GOGONAM%''
My problem is the % and the quotes.
>From now, I do like this :
searched_name = params[:name]+''%''
user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name])
But is there a more gracefull way to do a LIKE
2011 Dec 22
1
large data set (matrix) using image()
When I use the image() function for a relatively small matrix it works perfectly, eg.x <- 1:100
> z <- matrix(rnorm(10^4),10^2,10^2)
> image(x=x,y=x,z=z,col=rainbow(3))but when I want to plot a larger matrix, it doesn't really work. Most of the times, it just plot a few intermitent points.x <- 1:1000
z <- matrix(rnorm(10^6),10^3,10^3)
image(x=x,y=x,z=z,col=rainbow(3))
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys,
I have a situation here. I have my project set to no pluralization due
to legacy tables in environment.rb. Now, I have some new tables which
I''m starting to pluralize. When I do a generate a scaffold to this new
table:
script/generate scaffold my_tables table
it seems to work out fine for certain sections like
http://mysite.com/railsapp/new (which also inserts properly to
2007 May 29
2
hierarhical cluster analysis of groups of vectors
I want to do hierarchical cluster analysis to compare 10 groups of
vectors with five vectors in each group (i.e. I want to make a dendogram
showing the clustering of the different groups). I've looked into using
dist and hclust, but cannot see how to compare the different groups
instead of the individual vectors. I am thankful for any help.
Anders