Displaying 20 results from an estimated 3000 matches similar to: "Problem with data type recognition and conversion"
2009 Jan 09
3
Programming Question (setting ylim generally)
library(StreamMetabolism)
day <- (structure(c(10.08, 10.08, 10.05, 10.03, 10, 9.98, 9.96, 9.95,
9.95, 9.96, 9.96, 9.98, 10.01, 10.05, 10.06, 10.09, 10.11, 10.11,
10.13, 10.13, 10.15, 10.15, 10.13, 10.14, 10.11, 10.13, 10.14,
10.13, 10.12, 10.13, 10.14, 10.16, 10.18, 10.19, 10.23, 10.27,
10.33, 10.37, 10.45, 10.57, 10.6, 10.66, 10.73, 10.77, 10.84,
10.86, 10.87, 10.94, 10.98, 11.01, 11.05,
2010 Jan 04
1
log-normal overlay
Hello,
Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello,
Using the following lines of code, I created the following graph:
2010 Oct 04
3
Loop too slow for Bid calc - BUT cannot figure out how to do with matrix
Hi,
I am trying to create Bid/Ask for each second from a high volume stock and
the only way I have been able to solve this is using loops to create the
target matrix from the source tick data matrix. Looping is too slow and
not practical to use on multiple stocks. For example:
Bids Matrix (a real one is 400,000++ length):
Bid Time
10.03 11:05:03.124
10.04 11:05:03.348
10.05
2010 Feb 18
0
2 ecdf from different set of data
Hi r-users,
I have 2 sets of data and I would like to superimpose this cumulative density in one graph.
I know how to put the 2 graphs in one same graph but my problem is the data are different.
> z[1:20]
[1] 2.02347388 3.19514379 0.05188875 1.41333812 3.50249892 4.34272676 6.65639581 5.01533819 4.18207505
[10] 2.87615551 2.28202152 0.49431541 0.06570579 5.68352438
2013 Oct 16
7
Is there something wrong with R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"?
Hi,
pnorm(-1.53,0,1) under version 3.0.2 gives 0.05155075. I am pretty sure it
should be 0.063. Is there something wrong with this version of R?
I am using:
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)
--
Tom
[[alternative HTML version deleted]]
2008 May 09
1
Which gls models to use?
Hi,
I need to correct for ar(1) behavior of my residuals of my model. I noticed
that there are multiple gls models in R. I am wondering if anyone
has experience in choosing between gls models. For example, how
should one decide whether to use lm.gls in MASS, or gls in nlme for
correcting ar(1)? Does anyone have a preference? Any advice is appreciated!
Thanks,
--
Tom
[[alternative HTML
2008 Apr 29
2
function to generate weights for lm?
Hi,
I would like to use a weighted lm model to reduce heteroscendasticity. I am
wondering if the only way to generate the weights in R is through the
laborious process of trial and error by hand. Does anyone know if R has a
function that would automatically generate the weights need for lm?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2007 Dec 31
3
stack charts right on top of each other
Hi,
I tried to stack two charts on top of each other using the following
R functions:
par(mfrow=c(2,1))
plot(rnorm(1:3),xaxt="n",xlab="")
plot(rnorm(1:3))
This created two charts, one on top of the other, but there is too much
space between them. Does anyone know how to elimiate the space in between
the charts?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2006 Oct 21
2
how do I find the row index number, or row name, of a given value in a vector?
Hi,
I noticed that max(x) returns the maximum value of a vector, but the
function doesn't give the user the option of retrieving the row index number
instead. If I used max(x) to find the maximum value of vector x, then is
there a function I can use to find the index number, or row name, of the
maximum value?
Thanks,
Tom
[[alternative HTML version deleted]]
2007 Dec 01
2
R function for percentrank
Hi,
Does anyone know if R has a built-in function that is equvalent to Excel's
percentrank, i.e., returns the rank of a value in a data set as a percentage
of the data set?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2008 Mar 09
2
format numbers into percentages
Hi,
I am currently using the following to formate numbers into percentages:
x=0.00112
paste(round(x*100,2),"%",sep="")
I am wondering if there is a built in R function that does the same. Does
anyone know?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2008 Jan 04
2
question about scale() function
Hi,
The documentation for scale() states:"If center is TRUE then centering is
done by subtracting the column means (omitting NAs) of x from their
corresponding columns". But it seems that R is subtracting something else
instead of the column mean:
> x=c(2,4,3,4,5)
> mean(x)
[1] 3.6
> x-mean(x)
[1] -1.6 0.4 -0.6 0.4 1.4
> scale(x)
[,1]
[1,] -1.4032928
[2,]
2012 Oct 12
1
Problem with which function
Hej,
i need the which() funktion to find the positions of an entry in a matrix.
the entries i'm looking for are : seq(begin,end,0.01) and there are no
empty spaces
i'm searching in the right range.
so i was looking for the results R can find and i recieved this answer.
for (l in
2006 Oct 19
2
use date as x-axis
Hi,
I have the following data in two columns. The first column is the date, the
second is data.
Date Data
3-Jan-95 459.21
4-Jan-95 459.13
5-Jan-95 460.73
6-Jan-95 460.38
9-Jan-95 460.67
10-Jan-95 460.9
11-Jan-95 461.68
12-Jan-95 461.64
13-Jan-95 461.64
16-Jan-95 465.97
17-Jan-95 469.38
18-Jan-95 470.05
19-Jan-95 469.72
20-Jan-95 466.95
23-Jan-95 464.78
24-Jan-95 465.81
25-Jan-95 465.86
I would
2017 Oct 13
0
How to define proper breaks in RFM analysis
Hi
Your statement about attaching data is problematic. We cannot do much with it. Instead use output from dput(yourdata) to show us what exactly your data look like.
We also do not know how do you want to split your data. It would be nice if you can show also what should be the bins with respective data. Unless you provide this information you probably would not get any sensible answer.
Cheers
2008 May 07
2
cross-correlation lag.plot?
Hi,
Does anyone know if R has a function that is similar to lag.plot but instead
of auto-correlation, it plots cross-correlation with lags?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2008 Apr 07
2
How to add background color of a 2D chart by quadrant
Hi,
I have a 2D chart that is divided into four quadrants, I, II, III, IV:
plot(1:10,ylim=c(0,10),xlim=c(0,10),type="n")
abline(v=5,h=5)
text(x=c(7.5,7.5,2.5,2.5),y=c(2.5,7.5,7.5,2.5),labels=c("I","II","III","IV"))
I would like to fill each quadrant with a background color unique to the
quadrant. Does anyone know how to do this in R?
Thanks,
--
2008 Jan 23
3
How to do more advanced cross tabulation in R?
Hi,
I am trying to reproduce some functionalities of Excel pivot table in R,
sadly, I couldn't figure out how to do it. I am wondering if this is even
possible in R. Does anyone know?
Here is an example:
year=rep(2003,16)
quarter=rep(1:4,each=4)
sales=1:16
company=rep(c("a","b","c","d"),4)
df=data.frame(year,quarter,sales,company) #this is the
2007 Apr 12
2
Construct time series objects from raw data stored in csv files
Hi,
I have time series data stored in csv files (see below for an example of the
data). I understand that in order to analyze my data in R, I need to first
transform it into a ts object. Howeve, I could not find an example on how
exactly to do that. Is ts the only function I need? What are the steps that
I need to go through to build a time series object from raw data like this?
Thanks,
Tom