similar to: SQL> select ... where "R variable"

Displaying 20 results from an estimated 4000 matches similar to: "SQL> select ... where "R variable""

2011 Mar 04
4
cv.lm syntax error
Dear all, I've tried a multiple regression, and now I want to try a cross-validation. I obtain this error (it must be sth related to df) that I don't understand, any help would be appreciated. cv.lm(df= dat, lm2.52f, m=3) Error en `[.data.frame`(df, , ynam) : undefined columns selected lm2.52f is my lm object, dat is a dataframe where the variables involved in .lm are I tried CVlm
2012 Feb 15
2
assign same legend colors than in the grouped data plot
Dear community, I've plotted data and coloured depending on the factor variable v3. In the legend, I'd like to assign properly the same colors than in the factor (the factor has 5 levels). I've been trying this but it doesn't work. plot(var1, var2, xlab = "var1", ylab = "var2", col =var3 , bty='L') legend(locator(1),c("level 1 var3",
2011 Nov 16
2
outlier identify in qqplot
Dear Community, I want to identify outliers in my data. I don't know how to use identify command in the plots obtained. I've gone through help files and use mahalanobis example for my purpose: NormalMultivarianteComparefunc <- function(x) { Sx <- cov(x) D2 <- mahalanobis(x, colMeans(x), Sx) plot(density(D2, bw=.5), main="Squared Mahalanobis distances, n=nrow(x),
2012 Sep 04
1
predict rpart newdata - introduce only values variables used in the tree
Dear community, I've a tree which included at first 23 variables. Then I've pruned this tree, and there are only 8 variables involved. I'd like to predict and only introduce in newdata the values of these 8 variables involved. However, as the tree was built with the 23, it asked me for 15 values, even if it doesn't need them. Is there a way to introduce only this 8 values?
2012 May 04
1
lme or lmer for unbalance data
Dear community, I'd like to fix a mixed model. I have unbalance data, what should i use: lme in nlme package , or lmer in lme4. Thanks, user at host.com as user at host.com -- View this message in context: http://r.789695.n4.nabble.com/lme-or-lmer-for-unbalance-data-tp4608425.html Sent from the R help mailing list archive at Nabble.com.
2012 Jan 04
1
plot rq lm
Dear Community, I'd like to plot an rq object the same way I do with a lm one, is it possible? Something like this plot(rqmodel , 1:4, id.labels=rownames(pga1)); where rqmodel <- rq(log(vd) ~ v1 + log(v2) +log(v3) + v4 + v5 ,data =dat) Thanks in advance and apologies, I'm pretty newbie with this, user at host.com -- View this message in context:
2012 Feb 29
1
equivalent from gladder and ladder from stata
Dear community, Apologies, I'm still pretty newbie. Anyway, I am performing linar regression analysis. As a common cause of non-normally distributed residuals is non-normally predictor variables, i'm interested in achieving the best transformation of the predictors. I've seen some commands at R, but I would like to know if it exists a command equivalent to gladder (graphic display)
2012 Mar 25
1
Work -Shift Scheduling - Constraint Linear Programming
Dear Community, I've a Work -Shift Scheduling Problem I'd like to solve via constraint linear programming. Maybe something similar to http://support.sas.com/documentation/cdl/en/orcpug/63349/HTML/default/viewer.htm#orcpug_clp_sect037.htm Can anybody suggest me any package/R examples to solve this? If it's needed more details of my little problemm I can provide. Thanks in
2011 Nov 30
1
Replace columns in a data.frame randomly splitted
Dear community, I'm working with the data.frame attached ( http://r.789695.n4.nabble.com/file/n4122926/df1.xls df1.xls ), let's call it df1. I typed: df1<- read.xls("C:/... dir .../df1.xls",colNames= TRUE, rowNames= TRUE) Then I splited randomly df1 using splitdf function (http://gettinggeneticsdone.blogspot.com/2011/03/splitting- dataset-revisited-keeping.html)
2015 Jul 27
2
Error sql en función
Hola: No consigo que la función sqldf () funcione dentro de una función. Alguien puede echarme una mano. En resumen, el problema es que cuando lo ejecuto fuera de una función no tengo ningún problema: ========================== > # install.packages("sqldf") > library(MASS) > library (sqldf) > data(Aids2, package="MASS") > options(digits=3) > table
2010 Jul 22
4
SQL/R
Dear R users, I want to aggregate data in the following way: ### X <- data.frame(u = c("T1","T1","T1","T2"), v=c("a","a","b","a")) X library(sqldf) sqlOut <- sqldf("select count(distinct(v)) from X group by u") sqlOut ### Now I want to get the same result without using SQL. How can I achieve that ?
2015 Jul 27
2
Error sql en función
Hola Carlos: Gracias por responder! Ayer caí en esta página al buscar el problema con google, pero no conseguir entender y implementar lo que sugiere. Sin entender nada, lo que hice fue: ======================== > library(MASS) > library (sqldf) # Per SQL > data(Aids2, package="MASS") > SQL_PROVA = function (XDADES, XWHE) + { + XDADES_SQL = sqldf ("select * from
2010 Mar 22
1
SQL-select using native R methods ?
Hi I have a problem in R that I have been trying to solve but without success. I am trying to join two tables on two variables : an ID and a date (optional) that will be common between the two tables In SQL (and SAS PROC SQL) I am a frequent user of the "select" command and I am used to the following nomenclature : select a.*, b.c, b.y, b.z from table1 a, table2 b where
2007 Sep 07
5
SQL like function?
Hi RUsers, I am wonder if I can search observations whose IDs matches any of the values in another vector, such as in MySQL. While I am learing MySQL for future database management, I appreciate if anyone could give me a hint. Suppose I have one 5*1 vector containing observation IDs and frequencies, and one 3*1 vector containing observation IDs. observation<-c(1,2,3,4,5) ID<-c(1,3,4)
2011 Apr 13
1
Decimals in R/SQL
Hello, When I am writing in sqldf or RSQLite I lose the decimals in my matrix. The only way I can get decimals is by multiplying by 1.00000, etc. I have tried manipulating the options, but it is only effective once I multiply by 1.0000. I appreciate any suggestions! Thanks! Example: z <- sqldf ("select ST, SUM(AGEP*PWGTP)*1.000000000/SUM(PWGTP)*1.00000000000000 as wgtage from ss09
2008 Jul 14
3
Data Manipulations and SQL
Greetings, I am new to R and have some background knowledge about SQL. I'd like to know whether there is a way to manipulate the R datasets (or data frames) using SQL statements. For example, I have two data frames and both of them have a column called "id", then I want to join this two data frames into one. In SQL, we can just simply use the join comment. What should we do in R?
2010 Mar 24
2
translating SQL statements into data.table operations
I've recently stumbled across data.table, Matthew Dowle's package. I'm impressed by the speed of the package in handling operations with large data.frames, but am a bit overwhelmed with the syntax. I'd like to express the SQL statement below using data.table operations rather than sqldf (which was incredibly slow for a small subset of my financial data) or import/export with a
2008 Sep 16
1
help with SQL, how can i use functions in sql (pkg :sqldf)
Een ingesloten tekst met niet-gespecificeerde tekenset is gescrubt ... Naam: niet beschikbaar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080916/2d0f3a45/attachment.pl>
2011 Jun 24
2
SQL Changing Data Type
Passing in two dates to a sql statement (sqldf). Is returning a factor. Tried setting back to a Date via as.Date, but get an error the error: character string is not in a standard unambiguous format. Any thoughts appreciated. Code/Results listed below: > summary(df.possible.combos) Date Hour Min. :2011-03-01 Min. : 0.00 1st Qu.:2011-03-23 1st Qu.: 5.75
2011 Mar 22
2
lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense?
Dear all, I want to improve my adj - R sq. I 've chequed some established models and they introduce two times the same variable, one transformed, and the other not. It also improves my adj - R sq. But, isn't this bad for the collinearity? Do I interpret coefficients as usual? Estimate Std. Error t value Pr(>|t|) (Intercept) 1.73140 7.22477 0.240