similar to: Database

Displaying 20 results from an estimated 10000 matches similar to: "Database"

2012 Feb 15
1
Passing date as parameter while retrieving data from database using dbGetQuery
Hi All, This might be simple question, I need to retrive data for modelling from the databases. Eveytime date values changes so I countnot fix date value in the code, it is required to pass as parameter. When I pass the date as parameter, it throws error. (ERROR: column "start_dt" does not exist Position: 285) My script is as below, please guide me where am I going wrong? All parameters
2010 Nov 15
5
How to Read a Large CSV into a Database with R
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to insert a very large CSV file into a SQLite database. I'm pretty new to working with databases in R, so I apologize if I'm overlooking something obvious here. I'm trying to work with the American Community Survey data, which is two 1.3GB csv files. I have enough RAM to read one of them into memory,
2011 Jun 29
2
Executing a script "hand-made" and time
Hi all, I have a function written by me that read a matrix (data frame) from a txt with 4 million of rows and 13 columns. The think is my function works with an input matrix of 100x13 and now I tried to execute my function with the big "input file" and it is running form the moment two hours... There is a way to know (how much time could it cost?) The second question is... I want
2017 Aug 11
2
Package sqldf in R and dates manipulation
Dear all, I recently read the book " R data preperation and manipulation using sqldf package" by Djoni Darmawikarta However, I have a problem with manipulation of dates using this package, I do not get the expected results. Do I need to install some packages to be able to subset the data by dates in sqldf? I am not getting Djoni Darmawikarta email address. Please see the practice
2012 May 06
3
PLot a matrix
Hi, I want to plot this matrix (I attach the data), it is suposed that each column is a different time series. If I do g<-read.table("dataADF.txt", header=F) and plot(g[,1],type="l") it plots the first column plot if I want in a unique graph each colums of dataA, all in one. How should I proceed?There is a direct pre-defined code? And If I wanted a plot by each
2012 Feb 02
9
sqldf for Very Large Tab Delimited Files
Hi All, I have a very (very) large tab-delimited text file without headers. There are only 8 columns and millions of rows. I want to make numerous pieces of this file by sub-setting it for individual stations. Station is given as in the first column. I am trying to learn and use sqldf package for this but am stuck in a couple of places. To simulate my requirement, I have taken iris dataset as an
2017 Aug 11
0
Package sqldf in R and dates manipulation
See FAQ #4 on the sqldf github home page. On Fri, Aug 11, 2017 at 9:21 AM, Mangalani Peter Makananisa <pmakananisa at sars.gov.za> wrote: > Dear all, > > I recently read the book " R data preperation and manipulation using sqldf package" by Djoni Darmawikarta > However, I have a problem with manipulation of dates using this package, I do not get the expected results.
2012 Mar 07
2
Problems with generalized linear model (glm) coefficients.
Hello to everyone. I´m writing you because I´m feeling a bit frustrated with my work. My work consists in finding the relation between the amount of fires and the weather, so, my response variable is the amount of fires in a fire season and the explanatory variables are the temperature, the amount of precipitation and the some others…. my problem is this; I keep getting the wrong sign in the
2010 Sep 06
3
Failure to aggregate
I have a (very big - 1.5 rows) dataframe with a (POSIXt" "POSIXlt") column h (hour). Surprisingly, I cannot calculate a simple aggregate over the dataframe. > n.h1 = sqldf("select distinct h, count(*) from x group by h") Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table: x) In addition: Warning message: In
2011 Mar 09
2
SQLDF - Submitting Queries with R Objects as Columns
Fellow R programmers, I'd like to submit SQLDF statements with R objects as column names. For example, I want to assign "X" to "var1" (var1<-"X") and then refer to "var1" in the SQLDF statement. SQLDF needs to understand that when I reference "var1", it should look for "X" in the dataframe. This is necessary because my SQLDF
2011 Apr 18
2
SQLDF syntax
Hi, I am new to R and trying to migrate from SAS. I am trying to use sqldf to create a new table from existed table and change some of the columns. I have table called DataOld with columns commodity, rate and total and I am trying to create new table called DataNew with columns commodity, ratenew and totalNew. > sqldf("create table datanew as select commodity, ratenew as rate * 10, >
2012 Jan 23
1
sqldf + Date class. Ordering and summary statistics appear to be incorrect.
I've been using sqldf heavily lately but have encountered problems with ordering of observations or calculating statistics such as max() and min() when the variable used is of class Date. For example, if I run the following code: =============== begin code ================= library(sqldf)
2017 Sep 11
4
Case statement in sqldf
Hi all, I am trying to create a new variable called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . Please advise me as to how I can do this mutation. library(zoo) library(lubridate) library(stringr) library(RH2) library(sqldf) cr$ReportDate = as.Date(cr$ReportDate, format ='%Y-%m-%d') > cr2 = sqldf(" select
2013 Jan 14
1
sqldf package: using variables in where condition
Sent from my iPhone On Jan 13, 2013, at 9:47 PM, ravsre <ravishree51 at hotmail.com> wrote: > I am trying to use the sqldf package to create independent data frames from a > master dataframe. > I want to use sqldf package and perform a simple select statement. However, > what I want to do is to create a loop and repeatedly send a variable to the > where clause condition
2010 Aug 26
1
sqldf syntax
Please correct the following > sqldf("update esc left join forwagg on esc.ym=forwagg.Date set esc.ri2=forwagg.N1 where esc.age=12","select * from main.esc") Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: near "left": syntax error) Thanks. Stephen [[alternative HTML version deleted]]
2012 Aug 20
1
function case in sqldf (datas from oracle) with a null value
I use sqldf to join 2 dataframes from 2 distinct databases : a and b come from old sqldf's. sqldf("select a.*, b.*, case a.QTY when null then b.QTY else a.QTY end as NEW_QTY" from a inner join b on a.OBJECT=b.OBJECT") R doesn't understand "when null". I tried with "when NA", "when '' ", "when ' ' " but it doesn't
2012 Jul 11
2
Passing Multiple Variable Into SQLDF Statement as parameters of function
Hey guys, So I'm working with a project where I manage a database within R, and I'm developing a script/function that will automatically run my queries in R depending on the date parameters passed in. The problem is that when I create variables for the dates, and use those variables in my sqldf statements, R says that there is no such column in the dataframe (which is true!). My question
2010 Nov 01
1
sqldf error only on Unix not Windows
Hello Group, I am having trouble with the sqldf package on unix. The same code works fine on windows. Silly Example script: # Load the package library(sqldf) # Use the titanic data set data(women) colnames(women) head(women) sqldf('select height, count(*) from women where height is not null group by weight') Unix Output and error: bash-3.00$ R --vanilla <testR.R
2017 Sep 11
0
Case statement in sqldf
2018-03-3 in your code should be 2018-03-31. The line then'201415' needs to be fixed. When posting please provide minimal self-contained examples. There was no input provided and library statements not relevant to the posted code were included. Fixing the invalid date and bad line, getting rid of those library statements that are unnecessary and providing some test input, it works
2011 Apr 29
4
For loop and sqldf
Hi list, Can anyone tell my why the following does not work? Thanks a lot! Your help is very much appreciated. DF = data.frame(read.table(textConnection(" B C D E F G 8025 1995 0 4 1 2 8025 1997 1 1 3 4 8026 1995 0 7 0 0 8026 1996 1 2 3 0 8026 1997 1 2 3 1 8026 1998 6 0 0 4 8026 1999 3 7 0 3 8027 1997 1 2 3 9 8027 1998 1 2 3 1 8027 1999