similar to: sqldf syntax, selecting rows, and skipping

Displaying 20 results from an estimated 800 matches similar to: "sqldf syntax, selecting rows, and skipping"

2012 Jan 06
1
ggplot using scale_x_date gives Error in seq.int(r1$year, to$year, by)
Dear all, ggplot gives me an error when trying to plot time series data using a date variable as the x axis. g<-structure(list(Date = c("2011-12-23", "2011-12-30", "2012-01-06", "2011-12-23", "2011-12-30", "2012-01-06", "2011-12-23", "2011-12-30", "2012-01-06"), variable = structure(c(1L, 1L, 1L, 2L, 2L,
2011 Apr 05
2
Precision of summary() when summarizing variables in a data frame
Hi, I summary() a variable with 409908 numeric observations. The variable is part of a data.frame. The problem is that the min and max returned by summary() do not equal the ones returned by min() and max(). Does anybody know why that is? > min(data$vc) [1] 15452 > max(data$vc) [1] 316148 > summary(data$vc) Min. 1st Qu. Median Mean 3rd Qu. Max. 15450 21670 40980
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)
2010 Aug 27
3
Sorting groups in bwplot chart
Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example: d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10)); colnames(d) <- c("Month", "Value"); bwplot(d$Month ~ d$Value); as you can see Months are not sorted alphabetically. Does anybody know ho to sort those on the chart level? Thank you Jan
2011 Mar 09
2
system(..., invisible=FALSE, show.output.on.console=FALSE) in Windows 7
Hello, I work for a company in which a number of employees use R. Many of them like to run executables via the system function in such a way that the output of that executable is displayed in a separate window. To give an example of the behavior they require, the following command can be run in R GUI: system("cmd",invisible=FALSE,show.output.on.console=FALSE) The result is that a
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
Bill, I have clarified this on SO, and I will copy that clarification in here: "Sure, we tested them on other 8-digit numbers as well & we could not replicate. However, these are honest-to-goodness numbers generated by a non-adversarial system that has no conception of these numbers being used for anything other than a unique key for an entity -- these are not a specially constructed
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All I have a problem with the height of the boxes in the key in the following. (The text is over 2 lines to accentuate the problem of no space between the rectangles.) Is there an easy way to put a space between the rectangles; size controls the width but there appears to be nothing for the height? xyplot(1~1, key = list(corner = c(0.8,0.8),
2011 Jun 30
2
error building package: packaging into .tar.gz failed
I am trying to build a package using windows xp. Here is the error I am getting: R CMD build myfunctions * checking for file 'myfunctions/DESCRIPTION' ... OK * preparing 'myfunctions': * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and make files * checking for empty or unneeded directories * building 'myfunctions_1.0.tar.gz'
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
Bill, Appreciate the point that both you and Serguei are making, but the sequence in question is not a selected or filtered set. These are values as observed in a sequence from a mechanism described below. The probabilities required to generate this exact sequence in the wild seem staggering to me. T On Fri, Nov 3, 2017 at 11:27 PM, William Dunlap <wdunlap at tibco.com> wrote: >
2017 Nov 03
5
Extreme bunching of random values from runif with Mersenne-Twister seed
This is cross-posted from SO (https://stackoverflow.com/q/47079702/1414455), but I now feel that this needs someone from R-Devel to help understand why this is happening. We are facing a weird situation in our code when using R's [`runif`][1] and setting seed with `set.seed` with the `kind = NULL` option (which resolves, unless I am mistaken, to `kind = "default"`; the default being
2017 Nov 03
0
Extreme bunching of random values from runif with Mersenne-Twister seed
The random numbers in a stream initialized with one seed should have about the desired distribution. You don't win by changing the seed all the time. Your seeds caused the first numbers of a bunch of streams to be about the same, but the second and subsequent entries in each stream do look uniformly distributed. You didn't say what your 'upstream process' was, but it is easy to
2010 Mar 01
2
Thougt I understood factors but??
Hi, consider the following > a<-gl(3,3,9) > a [1] 1 1 1 2 2 2 3 3 3 Levels: 1 2 3 > levels(a)<-3:1 > a [1] 3 3 3 2 2 2 1 1 1 Levels: 3 2 1 > a<-gl(3,3,9) > factor(a,levels=3:1) [1] 1 1 1 2 2 2 3 3 3 Levels: 3 2 1 It is probably something obvious I missed, but reading the documentation of factor, and levels I would have thought that both should produce the same output as
2017 Nov 03
0
Extreme bunching of random values from runif with Mersenne-Twister seed
Another other generator is subject to the same problem with the same probabilitiy. > Filter(function(s){set.seed(s, kind="Knuth-TAOCP-2002");runif(1,17,26)>25.99}, 1:10000) [1] 280 415 826 1372 2224 2544 3270 3594 3809 4116 4236 5018 5692 7043 7212 7364 7747 9256 9491 9568 9886 Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Nov 3, 2017 at 10:31 AM, Tirthankar
2017 Nov 05
0
Extreme bunching of random values from runif with Mersenne-Twister seed
Tirthankar, "random number generators" do not produce random numbers. Any given generator produces a fixed sequence of numbers that appear to meet various tests of randomness. By picking a seed you enter that sequence in a particular place and subsequent numbers in the sequence appear to be unrelated. There are no guarantees that if YOU pick a SET of seeds they won't produce
2011 Jul 04
1
forecast: bias in sampling from seasonal Arima model?
Dear all, I stumbled upon what appears to be a troublesome issue when sampling from an ARIMA model (from Rob Hyndman's excellent 'forecast' package) that contains a seasonal AR component. Here's how to reproduce the issue. (I'm using R 2.9.2 with forecast 2.19; see sessionInfo() below). First some data: > x <- c( 0.132475, 0.143119, 0.108104, 0.247291, 0.029510,
2011 Mar 29
2
How to regress data into coefficients for a gamma function
Hello, I need to regress data like the example below. The data points represent friction factors derived from observed trip length data. The function used to describe this data is a gamma function of the form, f(t) = a * t^b * e^(c*t) and I need to regress the data to obtain the a,b, and c coefficients. The gamma function can also be expressed in the log-linear form, ln[f(t)] = ln[a] + b
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 :