Displaying 20 results from an estimated 12000 matches similar to: "(no subject)"
2003 Apr 04
2
Bug in %in% (match)
Hi,
Am I hitting some limit in match? Consider the following example:
> tst<-seq(100,125,by=.2)%in%seq(0,800,by=.1)
> sum(tst)
[1] 76
> seq(100,125,by=.2)
[1] 100.0 100.2 100.4 100.6 100.8 101.0 101.2 101.4 101.6 101.8 102.0
102.2
[13] 102.4 102.6 102.8 103.0 103.2 103.4 103.6 103.8 104.0 104.2 104.4
104.6
[25] 104.8 105.0 105.2 105.4 105.6 105.8 106.0 106.2 106.4 106.6 106.8
2003 Apr 04
2
Bug in %in% (match)
Hi,
Am I hitting some limit in match? Consider the following example:
> tst<-seq(100,125,by=.2)%in%seq(0,800,by=.1)
> sum(tst)
[1] 76
> seq(100,125,by=.2)
[1] 100.0 100.2 100.4 100.6 100.8 101.0 101.2 101.4 101.6 101.8 102.0
102.2
[13] 102.4 102.6 102.8 103.0 103.2 103.4 103.6 103.8 104.0 104.2 104.4
104.6
[25] 104.8 105.0 105.2 105.4 105.6 105.8 106.0 106.2 106.4 106.6 106.8
2011 Jul 09
3
Using str() in a function.
Using str() in a function.
I am in the early phase of learning R, and I find I spend a lot of time
trying to figure out what is actually in objects I have created or read in
from a file. I'm trying to make a simple little function to display a
couple of things about a object, let's say the summary() and the str(),
sequentially, preferably without a bunch of surplus lines between them. I
2002 May 14
2
quantile() and boxplot.stats()
Hello,
I faced something I can't understand. When I use boxplot.stats(1:10) and
quantiles(1:10) the results are different for 25% and 75%:
> boxplot.stats(1:10)
$stats
[1] 1.0 3.0 5.5 8.0 10.0
> quantile(1:10)
0% 25% 50% 75% 100%
1.00 3.25 5.50 7.75 10.00
Actually, I expected the value 3 for 25% and 8 for 75% as results of
quantile(1:10). Can you please explain me
1998 Apr 07
3
R-beta: spline problems(?)
Hi,
I am a total beginner with this whole thing so please have patience!
I am trying to run an S-plus program with a certain line:
spline(1:nrow(y), y[,1],n=100);
This crashes with:
Error: NAs in foreign function call (arg 8)
Apparently, this is caused by the last command of spline:
u <- seq(xmin, xmax, length.out = n)
.C("spline_eval", z$method, length(u), x = u, y =
2002 Feb 28
3
Use of results in summary
Dear R Community,
When making a summary with a vector, the result is "numeric" and I can
recall its components (like median, mean, etc.) for further use.
However, if I use summary with a matrix, the result is of mode
"character" (like "Median : 1.2127") and I cannot extract the results
for direct further use.
Thanks for any hints,
Patrick
-------------- next part
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
SUMMARY:
Specific problem: I'm regridding biomass-burning emissions from a
global/unprojected inventory to a regional projection (LCC over North
America). I need to have boundaries for Canada, Mexico, and US
(including US states), but also Caribbean and Atlantic nations
(notably the Bahamas). I would also like to add Canadian provinces and
Mexican states. How to put these together?
General
2006 Aug 11
1
x tick labels - sparse?
Hi,
I'm stuck on creating a plot with x tick labels for every Nth tick
mark - how is that done? I don't see a simple solution to this in
help(plot) or help(par) and what I've tried is not working, eg, the
following does not work, although it seems intuitive to me that it
should work:
x <- seq(-100,1000,25)
y <- x * x
% find all the x values that are multiples of 100
tmp <-
1998 Feb 12
1
R-beta: Quantile function
Is the following behaviour of the quantile function what one would expect?
> a <- 1:100
> quantile(a,.6)
60%
60.4
Philippe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the
2012 Nov 23
6
Summary statistics for matrix columns
Hi,
is there a way I can calculate a summary statistics for a columns matrix
let say we have this matrix
x <- matrix(sample(1:8000),nrow=100)
colnames(x)<- paste("Col",1:ncol(x),sep="")
if I used summary
summary(x)
i get the output for each column but I need the output to be in matrix with
rownames and all the columns beside it
this how I want it
2002 Aug 09
0
summary.data.frame with compound elements problem (PR#1891)
Full_Name: Barry Rowlingson
Version: 1.5.0
OS: x86 linux
Submission from: (NULL) (130.95.16.114)
Elements of a dataframe may be a matrix or another dataframe. In
this case the summary() method can do bad things:
> x <- data.frame(1:10)
> x$z <- data.frame(x=1:10,y=1:10)
> summary(x)
X1.10 z
Min. : 1.00 NULL:Min. : 1.00
1st Qu.: 3.25
2000 Feb 15
1
Help with for
I haven't been able to solve two issues, really appreciate any help.
Q1. Why this one goes like that? (could it be a bug?):
What I want:
> J_c(1,2,3)
> MA_NA
> MA[1]_min(J[1:2])
> MA[2]_min(J[2:3])
> MA
[1] 1 2
Good, so now lets do it a little more faster (since the real vectors have
over 15000 obs):
> for (i in 1:2) MA[i]_min(J[i:i+1])
> MA
[1] 2 3
It does the same
2006 Dec 14
5
Nicely formatted tables
If I use latex(summary(X)) where X is a data frame with four
variables I get something like
Rainfall Education Popden Nonwhite
Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80
1st Qu.:32.75 1st Qu.:10.40 1st Qu.:3104 1st Qu.: 4.95
Median :38.00 Median :11.05 Median :3567 Median :10.40
Mean :37.37 Mean :10.97 Mean :3866
2008 Mar 17
1
summary of summaries
Hi,
I have a few hundreds files with numerical information of different length
but with the same column structure. I use the following code to get summary
statistics
fplist <- list.files(pattern=".*analysis")
for (fp in fplist){
x2 <- read.delim(fp)
summary(x2)
}
Summary gives something like:
summary (x2)
V1 V2
2009 Nov 04
2
error in install.packages() (PR#14042)
Full_Name: Michael Spiegel
Version: 2.10
OS: Windows Vista
Submission from: (NULL) (76.104.24.156)
The following error is produced when attempting to call install.packages. Here
is the results of the traceback:
> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
Error in f(res) : invalid subscript type 'list'
> traceback()
7: f(res)
6: available.packages(contriburl =
2012 Sep 26
1
how to know where you've been sourced from
Hello All,
I need a script to perform different actions depending on the file from
which it was source()'d. Thus, my script needs a way to figure out from
whence it was sourced.
There seems to be some relevant information in sys.calls() (see below).
However, I need to get at the name of the file that directly source the
file in question. That is, just one level above. For example, in the
2012 Nov 29
2
Deleting certain observations (and their imprint?)
I'm manipulating a large dataset and need to eliminate some observations based on specific identifiers. This isn't a problem in and of itself (using which.. or subset..) but an imprint of the deleted observations seem to remain, even though they have 0 observations. This is causing me problems later on. I'll use the dataset warpbreaks to illustrate, I apologize if this isn't in
2020 Sep 21
2
Help with the Error Message in R "Error in 1:nchid : result would be too long a vector"
Hello everyone,
I am using *mlogit* to analyse my choice experiment data. I have *3
alternatives* for each individual and for each individual I have *9
questions*. I have a response from *516 individuals*. So it is a panel of
9*516 observations. I have arranged the data in long format (it contains
100 columns indicating different variables and identifiers).
In mlogit I tried the following
2007 Jan 19
1
hiccup in apply?
Hello, I don't understand the behavior of apply() on the data frame below.
test <-
structure(list(Date = structure(c(13361, 13361, 13361, 13361,
13361, 13361, 13361, 13361, 13362, 13362, 13362, 13362, 13362,
13362, 13362, 13362, 13363, 13363, 13363, 13363, 13363, 13363,
13363, 13363, 13364, 13364, 13364, 13364, 13364, 13364, 13364,
13364, 13365, 13365, 13365, 13365, 13365, 13365, 13365,
2011 Sep 09
2
get and save
I have a data frame 'tmp' and a vector 'name' containing 'd2'.
I want to save 'tmp' under the name hidden in 'name', and the file must have
the same name, plus the extension '.rda'.
So I try
> tmp
x y
1 1 3
2 2 4
> name
[1] "d2"
> assign(name, tmp)
> summary(get(name))
x y
Min. :1.00 Min. :3.00
1st