Displaying 20 results from an estimated 5000 matches similar to: "How build hist combining data"
2010 Feb 03
3
diagnostic plots
Dear all,
does anybody ever encountered the problem with diagnostic plots?
x<-rnorm(100)
y<-rnorm(100)
plot(lm(x~y))
It gives the following message "Waiting to confirm page change..." and
nothing happens.
Thanks a lot!
[[alternative HTML version deleted]]
2010 Jan 13
4
<= returns wrong result? Why
Dear all,
Does anybody know the probable reason why <= gives false when it should give
true?
These two variables are of the same type, and everything works in the cycle
but then it stops when they are equal.
this is the output result
> Rk[47] <= RB[21]
[1] FALSE
> Rk[47]
[1] 0.002842007
> RB[21]
[1] 0.002842007
Thanks a lot.
[[alternative HTML version deleted]]
2010 Jul 09
3
strange floor rounding
Dear all,
might seem and easy question but I cannot figure it out.
floor(100*(.58))
[1] 57
where is the trick here? And how can I end up with the right answer?
Thanks a lot everybody for your help.
Trafim
[[alternative HTML version deleted]]
2010 Jul 14
4
reverse string
Dear all,
Are there any functions in R to reverse the order of the string.
smth like reverse("abc") to get "cba"?
Thanks a lot.
[[alternative HTML version deleted]]
2010 Jan 14
3
plot type any symbols?
Dear all,
I have a question is there a possibility to plot points with different
symbols like stars, crosses?
I looked at different types for plot command and didn't find anything like
that.
Thanks a lot.
[[alternative HTML version deleted]]
2012 Dec 15
3
Cannot build custom locale with utf-8 charset
I am trying, without success, to compile a custom locale for the utf-8
character set. I have issued this command:
localedef --no-archive -f UTF-8 -i
/usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8
which produces the requisite files without reporting an error but
which none-the-less insists on using the iso-8859-1 charset:
LC_ALL=en_CA at yyyy-mm-dd locale charmap
2010 Jan 07
2
Graph titles from massive
Dear all,
I would like to ask you if there is a possibility in R to give the names to
graphs which are not const.
For example,
How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle
x<-c(1,2,3,4,5,6)
y<-c(7,8,9,10,11,12)
par(mfrow=c(2,3))
for (i in 1:6){
plot(x,y)
}
Thank you for your time and help!
[[alternative HTML version deleted]]
2010 Sep 09
1
createDataPartition
Dear all,
does anyone know how to define the structure of the required samples using
function createDataPartition, meaning proportions of different types of
variable in the partition?
Smth like this for iris data:
createDataPartition(y = c(setosa = .5, virginica = .3, versicolor = .2),
times = 10, p = .7, list = FALSE)
Thanks a lot for your help.
Regards,
Trafim
[[alternative HTML version
2010 Feb 05
3
Extract p-value from lm for the whole model
Dear all,
I would like to ask how to extract the p-value for the whole model from
summary(lm).
This didn't help a lot summary.lm
summary(lm(speed~dist, cars))
Thanks a lot!
[[alternative HTML version deleted]]
2011 May 15
1
Find String Between Characters
Dear R Helpers,
I am trying to isolate a set of characters between two other characters in
a long string file. I tried some of the examples on the R help pages and
elsewhere, but I am not able to get it. Your help would be much
appreciated.
require(scrapeR)
2009 Jun 10
1
Weird behavior in receive_data function
Dear List,
I'm trying to get diff/removed data and it's offset out. So I write a
functions in receive_data. When I run backup, I found there is a weird
behavior which I don't understand.
i = recv_token(f_in, &data) will receive (i = -1, offset2 = 0) some
where in the middle of the transfer procedure. That's to say, it's going
to transfer the first data block from sender,
2007 Jun 21
1
[LLVMdev] A question about LLVM assembly
Hello, LLVM guys.
I've tried to emit the following simple function to LLVM assmbly.
---------------------------------------------------------
void test(long s, double* a) {
char h = ttt(s);
*a = s;
mmm();
}
---------------------------------------------------------
It's spat out as follows:
---------------------------------------------------------
void %test(int %s, double* %a) {
2004 Mar 25
1
factor based on pattern match ?
Hello,
is't possible to specify pattern in levels ?
> y=c("ff","f","m","mm","fm","mf","ffm","mmf","mmm","fff");
> factor(y)
[1] ff f m mm fm mf ffm mmf mmm fff
Levels: f ff fff ffm fm m mf mm mmf mmm
I want to specify levels using regexp ("f.*","m.*") or use
2011 Apr 12
2
Assign Character Value to Data Frame
Dear R Helpers,
I am trying to write a character value to the row of a data frame and am
running into a problem that I don't have when I do this for numeric
arguments. For example, the following works just fine:
> test<-data.frame(number=numeric(1))
> test[1,]<-.5
> test
number
1 0.5
But the following bombs out:
> hold<-data.frame(symbol=character(1))
>
2001 Jul 02
1
margin.table
Hello all,
I was wondering if the following behaviour of margin.table in R 1.3.0 is normal.
> mm <- data.frame(x=c(0,0,1), y=c(1,1,0), z=c(0,1,0))
> margin.table(mm,1)
[1] 1 2 3
<0 rows> (or 0-length row.names)
while using 'apply(x,margin,sum)' I get
> apply(mm,1,sum)
1 2 3
1 2 1
which appears to be normal. Similar behaviour when margin=2.
On the other hand, the
2007 Dec 13
6
spliting strings ...
Hi everyone,
I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this:
str <- c('aaa bbb', 'cc', 'd eee aa', 'mmm o n')
str1 <- rep(1, length(str))
for (i in 1:length(str)) {
str1[i] <- strsplit(str, "
2012 Feb 09
1
Apply pmax to dataframe with different args based on dataframe factor
# I have a dataframe in the following form:
track <- c(rep('A', 3), rep('B', 4), rep('C', 4))
value <- c(0.15, 0.25, 0.35, 0.05, 0.99, 0.32, 0.13, 0.80, 0.75, 0.60, 0.44)
df <- data.frame(track=factor(track), value=value)
#> print(df)
#track value
#1 A 0.15
#2 A 0.25
#3 A 0.35
#4 B 0.05
#5 B 0.99
#6 B 0.32
#7 B 0.13
2012 Jan 27
3
Grabbing Column and Row titles
Please use dput() to post your example matrix.
Rambler1 wrote
>
> I have run into a problem in my code. What I want to accomplish is this:
> I have a user input stock symbols into a list and from there I run the
> quantmod package to get historical data. I compute the correlation matrix
> and then turn that matrix into a simple matrix with 1's or 0's depending
> on
2009 Dec 02
2
Histogram probabilities >1 ????!!!
Hi everybody,
well, I definitely don't understand anything.
Why the hist function with freq=FALSE gives such a strange result???
R <- c(-1.10, 0.79, -1.17, -0.53, -0.26, -0.22, 0.29, -0.26, -0.26, 0.39)
hist(R, freq=FALSE, breaks=10)
Thanks everybody
[[alternative HTML version deleted]]
2009 Dec 09
1
Bootstrapping in R
Dear all,
I have some error trying to bootstrap from a matrix. The error message is
"Error in sample(n, n * R, replace = TRUE) : element 2 is empty;
the part of the args list of '*' being evaluated was: (n, R)"
vv <- c(0.5,3.2,5.4,1.1,1.4,1.2,2.3,2.0)
Reg <- matrix(data=vv, nrow = 4, ncol = 2)
bootcoeff <- function(x){
coefficients(lm(x[,1]~x[,2]))[2]+1
}