Displaying 20 results from an estimated 1000 matches similar to: "List and Column Names in a Function?"
2005 May 24
2
Missing Data Line Type?
I have a general question. Is there a setting that can be used for a
multiple line type? The situation is that I want a solid line between x
and y points but if the y point is missing, I want a dashed line type to
the next point. In other words, if point 1 to 2 exists, make that line
solid, otherwise, make it dashed up to the next existing x/y point.
Additionally, what plot type would you
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 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 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 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 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 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 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 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?
2013 Jun 17
5
Filesystem "somewhat" destroyed - need help for recovery/fixing
Hello
I think, I somewhat destroyed my btrfs filesystem on my Ubuntu 13.04 kernel
3.8.0-25-lowlatency system. It got destroyed, because the system was hanging
for some other reason and I had to remove power...
When I try to mount my filesystem (there''s only one, with a few
subfilesystems), the system crashes. Also btrfsck dies; always like this:
a@ask-home:~$ sudo
2003 Feb 11
4
How "else" works
I have what is likely to be a simple question about the else keyword.
The usage in the help pages is as follows:
if(cond) cons.expr else alt.expr
I would expect to be able to use it in the following way as well:
if(cond){
cons.expr
}
else alt.expr
This results a syntax error.
Am I doing something wrong, or doesn't R support the spanning of the
combination of if and else
2002 May 27
2
hist failed with unused arguments
Hello,
I urgently need a histogram of the vector geo1$ds1
but:
> hist(geo1$ds1)
Error in hist(geo1$ds1) : unused argument(s) ( ...)
I can use density, summary, boxplot and stem with this vector but not hist ?
Any suggestions ?
Thanks in advance,
Detlef Groth
> density(geo1$ds1)
Call:
density(x = geo1$ds1)
Data: geo1$ds1 (1412 obs.); Bandwidth 'bw' = 0.2805
2008 Apr 01
2
Applying rbind() to a sequence of data frame names
I have a set of data frames ds1, ds2, ... each having the same columns
and column names:
ds1 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8))
ds1 <- data.frame(x=c(9,10,11,12), y=c(13,14,15,16))
...
and I would like to combine them into just one data frame like
ds <- rbind(ds1, ds2, ...)
Because there are so many of them, I will have to use a character array
nms <-
2007 Feb 22
4
Crosstabbing multiple response data
Using R version 2.4.1 (2006-12-18) on Windows, I have a dataset which resembles this:
id att1 att2 att3
1 1 1 0
2 1 0 0
3 0 1 1
4 1 1 1
ratings <- data.frame(id = c(1,2,3,4), att1 = c(1,1,0,1), att2 = c(1,0,0,1), att3 = c(0,1,1,1))
I would like to get a cross tab of counts of co-ocurrence, which might resemble this:
2012 Mar 21
1
nlme error on dimensions in multiplication
Hello R users,
When trying to fit a nonlinear mixed model to a respiration time series,
I get the following error message:
Error in recalc.varFunc(object[[i]], conLin) :
dims [product 30] do not match the length of object [34]
In addition: Warning message:
In conLin$Xy * varWeights(object) :
longer object length is not a multiple of shorter object length
Below is an example that generates