Displaying 20 results from an estimated 300 matches similar to: "problem in reading data"
2008 Nov 06
3
How to manipulate the time data without the date?
Hi,all
I only got the time data such as:
tms<-c("19:30:23","18:39:10".....)
I want to manipulate this time series data. For example, plus one second(or
minute) or minus one second
This data only has the time(h:m:s), without the date. I know that there are
chron package, ISOPix class and the timeDate class, but all these class need
the input of date.
How can we
2008 Nov 18
2
error in function: nls (urgent)
Hi,all:
I am running a nonlinear regression and there is a problem.
There is a data frame: data
p s x t
1 875.0 12392.5 11600 0.06967213
2 615.0 12332.5 12000 0.06967213
3 595.0 12332.5 12000 0.06967213
4 592.5 12337.0 12000 0.06967213
5 650.0 12430.0 12000 0.06967213
6 715.0 12477.5 12000 0.06967213
.
.
.
.
str(data):
'data.frame': 234 obs. of 4 variables:
2009 Mar 19
2
find the index of the smallest or biggest number in a vetor or data.frame
Dear R experts,
How to find out the index of minimum or maxmum number in a vetor or
data.frame?
For example,
a=
n price
1 50
-2 100
0 200
-1 300
......
I want to find out the row which the n is the smallest or largestest and
extract the price.
Thanks
Ted
--
View this message in context:
2009 Feb 23
3
Help in writing my own function
Dear all
I am very intersted in writing my own function to deal with some complicated
task, but I don't know how to start. I can't find detial material with
examples teaching me how to write my own functions. Can anyone help me and
recommend me some learning material?
Many Thanks
Ted
--
View this message in context:
2009 Mar 12
3
batch process file in R
Dear R experts,
I have a folder names "200209" and in this folder there are many data files,
such as:
"BA020902.txt","BA020903.txt","BA020904.txt",
"BA020905.txt","BA020906.txt","BA020909.txt",
"BA020910.txt","BA020911.txt","BA020912.txt",
2008 Nov 11
2
Manipulation in timeSeries object:how to use the function "applySeries" by daily?
Hi all
I have some tick-by-tick data and I have calculated the intraday returns. I
want to sum up the intraday squared returns to calculate the daily
volatility(or daily variance). I know that the s-plus FinMerics has the
function aggregateSeries function that can be apply to daily data:
aggregateSeries(x, Fun, by="daily"), but the counterpart function in
R:applySeries can not be apply
2008 Nov 24
6
optimization problem
Dear list,
hi !
I am a R beginner and I have a function to optimize .
alpha = argmin{ f(x,alpha) }
I want alpha to be in [0,1]. Is there any function that can work?
I use nlm() but i can't fix the domain of alpha.
thanks in advance
_______________________
Jiang Peng, Ph.D. Candidate
Department of Mathematics &
Antai college of Economics and Management
Shanghai Jiao
2009 Apr 26
3
Question of "Quantile Regression for Longitudinal Data"
Hi,
I am trying to estimate a quantile regression using panel data. I am trying
to use the model that is described in Dr. Koenker's article. So I use the
code the that is posted in the following link:
http://www.econ.uiuc.edu/~roger/research/panel/rq.fit.panel.R
How to estimate the panel data quantile regression if the regression
contains no constant term? I tried to change the code of
2009 Apr 05
4
extract the p value of F statistics from the lm class
Dear R users
I have run an regression and want to extract the p value of the F
statistics, but I can find a way to do that.
x<-summary(lm(log(RV2)~log(IV.m),data=b))
Call:
lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
Residuals:
Min 1Q Median 3Q Max
-0.26511 -0.09718 -0.01326 0.11095 0.29777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
2008 Oct 24
2
how to simply the procedure of creating a group of data.frame?
Dear R users,
I want to creat a group of data frames, such as:
d1<-data.frame(x=factor(),y=numeric(),...)
d2<-data.frame(x=factor(),y=numeric(),...)
d3<-data.frame(x=factor(),y=numeric(),...)
:
:
d50<-data.frame(x=factor(),y=numeric())
How can I use the loop to simply my procedure?
Thanks advance
Ted
--
View this message in context:
2010 Oct 08
4
Bug in as.POSIXct regarding AM/PM
Dear All,
I encounted in a problem with as.POSIXct() function.
> as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p")
[1] NA
> as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d %I:%M:%S %p")
[1] NA
I have tried this in the R version 2.11.1, R version 2.10.1 and R version
2.9.2 . They all does not work. The operation system is
2008 Sep 08
7
Question about multiple regression
Dear R-list,
maybe some of you could point me in the right direction:
Are you aware of any FREE Fortran or Java libraries/actual pieces of
code that are VERY efficient (time-wise) in running the regular linear
least-squares multiple regression?
More specifically, I have to run small regression models (between 1
and 15 predictors) on samples of up to N=700 but thousands and
thousands of them.
I
2009 Apr 23
4
rbind data frames stored in a list
Hello everyone!
I have a list X with 3 elements, each of which is a data frame, for example:
a<-data.frame(a=1,b=2,c=3)
b<-data.frame(a=c(4,7),b=c(5,8),c=c(6,9))
c<-data.frame(a=c(10,13,16),b=c(11,14,17),c=c(12,15,18))
X<-list()
X[[1]]<-a
X[[2]]<-b
X[[3]]<-c
(X)
How can I most effectively transform X into a data frame with columns
a, b, and c?
I would love to find a generic
2009 Apr 28
4
Producing customized tickmarks when producing a graph using "curve"
Hello!
I am using function "curve" to create a line graph.
I was wondering, if it's possible to "turn off" the default tick marks
and introduce those tick marks in specific locations.
For example, currently in my X axis tick marks are (automatically) at
10, 11, 12, 13 but I want them to be in 5 specific locations, like
9.89, 10.34, etc.
Any hint would be greatly
2009 Dec 03
3
Scraping a web page
I would like to be able to submit a list of URLs of various webpages and extract the "content" i.e. not the mark-up of those pages. I can find plenty of examples in the XML library of extracting links from pages but I cannot seem to find a way to extract the text. Any help would be greatly appreciated - I will not know the structure of the URLs I would submit in advance. Any
2010 Dec 29
3
Windows editor suggestions - autosave
I am looking for advice on an editor to use with R (windows) that has an autosave feature. I typically write scripts using the RGui (and tried TinnR yesterday) but I am having continuing problems with BSODs (non R related) and have in the past have had issues with R crashes and would really like a system that does not require me to remember to hit the save button on my script every 10 minutes so
2010 Dec 06
1
as.xts error
Dear all,
I am using the as.xts function to transfer a data frame to the xts
The following is the code and result:
a<-read.csv("price.csv")
a$Date<-as.POSIXct(a$Date)
str(a)
'data.frame': 15637 obs. of 2 variables:
$ Date : POSIXct, format: "2010-01-04 09:45:01" "2010-01-04 09:45:02"
"2010-01-04 09:45:03" ...
$ bid_hsi: int 21850
2009 Mar 26
2
Analogy for %in% for the whole columns (rather than individual values)
Hello!
I have a matrix a with 2 variables (see below) that contain character strings.
I need to create a 3rd variable that contains True if the value in
column x is equal to the value in column y. The code below does it.
a<-data.frame(x=c("john", "mary", "mary",
"john"),y=c("mary","mary","john","john"))
2011 May 19
2
Anyone successfully install Rgraphviz on windows with R 2.13?
I have been trying to get Rgraphviz to work (I know it is from Bioconductor) unsuccessfully. Since I have no experience with Bioconductor I thought I would ask here if anyone has advice. I have installed Graphviz 2.20.3 as is recommended on the Bioconductor site but basically R cannot seem to find the needed dll files. So, even though I have added the appropriate directories to the system path R
2009 Feb 27
3
rounding problem
hi i am creating some variables from same data, but somewhere is different
rouding.
look:
P = abs(fft(d.zlato)/480)^2
hladane= sort(P,decreasing=T)[1:10]/480
pozicia=c(0,0,0,0,0)
for (j in 1:5){ for (i in 2:239){
if (P[i]/480==hladane[2*j-1]){pozicia[j]=i-1}}}
period=479/pozicia
> P[2]/334
[1] 0.0001279107
> hladane[1]
[1] 0.0001279107
> P[2]/334==hladane[1]
[1]