Displaying 20 results from an estimated 1100 matches similar to: "Question"
2012 Oct 26
1
SQL via RODBC
Hi list,
Is there a way to use sqlQuery function where there is a sql file (ie.
sample.sql)? I just want to mention that in my sql file there are some
comment lines (starting with --). This means that if I paste all the lines
in the sql file, I'll come up with a long string that most part of it is
commneted (after commnet sign --).
thanks
Arvin
[[alternative HTML version deleted]]
2006 Apr 26
3
The beautiful math plot
Dear R-help,
How can I replicate the beautiful math plot found in the right-hand side of http://www.r-project.org/screenshots/desktop.jpg? I tried the following code but didn't obtain something as beautiful.
r <- seq(-10, 10, len=100)
y <- cos(r^2)*exp(-r/6)
par(pty="s")
plot(r,y,type="l")
Thanks in advance!
Yung-jui Yang
[[alternative HTML version deleted]]
2006 May 18
3
Google Map
Used a great howto @
http://iamrice.org/articles/2005/12/09/using-google-maps-in-the-uk-with-rails
for using google maps on uk sites. Just having one issue I can''t seem
to work out how to draw the postcode from my table I keep getting hit by
method errors.
The controller is
require ''postcode_2_latlong''
postcode = Postcode.new("TN22 2LG")
# I want this to
2006 Jul 10
2
about overdispersed poisson model
Dear R users
I have been looking for functions that can deal with overdispersed poisson
models. According to actuarial literature (England & Verall, Stochastic Claims
Reserving in General Insurance , Institute of Actiuaries 2002) this can be handled through the
use of quasi likelihoods instead of normal likelihoods. However, we see them frequently
in this type of data, and we would like to
2011 Feb 25
4
Comparing snapshots?
Hi,
for a backup program I have to find all differing files
(including metadata) in two snapshots taken from the same
subvolume.
Having looked at the find-new command I thought about this
process:
1. Get the two transids when the two snapshots were created.
2. Query modifications to the original subvolume between the two
transids.
Is the general process corrent or have I overseen
2005 Aug 10
5
validates_format_of on an optional field using :if
Hi there,
I''ve got the following in my model:
validates_format_of :postcode,
:with => /^([a-zA-Z]{1,2}[0-9]{1,2} [0-9]{1}[a-zA-Z]{2})$/,
:message => "is not valid",
:if => :postcode
... but it''s not working - it always insists on validation, even if postcode
is empty. Basically, the postcode field is optional, but if it''s filled in, I
want to
2012 Apr 10
3
Snapper packages for Ubuntu
Hi,
I''ve created snapper packages for Ubuntu, available on
https://launchpad.net/~snapper/+archive/stable. For those new to
snapper, it''s a tool for managing btrfs snapshots
(http://en.opensuse.org/Portal:Snapper). It depends on libblocxx
available from https://launchpad.net/~bjoern-esser-n/+archive/blocxx ,
and currently uses git source up to commit 50dec40. I''ve done
2006 Feb 28
1
Wrong id after join!
The Problem
-----------
After using a join in my find the id attributes set in my Entity objects
are wrong! It is setting the Entity id to the value from Postcode id!
The Code
--------
entities = Entity.find(:all,
:conditions => [...omited...],
:joins => "as e inner join postcodes as pc on
substring_index(e.postcode,'' '', 1) =
2006 Jul 24
3
trim function in R
Hi all,
I am looking for a function in R to trim the last two characters of an
8 character string in a vector. For example, I have the codes
37-079-2, 370079-3,37-079-8 and want to trim them to 37-079 by
removing the last two characters. Is sub the correct function to use,
and if so how can I specify trimming the last 2 characters? I have
read the help file, but can't quite figure out how
2006 Jan 26
2
footnote in postscript lattice
I would like to add a footnote to this graph but do not see a "footnote" command in the package:lattice documentation. I would like to note the "span=.8"
as the footnote.
postscript(file= ?C:/Documents and Settings/dsonneborn/My Documents/Slovak/output/pcb_tables/smooth_PCB_lines_four.ps?, bg=?transparent?, onefile=FALSE, pointsize=20,paper=?letter?, horizontal=TRUE,
2008 Sep 22
1
Ccreating methods on the fly / counting distinct field values
Hi,
I''m pretty new to ruby and rails, so apologies if this has been covered
before (I couldn''t find a thread on it).
I want to retrieve a count of records held in the DB for every distinct
value of an attribute.
E.g. given a class Address with a postcode field, I would like to retrieve
an array of ValueCount objects. The ValueCount object would hold the value
retrieved from
2012 Nov 15
1
problem with XML package
Hi List,
I have used XML in R version 2.9.2. The code is working fine using Rv2.9.2
and its related XML package. Now I am using Rv2.13.1 and its related XML
package, but I get the following error:
Error in UseMethod("xmlName", node) :
no applicable method for 'xmlName' applied to an object of class "NULL"
Any idea?
Thanks
Arvin
[[alternative HTML version
2012 Dec 04
3
Read.csv
Hi list,
I am using read.csv to read data from csf files, but noticed that the
numeric data (those larger than 10 power 9) are rounded to the nearest
million (10 power 6). Any solution?
Thanks
Arvin
--
Sent from my mobile device
2006 May 02
4
useful bit of code (hopefully)
Hi,
I often find myself using bits of code like this inside ActiveRecord,
perhaps it''s useful for others, or others can improve on it:
###########
# fix user input before validating it
before_validation :sanitize_input
# santize input before actual validation is called
# this uses the little methods defined below
def sanitize_input
trim %w(adres postcode woonplaats email naam
2006 Aug 01
4
Fitting models in a loop
If I want to display a few polynomial regression fits I can do something
like
for (i in 1:6) {
mod <- lm(y ~ poly(x,i))
print(summary(mod))
}
Suppose that I don't want to over-write the fitted model objects,
though. How do I create a list of blank fitted model objects for later
use in a loop?
Murray Jorgensen
--
Dr Murray Jorgensen
2008 Mar 05
3
regex sulotion for seperating number and string
I have strings contain postcode and letters, some seperated with blank, some
with comma, and some hasn't seperated. eg, "2324gz" "2567 HK" "3741,BF"
I want to seperate the number and letters into two new variables.
I know this should be quite basic question, but searched on regex syntax and
that seems a bit scarey to me, any one can shot me a quick solution
2006 May 30
6
Reuse Partials
Hi all,
This is my first official post as RoR developer, so here it is.
I''ve got a partial for a Address (Postcode, Address, City, ...). I want
to use this partial multiple times on the same form? So I want to fill
in multiple addresses and insert them individualy. How do I go about
doing this?
Kind Regards,
Eugene Louw
--
Posted via http://www.ruby-forum.com/.
2007 Sep 25
7
Who uses R?
Dear R users,
I have started work in a Statistics government department and I am trying to
convince my bosses to install R on our computers (I can't do proper stats in
Excel!!). They asked me to prove that this is a widely used software (and not
just another free-source, bug infected toy I found on the web!) by suggesting
other big organisations that use it. Are you aware of any reputable
2007 Jul 26
3
Spec for validation plugin
Hi,
I''m writing a specification for a model called Location which has a
post_code attribute which should be a valid UK postcode. I''m using the
http://svn.designbyfront.com/rails/plugins/validates_as_uk_postcode/
validates_as_uk_postcode plugin to handle the validation but I''m not sure
how I should properly specify my model.
Heres the model code:
class Location <
2006 Nov 28
2
Twice the same code, but only once it seems to work
Hello,
I am confronted with a very strange problem which I can not solve... and
God I tried a lot, lost almost a whole day, but couldn''t find an answer:
The idea is to have a form both in admin and in dir, in admin there will
be some more fields that is why I have twice a form. In admin the form
appears, in dir the form does not appear instead
"þÿ
New company" why is it that the