Displaying 20 results from an estimated 2917 matches for "0.2".
Did you mean:
0.0
2010 Jul 08
3
Error in which()
Hi all,
I'm trying to filter data into respective numbers. For example, if the
data ranges from 0 to <0.1, group the data. And so on for the rest of
the data.
There are inconsistencies in the output. For example, b1[[3]] lumps all
the 0.2s and 0.3s together while 0.6s are not in the output.
Running the function - table(f1) - shows that each of the
components/numbers has x number of
2007 Sep 03
3
When 1+2 != 3 (PR#9895)
Full_Name: Marco Vicentini, University of Verona
Version: 2.4.1 & 2.5.1
OS: OsX & WinXP
Submission from: (NULL) (157.27.253.46)
When I proceed to test the following equation 1 + 2 == 3, I obviously obtain the
value TRUE. But when I tryed to do the same using real number (i.e. 0.1 + 0.2 ==
0.3) I obtained an unusual FALSE.
In the online help there are some tricks for this problem. It
2008 Nov 14
1
Generating unique permutations of a vector
Hi all,
I try to generate sets of strategies that contain probability
distributions for a defined number of elements, e.g. imagine an
animal that can produce 5 different types of offspring and I want to
figure out which percentage of each type it should produce in order to
maximize its fitness. In order to do so, I need to calculate the fitness
for all potential strategies. As an example, if I
2008 Dec 21
2
data format issue
Dear all-
I have a dataset (see a sample below - but the whole dataset is June
2005 - June 2008). The "LST" format is "YYMMDDHHmm" and I would like to
get the hourly average of the "mph" for the summer months (spanning all
years). I have been trying to use "aggregate" but am not having much
success at all! any thoughts would be greatly appreciated.
2010 Feb 04
1
for loop with if statment problem
Both of the approx functions work correctly individually, but they are
not being distinguished in the for loop by the if statments. Any help
would be appreciated. for loop of interest is below
x <- (structure(list(Site = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L,
2005 Apr 27
4
How to add some of data in the first place dataset
Dear R-help,
First I apologize if my question is quite simple.
I need add some of data in the first place my dataset, how can I do that.
I have tried with rbind, but I did not succes.
0.1 3.6 0.4 0.9 rose
4.1 4.0 1.2 1.2 rose
4.4 3.2 1.9 0.5 rose
4.6 1.1 1.1 0.2 rose
For example,
2008 Oct 13
2
split data, but ensure each level of the factor is represented
Hello,
I'll use part of the iris dataset for an example of what I want to
do.
> data(iris)
> iris<-iris[1:10,1:4]
> iris
Sepal.Length Sepal.Width Petal.Length Petal.Width
1 5.1 3.5 1.4 0.2
2 4.9 3.0 1.4 0.2
3 4.7 3.2 1.3 0.2
4 4.6 3.1 1.5
2004 Aug 11
0
always NaN after some running in R, but all fine in S-plus
Hello, S-plus and R helpers,(sorry for cross-post)
I wrote some simple C code for one likelihood to be optimized (using
optim(MASS)). I use same function, same data, same starting points and same
DLL in R and S-plus for comparison. (I compiled it with 'Rcmd SHLIB
likelihood.c' and the header files of it include only R.h and math.h). While
it works quite fine in S-plus, it forever returns
2012 Jul 06
3
estimating NA values against selected slots
Dear R Users,
Could you please help me on the following issue?
I have a real large yearly data set. For each year I have
365 flow values. Some of the flow values are not known and that’s why you will
see NA written in those slots. I wanted to know, is there a way that I can
estimate those values? I tried approx command but it seems least helpful for
the kind of issue I am up against.
2007 Nov 07
1
Aggregate with non-scalar function
R-Helpers,
I'm sorry to have to ask this -- I've not used R very much in the last
8 or 10 months, and I've gotten rusty.
I have the following (ff2 is a subset of a much, much larger dataset):
> ff2
hostName user sys idle obsTime
10142 fred 0.4 0.5 98.0 2007-11-01 02:02:18
16886 barney 0.5 0.2 94.6 2007-10-25 19:12:12
8795 fred 0.0 0.1 99.8
2012 Jul 02
4
how to do a graph with tree different colors??
hi
i try to do a graph of a time series which shows in red the values > -0.05,
in blue the values >0.05 and in white the values between -0.05 and 0.05
for un exemple :http://www.appinsys.com/globalwarming/enso.htm
thanks !!!!!
denisse
--
View this message in context: http://r.789695.n4.nabble.com/how-to-do-a-graph-with-tree-different-colors-tp4635206.html
Sent from the R help mailing
2007 Oct 22
2
Help interpreting output of Rprof
Hello there,
I am not quite sure how to interpret the output of Rprof (in the following the output I was staring at). I was poking around the web a little bit for documentation but without much success. I guess if I want to figure out what takes so long in my code the 2nd table $by.total and the total.pct column (pct = percent) is the most helpful. What does it mean that [ or [.data.frame is
2009 Sep 09
1
change character to factor in data frame
Dear all
I have a simple problem which I thought is easy to solve but what I tried
did not work. I want to change character variables to factor in data
frame. It goes easily from factor to character, but I am stuck in how to
do backwards conversion.
Here is an example
irisf<-iris
irisf[,2]<-factor(irisf[,2]) # create second factor
str(irisf)
'data.frame': 150 obs. of 5
2011 Nov 15
5
Convert back to lower triangular matrix
Given a vector;> ab = seq(0.5,1, by=0.1)> ab[1] 0.5 0.6 0.7 0.8 0.9 1.0
The euclidean distance between the vector elements is given by the lower triangular matrix > dd1 = dist(ab,"euclidean")> dd1 1 2 3 4 52 0.1 3 0.2 0.1 4 0.3 0.2 0.1 5 0.4 0.3 0.2 0.1 6 0.5 0.4 0.3 0.2 0.1
Convert the lower triangular matrix to a full
2013 Apr 16
1
avoid losing data.frame attributes on cbind()
Dear all,
How should I add several variables to a data frame without losing the
attributes of the df? Consider the following:
> require(Hmisc)
> Xa <- iris
> label(Xa, self=T) <- "Some df label"
> str(Xa)
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
$ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi,
I'm looking the best way to fill irregular polygons with patterns,
Something like the function grid.pattern do, but my case is with
irregular polygons.
Whit this script I can get it, but I'm looking for an "elegant" solution..
library(grid)
grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2),
y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7),
gp=gpar(fill="grey",
2004 Sep 30
2
pointsize in png graphics
Dear all,
I'm trying to produce 2 png files, one consisting of an image plot and a
color-table (also an image plot) and the other one consisting of 4 image
plots and a color table. I'd like the color table to be exactly the same.
The way I proceded is the following:
for one plot and the color-table
png(file = png.file, width = 650, height = 800, pointsize = 16)
layout(matrix(c(1, 2),
2009 Oct 17
1
Easy way to `iris[,-"Petal.Length"]' subsetting?
Dear all
What is the easy way to drop a variable by using its name (and not its
number)? Example:
> data(iris)
> head(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1
2012 Jul 10
2
estimation of NA by predict command
Dear arun and all R users,
I will first of all try to simply define my issue..
I have data in the following format
Year Discharge
dd/mm/yyyy x
.. …
… …
There are some NA values in the discharge which I would like to predict by using “predict command”. I cant figure out the way to write the coding for that. Could you please help me on that???
I have also ,written
2003 Oct 28
2
outer function problems
I'm pulling my hair (and there's not much left!) on this one. Basically I'm
not getting the same result t when I "step" through the program and evaluate
each element separately than when I use the outer() function in the
FindLikelihood() function below.
Here's the functions:
Dk<- function(xk,A,B)
{
n0 *(A*exp(-0.5*(xk/w)^2) + B)
}
FindLikelihood <-