Displaying 20 results from an estimated 1000 matches similar to: "Missing Data Line Type?"
2005 Jun 10
2
Default Format for Dates?
Is there anyway to preset date formats? I have a date from a cover.dbf
that is shown as this:
> cover$FINALREPOR
[1] "2003-06-24"
The numeric value in cover$FINALREPOR is 12227. I'd rather not create
another vector to hold the properly formatted date.
When I put this in a WordPerfect merge, I want the date to be June 24,
2003. I could take care of the problem in a
2005 Jun 23
1
Stop Warnings for Invalid Factor Level, NAs generated?
How can I stop the following warning from occuring?
invalid factor level, NAs generated in: "[<-.factor"(`*tmp*`, iseq, value =
structure(1, .Label = "12", class = "factor"))
The Label messages are for "5", "8", "12" and "46". I want the NAs to be
generated as needed.
Is this causing R to slow down by generating the warning
2005 May 31
1
Add Columns and Order for Rbind?
I am using rbind to add one list with one row to another master list. The
problem is that not all columns exist in both lists.
What methods would you recommend to reorder one list based on the column
names of another? If both sets have the same order and columns, I can
then use rbind. I can live with columns being added to the master list set
it makes the task easier using something like
2005 May 13
3
List and Column Names in a Function?
In this simple function, how can I pass strings for index and column names
to the function? I've posted this type of question before and received no
response.
Maybe this example will be easier to understand and troubleshoot.
ds <- function(myds, vec) {myds[[vec]]*2}
ds1 <- c(X=list(1:10), Y=list(11:20))
ds(get("ds1"),get("Y"))
khobson at odot.org
Kenneth Ray
2005 Jul 01
4
R integration with Microsoft Powerpoint
Please allow me an unusual question.
Is there any way that R can be closely integrated with a Microsoft
Powerpoint presentation? I would like to embed R calculations in
Powerpoint so that I will start Powerpoint, be prompted to enter some
parameters, and an R function will run and return values and graphs.
Thanks,
John
R 2.1.1
windows 2k
John Sorkin M.D., Ph.D.
Chief, Biostatistics and
2005 Apr 29
2
Windows List of Folders?
For windows, how can I list only the folders in some folder?
I was thinking that dir() and file.info() with isdir==TRUE being something
that might work.
These folders or directories are numerically named with no dot extension
names or other characters. Typically, these are 3132, 3334, ...
Here is what I tried. The last line is where I need more work.
pData="C:/Myfiles/R/Data/"
setwd
2005 Apr 22
2
Hoaglin Outlier Method
I am a new user of R so please bear with me. I have reviewed some R books,
FAQs and such but the volume of material is great. I am in the process of
porting my current SAS and SVS Script code to Lotus Approach, R and
WordPerfect.
My question is, can you help me determine the best R method to implement
the Hoaglin Outlier Method? It is used in the Appendix A and B of the fo
llowing link.
2005 Jun 30
1
how to call egarch of sas in R
I use R to generate data and I need to estimate the data by egarch (that
doesn't have in R). So how I can call egarch from SAS in R.
Regards,
luck
2005 Jul 01
2
the format of the result
I write a function to get the frequency and prop of a variable.
freq<-function(x,digits=3)
{naa<-is.na(x)
nas<-sum(naa)
if (any(naa))
x<-x[!naa]
n<-length(x)
ta<-table(x)
prop<-prop.table(ta)*100
res<-rbind(ta,prop)
rownames(res)<-c("Freq","Prop")
cat("Missing value(s) are",nas,".\n")
cat("Valid case(s)
2005 Apr 29
0
Windows list of Folders
Hi Kenneth:
I tried:
list.files(path="c:\\pctexv4\\samples")
and that worked just fine.
Hope this helps!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgess at gator.uhd.edu
From: khobson at fd9ns01.okladot.state.ok.us
Subject: [R] Windows List of Folders?
X-BeenThere: r-help at
2005 Jun 16
3
Excel files first row not being read
hi,
i am using the RODBC package to read excel files using
odbcConnectExcel and susequently sqlFetch to read the contents of the
file.
the file that i use is just a matrix of numbers thats all. no headers
and column names. what happens is that the sqlFetch is not reading my
first row of numbers.
i have tried different combinations of colnames and rownames logical
values but that first row is not
2005 Jun 29
3
return NA
A<-c(1,2,NA,7,5)
B<-c(3,4,1,4,1)
C<-c(6,5,6,NA,9)
D<-c(8,7,4,6,2)
df1<-cbind(A,B,C,D)
for(i in seq(1,ncol(df1)-1, by=2)) {
ifelse(df1[,i]=="NA",df1[,i+1]=="NA",df1[,] ) }
Tried several variations but none worked. I wish to find any NA's in
column's 1 or 3 and change the numerical value to the right of the "
NA"'s . In this case I
2005 Jun 07
1
Function inside tapply
I'm new to R and not an experienced writer of programs, which may help
explain my question. I wish to create a table or data frame which
contains the quantiles of the columns in the data frame DF. I wish to
produce a table T where T[1] shows me the quantiles of column DF[1] right
up through the entirety of DF. Tried several approaches with limited
success. This looked like the best
2005 Jun 17
1
Data comparison
Question : Is it possible to create a function, using a for ifelse
function, inside sapply, to compare the values in one data frame to a set
of upper and lower limits in another data frame, same number of columns.,
Take the values which meet the requirements "TRUE" and create a new data
frame or table containing the filtered data? Can you give me a shove in
the correct direction?
2004 Oct 06
1
plotOHLC unequally spaced time.
Hi I have som financial tick data that i have converted in to 45 min
bars. These are unequally spaced in time. I wonder if it is possible to
plot these like bars as the plotOHLC does. As I have understood plotOHLC
uses class(mts) that must be equally spaced?
Regards Paer
[[alternative HTML version deleted]]
2003 Dec 14
1
A faster plotOHLC() for the tseries package
The plotOHLC function in the tseries package is useful to plot timeseries of
various financial assets with open/high/low/close data. I had often
wondered if it could be made to run a little faster. It turns out that the
following patch does
--- plotOHLC.R.orig 2003-12-14 12:02:20.000000000 -0600
+++ plotOHLC.R 2003-12-14 12:03:42.000000000 -0600
@@ -21,14 +21,9 @@
ylim <-
2012 Jan 10
1
plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series
R version 2.12.0, 64 bit on Windows.
Here is a short script that illustrates the problem:
library(tseries)
library(xts)
setwd('C:\\cygwin\\home\\Ted\\New.Task\\NKs-01-08-12\\NKs\\tests')
x = read.table("quotes_h.2.dat", header = FALSE, sep="\t", skip=0)
str(x)
y <- data.frame(as.POSIXlt(paste(x$V2,substr(x$V4,4,8),sep="
"),format='%Y-%m-%d
2011 Dec 01
3
FIML with missing data in sem package
Is there a way to use full information maximum likelihood (FIML) to
estimate missing data in the sem package? For example, suppose I have a
dataset with complete information on X1-X3, but missing data (MAR) on X4.
Is there a way to use FIML in this case? I know lavaan and openmx allow you
to do it, but I couldn't find anything in the documentation for the sem
package. Thanks!
--
Dustin Fife
2005 Mar 15
4
How to extract x rows to get x pvalues using t.test
Hi all,
My data
genes
[,1] [,2] [,3] [,4]
[1,] 25 72 23 55
[2,] 34 53 41 33
[3,] 26 43 26 44
[4,] 36 64 64 22
[5,] 47 72 67 34
stu<-t.test(genes[,1:2],genes[,3:4])
> stu$p.value
[1] 0.4198002
i get 1 pvalue for the entire col1:col2 Vs col3:col4. I am trying to get 5 p values for the 5 rows i have.
I am trying to avoid a for loop coz my
2008 Mar 22
2
intraday OHLC plot
I want to create a open/high/low/last plot of intraday data.
I try to use the function plotOHLC from the tsteries package. I create
my own multiple time series and then try to plot it.
raw Data Format (file eurusd2.csv):
"Date (GMT)" "Open" "High" "Low" "Last"
17-03-2008 00:00:00 1,5764 1,5766 1,5747 1,5750
17-03-2008 00:05:00 1,5749 1,5750 1,5741