Displaying 20 results from an estimated 2000 matches similar to: "SQL-select using native R methods ?"
2007 Jul 31
3
Nonlinear optimization with constraints
Hello R community,
I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below:
Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n.
subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a scalar.
(x is a vector of variables, A is nxm matrix, b is a vector)
2012 Jan 03
1
sqldf and not converting integers to floating point in SQLite
Hi,
I have following 2 tables:
Table 1:
POSTAL | VALUE
1000|49
1010|100
1020|50
Table 2:
INSEE | POSTAL
A|1000
B|1000
C|1010
D|1020
I would like to convert this to the following:
INSEE | VALUE_SPREAD
A|24.5
B|24.5
C|100
D|50
I can achieve this with a nested SQL query (through counting the
number of POSTAL that belong to any given INSEE, and diving the value
of the postal in that INSEE by
2016 Dec 31
3
Automatic Insertion of OpenACC/OpenMP directives
Dear LLVMers,
we have released a tool that uses LLVM to insert OpenACC or OpenMP
4.0 directives in programs. You can use the tool online here:
http://cuda.dcc.ufmg.br/dawn/. Our tool, dawn-cc, analyzes the LLVM IR
to infer the sizes of memory chunks, and to find dependences within
loops. After that, we use debug information to translate the low-level
information back into annotations that we
2016 Dec 31
0
Automatic Insertion of OpenACC/OpenMP directives
Hi,
> On Dec 31, 2016, at 8:33 AM, Fernando Magno Quintao Pereira via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Dear LLVMers,
>
> we have released a tool that uses LLVM to insert OpenACC or OpenMP
> 4.0 directives in programs. You can use the tool online here:
> http://cuda.dcc.ufmg.br/dawn/. Our tool, dawn-cc, analyzes the LLVM IR
> to infer the sizes of
2016 Dec 31
2
Automatic Insertion of OpenACC/OpenMP directives
Dear Mehdi,
I've changed your example a little bit:
float saxpy(float a, float *x, float *y, int n) {
int j = 0;
for (int i = 0; i < n; ++i) {
y[j] = a*x[i] + y[I]; // Change 'I' into 'j'?
++j;
}
}
I get this code below, once I replace 'I' with 'j'. We are copying n
positions of both arrays, 'x' and 'y':
float saxpy(float a,
2017 Jan 03
2
Automatic Insertion of OpenACC/OpenMP directives
> On Jan 3, 2017, at 7:17 AM, Jonathan Roelofs <jonathan at codesourcery.com> wrote:
>
>
>
> On 12/31/16 12:37 PM, Fernando Magno Quintao Pereira via llvm-dev wrote:
>> Dear Mehdi,
>>
>> I've changed your example a little bit:
>>
>> float saxpy(float a, float *x, float *y, int n) {
>> int j = 0;
>> for (int i = 0; i < n;
2010 Dec 21
1
Matching 2 SQL tables
Hi,
I have a postgresql and a mysql database and I would like to combine the
info from two different tables in R. Both databases contain a table with
three columns: project_name, release_id and release_date. So each project
output could be released multiple times (I am interested in the first
release_date). However, some of the data is missing. Basically, what I want
to do is to try and fill the
2008 Sep 15
2
S4 coercion responsibility
Should functions or the user be responsible for coercing an S4 object
argument containing the proper object (and thus should below be
considered a bug in the packages or not)?
The example is with RSQLite but the same thing happens with RMySQL, and
other DBI packages.
> library("RSQLite") Loading required package: DBI
> m <- dbDriver("SQLite")
> con <-
2011 Jul 14
1
SQldf with sqlite and H2
SQldf with sqlite and H2
I have a large csv file (about 2GB) and wanted to import the file into R and do some filtering and analysis. Came across sqldf ( a great idea and product) and was trying to play around to see what would be the best method of doing this. csv file is comma delimited with some columns having comma inside the quoation like this "John, Doe".
I tried this first
2012 Sep 12
2
[LLVMdev] [PATCH][Review request] tablegen: extend list fields
The attached patch adds a construct that enables extending the base class'
lists rather than completely overwriting them.
The patch hasn't gone through extensive testing yet (other than running
make check).
The lists can be extended either with a "+=" operator in a let statement or
placing a '"+" in front of a superclass:
- Example 1:
def D0 : C1 {
let
2007 Oct 24
3
How do you specify a rubygem is being required?
Hi
I''m loading a gem on demand but can''t find a way to spec it.
Assuming rubygems is already loaded, I assumed the following would work:
describe SqliteConnection, " class" do
it "should require ''sqlite3''" do
Kernel.should_receive(:require).with("sqlite3")
SqliteConnection.new
end
end
Unfortunately
2012 Sep 12
0
[LLVMdev] [llvm-commits] [PATCH][Review request] tablegen: extend list fields
If you are changing the syntax, please update the BNF in the comments.
--Sean Silva
On Wed, Sep 12, 2012 at 6:16 PM, Akira Hatanaka <ahatanak at gmail.com> wrote:
> The attached patch adds a construct that enables extending the base class'
> lists rather than completely overwriting them.
> The patch hasn't gone through extensive testing yet (other than running make
>
2012 Sep 14
1
[LLVMdev] [llvm-commits] [PATCH][Review request] tablegen: extend list fields
Please take a look at the attached patch.
I updated the BNF and added comments in the code.
On Wed, Sep 12, 2012 at 4:58 PM, Sean Silva <silvas at purdue.edu> wrote:
> If you are changing the syntax, please update the BNF in the comments.
>
> --Sean Silva
>
> On Wed, Sep 12, 2012 at 6:16 PM, Akira Hatanaka <ahatanak at gmail.com>
> wrote:
> > The attached
2006 Feb 28
2
Need help with a Power Find()
I was hoping someone would be able to help me with creating a method.
I have two tables. What I am trying to do is create a list of all the id''s
from table2 that aren''t currently referenced by Table1''s address_id column.
That way, when I create a new customer I can have a drop down list in the
view of all the addresses that are not currently being used.
##### Database
2013 May 01
1
Combine multiple tables into one
Hi,
May be this helps:
dat1<- as.data.frame(table1)
?dat2<- as.data.frame(table2)
names(dat2)<-c("V3","V4")
library(plyr)
res<-join(dat1,dat2,type="full")
?res[is.na(res)]<- 0
?res
#? V1 V2 V3 V4
#1? 1? 1? 0? 0
#2? 1? 2? 0? 0
#3? 0? 0? 0? 1
#4? 0? 0? 0? 4
?combinedtable<-as.matrix(res)
?colnames(combinedtable)<- NULL
?combinedtable
#???? [,1] [,2]
2005 Sep 01
6
png scaling problem
scaling<-4
xywidth<-480
resolution<-150
png(filename = "c:/r/anschluss/plots/4.png", width = xywidth*scaling,
height = xywidth*scaling,pointsize = 12, bg = "white", res =
resolution*scaling)
......
barplot(xrow,col = barcolors,cex.axis=scaling, ylab="mean time till attachment in sec",cex.lab=1.2*scaling)
I tried to scale the barplot but there is one
2005 Dec 15
3
<no subject>
Dear all,
I am still fairly new to R and try to analyze large tables of data generated
from genomic experiment. Currently, I am trying to plot pair of experiments
coming from different file, trying to look at the behavior of individual
feature in pair of experiment.
My problem is that I have independent list from different source and I would
like to plot the pair of value using a common key. As
2004 Sep 23
0
two internet connections don''t appear to be masqing
I have a script for dual internet connections that does this:
-------------------------
#!/bin/bash
IF1=eth1
IP1=203.219.190.106
P1=203.219.190.105
P1_NET=203.219.190.104
IF2=eth2
IP2=220.245.224.46
P2=220.245.224.45
P2_NET=220.245.224.44
IF0=eth0
P0_net=192.168.0.0
TABLE1=inet1
TABLE2=inet2
ip route add $P1_NET dev $IF1 src $IP1 table $TABLE1
ip route add default via $P1 table $TABLE1
ip
2005 May 13
17
modeling...
I''ve tried tackling this many ways on my own and can''t find a good solution:
Breaking it down to something simplier...
Venue
has one address
Person
has one address
Address
belongs to state
Assuming I don''t want to do tables for venue_addresses and person_addresses.
What is the best way to model this using rails... big thing here is i
want to be able
to reuse a
2006 Feb 19
1
One Model from two Tables with no foreign keys
I would like to create a model that is based on two database tables:
Table1
---------
id (PK)
data1
Table2
----------
id (PK)
data2
There is a one-to-one relationship between the records of Table1 and
Table2. (That is, for every record in Table1 there is a record with
matching id in Table2 and vice versa).
The problem is that I cannot alter the table schemas in any way, so I
cannot add