similar to: SQLDF from Variable Matrix

Displaying 20 results from an estimated 200 matches similar to: "SQLDF from Variable Matrix"

2010 Jul 20
3
Sequence from 2 Vectors
I would like to create a vector that is a sequence from 2 vectors. Could anyone provide suggestion on this? For example > a<-c(1,2,3) > b<-a+2 > b [1] 3 4 5 I would like to have a vector that is a sequence which starting from a and ending at b c = c(1:3,2:4,3:5) c = c(1,2,3,2,3,4,3,4,5) Thank you Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities
2010 Sep 15
2
Get File Names in Folder, Read Files, Update, and Write
Dear All, Could you please recommend how I can do this? I have several text files in one folder. Let's name them A0801.RSK, A0802.RSK, .... I would like R to 1) Know all file names in this folder 2) Update value in one column of these files 3) Write results in another text file with _xval in the file names Below is R code for read, update, and write one file
2010 Nov 09
2
Calculate Mean from List
Dear all, I have a list of correlation coefficient matrixes. Each matrix represents one date. For example A[[1]] A B C A 1 0.2 0.3 B 0.2 1 0.4 C 0.3 0.4 1 A[[2]] A B C A 1 0.5 0.6 B
2011 Sep 07
1
Weight in Function RM
Dear all, I am trying to do weighted regression using lm function in R. However, I have a question why the results from 1) lm(formula = Y~aX, weight = w) 2) lm(formula = wY~waX) are different. Aren't they supposed to have the exactly same result? Below are the R code to see difference in regression results MatY <- c(0.15,0.42,0.31,0.22) MatX <-
2010 Nov 25
1
Execute SQL Stored Procedure in R
Dear all, I would like R to retrieve a table resulting from execute sql stored procedures. What function can I use? Can RODBC do it. I tried channel1 <- odbcConnect("ptsecmstqa01-alpha") query <- paste("execute DB.dbo.usp_test") Data<- sqlQuery(channel1, query) However, it returned blank. Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra
2008 Mar 02
1
Problem plotting curve on survival curve (something silly?)
OK this is bound to be something silly as I'm completely new to R - having started using it yesterday. However I am already warming to its lack of 'proper' GUI... I like being able to rerun a command by editing one parameter easily... try and do that in a Excel Chart Wizzard! I eventually want to use it to analyse some chemotherapy response / survival data. That data will not be
2007 Sep 28
2
plot graph with error bars trouble
Hi, I have a data set like this: Mutant Rep Time OD 02H02 1 0 0.029 02H02 2 0 0.029 02H02 3 0 0.023 02H02 1 8 0.655 02H02 2 8 0.615 02H02 3 8 0.557 02H02 1 12 1.776 02H02 2 12 1.859 02H02 3 12 1.668 02H02 1 16 3.379 02H02 2 16 3.726 02H02 3 16 3.367 306 1 0 0.033 306 2
2011 Oct 31
2
Linear Regression with Linear Equality Constraint
Please advice on the package I should use to run a linear regression model (weighted least squared) with linear equality constraint. I initially tried "constrOptim" but it turned out that it only supported inequality linear constraint. Thank you very much in advance. Cheers, Jon -- View this message in context:
2011 Jun 02
0
Using SQLDF to pick values based on word count
I have a data frame in R with the following values. cars autocar cars info what is that donna drive car telephone i need car... I want to select all values which contain 'car', values with three words, and those keywords with car that contain three words. The first part is done with : sqldf("SELECT Keyword FROM dat WHERE Keyword like '%car%'") However, I'm not
2008 Jan 29
1
sqldf error
Hi, sqldf sounds like a very useful package but I don't even get the example to run: > a1s <- sqldf("select * from warpbreaks limit 6") Error in combine(FUN(...)) : argument "value" is missing, with no default > I am using R 2.6.1 on Windows Vista Business and have updated all packages. Some help would be very much appreciated. Many thanks, Werner
2013 Oct 08
1
Summary functions in sqldf() XXXX
Hi everyone, Is it possible to obtain the 1st & 3rd quartiles & the median in a sqldf() select statement? If so, can you please provide the summary fn code? Thanks! Dan [[alternative HTML version deleted]]
2010 Nov 02
1
class changed after execution with sqldf
When I run sqldf to merge two datasets, it's changing the Date (class date) to a numeric value (class factor). Not sure why. Appreciate any insight. Console output for two datasets and the merged dataset (via sqldf) listed below. > summary(df.aggregate) Date Hour x Min. :2010-07-01 0 : 64 Min. : 0.00 1st Qu.:2010-07-25 1 :
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 Jul 16
1
sqldf modify table
Hi - I am something of a newbie and am a little perplexed. When (trying to) modify a table I issue the following commands with subsequent errors sqldf("alter table Korea drop column code", dbname = "mydb") error in statement: near "drop": syntax error or sqldf("alter table Korea rename column hyr to hyrI", dbname = "mydb") error in statement:
2012 Mar 21
1
Using extract function for dates in sqldf
I'm trying to use sqldf to query for the earliest date of a blood test when patients have had multiple tests in a given year. My query looks like this: test11 <- sqldf("select CHILD_ID, min(SAMP_DATE) from lab group by CHILD_ID having extract (year from SAMP_DATE) = 2011") SAMP_DATE has class "date." I get the error
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 Nov 03
1
sqldf Date problem
Dear R-help readers, i've created a database for quotes data (for 4 years; 2007 -- 2010) with the sqldf package. This database contains a column "Date" in the format mm/dd/yyyy. The table in the database is called "main.data" and the database itself "Honda". I tried to get the Data just for certain period, say from 01/01/2007 until 01/10/2007 with the
2017 Aug 11
0
Fwd: RE: Package sqldf in R and dates manipulation
Sent from Samsung tablet. 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. ?
2018 Mar 10
1
error message from sqldf
Dear R users, I got the following error message from running sqldf code in R. do you know how to fix it? I read the sqldf package instruction and did not find a solution. Thank you, Ding chr10 <- sqldf("select * from manifest where CHR==10") UCN3cpg <- sqldf("select * from chr10 where MAPINFO between 5405573 and 5407594), overwrite = TRUE") Error: Table chr10
2013 Jul 16
0
Sqldf y codificación \u00b0 para el grado
Hola Eva, Una forma inmediata es no guardando los valores con esa codificación. Y tras la extracción incluir las unidades... Saludos, Carlos Ortega www.qualityexcellence.es El 16 de julio de 2013 08:23, Eva Prieto Castro <evapcastro@yahoo.es>escribió: > > > Buenos días: > > Creo un data.frame del siguiente modo: > > d<-data.frame(a=c("112.45º",