Displaying 20 results from an estimated 4000 matches similar to: "getting the column name of a data frame"
2010 Jun 18
2
double integral
Sir,
I want to calculate double integral in R. Is there any function to do this?
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 10
1
To give column names of a data-frame
Sir,
I want to export the results of R in a data frame. So I want to give
rownames,columnnames & title to the data-frame.I have applied the following:
data.frame(matrix(c(...),nrow=,ncol=),row.names=c("a","b"),col.names=c("c","d"),title="aaa")
But, it does not work.
Can you help me?
Regards,
Suman Dhara
[[alternative HTML version
2010 Jun 06
2
fitting multinomial logistic regression
Sir,
I want to fit a multinomial logistic regression in R.I think mlogit() is the
function for doing this. mlogit () is in packege globaltest.But, I can not
install this package. I use the following:
install.packages("globaltest")
Can you help me?
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 04
1
parttioning a matrix corresponding to different levels of y
Sir,
I have a problem regarding partitioning a matrix.I state my problem as
follows:
I have a y vector of length say 1000.Variable y has 4 levels say
0,1,2.Corresponding to each y(response), I have a x-vector(explanatory) as a
row of X matrix.Now, I want to partition the X matrix into 3 submatrices say
x1,x2,x3 corresponding to each level of y.Is there any function to do this
in R or how can I
2010 Jun 05
1
Prediction in discriminant analysis
Sir,
I am working with multiclass discriminant analysis.(say response variable
has 3classes).In R, using lda(), I get 2 sets of coefficients for the
discriminant function.Now, I want to put a new x-vector(vector of
independent variables) and want to check it corresponds to which class of
y.Is there any formula for doing this? or how can I do this?
Regards,
Suman Dhara
[[alternative HTML
2010 Jun 16
1
generating samples from multivariate distributions
Sir,
I want to draw random from any multivariate disrtibution. Is there any
function in R to do this?
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 17
1
simulating data from a multivariate dist
Sir,
I am working on fitting distribution on multivariate financial data and then
simulate observations from that fitted distribution. I use stepAIC.ghyp()
function of 'ghyp' library which select the best fitted distribution from
generalized hyperbolic distribution class on the given dataset.
data(indices)
# Multivariate case:
aic.mv <- stepAIC.ghyp(indices, dist =
2010 May 31
1
Removing columns from data frame referenced by column index
Can you suggest me any way to remove a column of a data frame by the column
number,not by the column name.
Thanks,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 25
2
installing multicore package
Sir,
I want to apply mclapply() function for my analysis. So, I have to install
multicore package. But I can not install the package.
>install.packages("multicore")
It gives that package multicore is not available.
Can you help me?
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 10
2
drawing curve
Sir,
I have a problem regarding drawing curve.I pose the problem as follows:
suppose I have two vectors:
x<-c(1:6)
y<-c(.01,.09,.08,.03,.001,.02)
plot(x,y)
It gives me the plotted points.But I want to draw a smooth curve passing
througt these points.
How can I do this?
Thanks & Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Aug 15
1
Moving average in R
Hi,
I want to fit moving average trend in R. In google, I see that it is in the
package 'TTR'. But, I can't install this package. I have used the following
code:
>install.packages("TTR")
But, it says there is no package called 'TTR'.
Can you help me?
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 16
1
Exporting multiple plots
Sir,
I want to export 10, say graphs using 'for' loop. What will be the command
and format for exporting multiple plots.
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Jun 23
1
calculating using user provided function
Sir,
I'm writing a program in R that requires the user to provide a funtion. On
the basis of the user provided function the program will proceed further and
give results. Is there any technique in R that allow a user to give his own
function and on the basis of that function the program will work.
Regards,
Suman Dhara
[[alternative HTML version deleted]]
2011 Jan 11
1
sorting question
Hi,
I have a data frame with variables a, b, c (character vars) and t (time var,
could be represented as POSIXct or character, depending on which is most useful.
The format is "yyyy-mm-dd hh:mm:ss CET"). Now, I want to sort the data frame in
ascending order by a, b, c and then in descending order by t.
Here's what I've got, but I'm not sure how to put the
2010 Jul 22
1
check menu button (tcltk)
Hi,
I am making a mock user interface in tcltk and I would like to add a 'check menu button' such as shown here: http://zetcode.com/tutorials/pygtktutorial/images/checkmenuitem.png
Does anybody know how to do this? I am quite new to R.
Cheers!!
Albert-Jan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine,
2010 Apr 29
1
UpdateLinks = FALSE
Hi,
I'm reading 100s of excel files and many of them contain links to external files (I hate that, but that aside). Every time such a file is opened, a menu pops up asking if I want to update the links. I never want to update the links. I used the macro recorder to see what code would be needed to suppress that message, but to no avail (I tried more variations, but one attempt is shown
2011 May 04
2
first occurrence of a value?
Hello,
A simple question perhaps, but how do I, within each row, find the first
occurence of the number 1 in the df below? I want to use this position to
programmatically create the variable 'year'. I'v come up with a solution, but I
find it downright ugly. Is there a simpler way? I was hoping for a useful
built-in function that I don;t yet know about.
df <-
2011 May 03
1
Rodbc quesion: how to reliably determine the data type?
Hello,
How can I tell RODBC to scan all the records of an xls file to determine the
data type? If the first n records happen to be empty Rodbc assumes a character,
and any numbers are made <NA>. And if, for instance, the first n records contain
numbers, and later they also contain characters, those characters become NA.
Cheers!!
Albert-Jan
2010 Apr 19
1
Equivalent to Python os.walk?
Hi,
I would like to recursively loop through al subfolders of a directory and do stuff with certain file types in those dirs. Is there a package/function that could do this? So it's more than Sys.glob. I'm looking for equivalent of Python's os.walk *) and I don't want to reinvent the wheel.
Thank you.
Cheers!!
Albert-Jan
*)
2010 Apr 21
1
VERY basic question about S4 classes
Hi,
I'm new to R and S4 classes. I defined a class with two methods (myMethod1 and myMethod2). I want to call myMethod1 within myMethod2. Why does the code below not work? The name 'myMethod1' doesn't appear to have meaning inside myMethod2, even though the two methods belong to the same class.
setClass(Class="SomeClass",
representation=representation(