similar to: How to force a vector to be column or row vector?

Displaying 20 results from an estimated 4000 matches similar to: "How to force a vector to be column or row vector?"

2023 Jan 26
1
Failing to install the rgl package
Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif") color = rainbow(length(y_hat))[rank(y_hat)] plot3d(educ,exper,wage,col = color,type = "s",size = 0.5,xlim =
2005 Feb 10
2
testing slopes different than a given value
In a multiple linear regression with two independent variables is there any function in R to test for the coefficients being different than some given values? Example: x1<-rnorm(100) x2<-rnorm(100) y<-3+0.6*x1+0.3*x2 lm(y~x1+x2) Obtain a test for the coefficients for x1 being different than 0.6 and for x2 different than 0.3 Thanks Manuel
2006 Mar 08
8
how to use the randomForest and rpart function?
Hi all, I am trying to play around with the randomForest function for classification. I know its performance is great. I am currently using the default options. It has many options. How do I further tweak the options so that I can make its performance even better? What are the options that are mostly used? Thanks a lot! M [[alternative HTML version deleted]]
2009 Dec 04
5
logical masking of a matrix converts it to a vector
One problem I've been having is the special case in which only one row/column remains and the variable gets converted into a vector when entries are removed by logical masking. This is a problem because subsequent code may rely on matrix operations (apply, colsums, dim, etc) For example: > a <- matrix(c(1, 2, 3, 4), nrow = 2) > a [,1] [,2] [1,] 1 3 [2,] 2 4 >
2011 Nov 29
2
Help with recast() syntax
Dear Help-Rs,   I have data similar to the following:   DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L, 201012L, 201101L, 201102L, 201103L, 201104L, 201105L, 201106L, 201107L, 201108L, 201109L, 201011L,
2011 Dec 07
6
nice report generator?
Hi all, I am looking for recommendations/pointers about best report generator you think that are currently available? i.e. the package that can help turn console output into nice-looking neat report to send to bosses? thanks a lot! [[alternative HTML version deleted]]
2006 Mar 07
3
how to use the rpart function?
Hi all, What parameter do I normally change in the rpart function? How do I set the "cp" option? Is there a way to read off error rate directly from the "rpart" function for training data; I imagine for testing data I have to apply a "predict", but for training data I guess the error count would be somewhere existing once the "rpart" function is
2010 Oct 13
2
[LLVMdev] [Q] x86 peephole deficiency
Am 07.10.2010 um 19:50 schrieb Chris Lattner: > > On Oct 6, 2010, at 6:16 PM, Gabor Greif wrote: > >> Hi all, >> >> I am slowly working on a SwitchInst optimizer (http://llvm.org/ >> PR8125) >> and now I am running into a deficiency of the x86 >> peephole optimizer (or jump-threader?). Here is what I get: >> >> >> andl $3,
2011 Mar 16
1
linear regression in a data.frame using recast
I have a very large dataset with columns of id number, actual value, predicted value. This used to be a time series but I have dropped the time component. So I now have a data.frame where the id number is repeated but each value in the actual and predicted columns are unique. I assume I need to use recast somehow but I'm at a loss... how can I perform a simple linear regression (using
2012 Aug 22
4
Is there a data/variable explorer in R?
Is there a data/variable explorer in R? Hi all, I am inspecting a complex variable which has lists inside lists... Is there a data-explorer that can help me view the structure and content of such variables? Thank you! [[alternative HTML version deleted]]
2011 Dec 06
4
how to view/edit large matrix/array in R?
head, tail and fix commands don't really work well if I have large matrix/array for which I would like to be able to scroll up and dow, left and right ... Could anybody please help me? Thanks [[alternative HTML version deleted]]
2009 Jul 30
0
Constrained MLE of fixed mean Singh-Maddala distribution
INTRODUCTION TO THE PROBLEM I am trying to fit a distribution to a dataset. The distribution that I am currently considering is the (3-parameter) Singh-Maddala (Burr) distribution. The final model will fix the mean of the distribution to a given value and estimate the remaining parameters accordingly; however, the code provided below ignores this. For this distribution the three parameters
2012 Aug 31
3
how to find the index of points selected from a scatter plot?
Hi all, I am using "locator" to select the points from a scatter plot... This is all fine. But the problem is that the locator only returns the axis values of the selected points. Instead, I would like to get the index of these select points... The axis values are real-values so it's a bit hard for me to directly reverse-engineer the index nubmers.. How to do that? Thank you!
2009 Jun 19
3
please recommend hands-on books on classification, data-mining and machine learning with R?
Hi all, Could anybody please recommend some hands-on books on classification, data-mining and machine learning with R? I would like to get a very good understanding of the statistical tools that are used in these areas, while reducing the learning curve. Thank you!
2009 Jul 31
0
MLE estimation of constrained mean Singh-Maddala distribution
INTRODUCTION TO THE PROBLEM I am trying to fit a distribution to a dataset. The distribution that I am currently considering is the (3-parameter) Singh-Maddala (Burr) distribution. The final model will fix the mean of the distribution to a given value and estimate the remaining parameters accordingly; however, the code provided below ignores this. For this distribution the three parameters
2006 Jan 29
2
SoS! How to predict new values using linear regression models?
Hi all, After trial and error by myself for a few hours, I decide to ask for your help. I have a training set which is a matrix of size 200 x 2, where the two columns denote each independent variable. I have 200 observations. ----------------- ss=data.frame(trainingSet); result=lm(trainingClass~ss$X1+ss$X2); ----------------- where trainingClass denotes the true classes of the training data.
2006 Feb 28
3
does svm have a CV to obtain the best "cost" parameter?
Hi all, I am using the "svm" command in the e1071 package. Does it have an automatic way of setting the "cost" parameter? I changed a few values for the "cost" parameter but I hope there is a systematic way of obtaining the best "cost" value. I noticed that there is a "cross" (Cross validation) parameter in the "svm" function. But I
2012 Jul 25
2
reshape -> reshape 2: function cast changed?
Hi, I used to use reshape and moved to reshape2 (R 2.15.1). Now I tried some of my older scripts and was surprised that my cast function wasn't working like before. What I did/want to do: 1) Melt a dataframe based on a vector specifying column names as measure.vars. Thats working so far: dfm <- melt(df, measure.vars=n, variable_name = "species", na.rm = FALSE) 2) Recast the
2012 May 27
1
SOS! R Console crashed after loading RODBC... Update: Re: How to set up RODBC? Diff between R Console and RStudio?
On Sun, May 27, 2012 at 11:32 AM, Michael <comtech.usa@gmail.com> wrote: > Help! The R Console very quietly closed and exited without giving any > errors/warnings...after I loaded the RODBC library... > > Loading required package: RODBC > > > > > On Sat, May 26, 2012 at 10:27 PM, Michael <comtech.usa@gmail.com> wrote: > >> Hi all, >> >>
2001 Mar 20
3
Newbie question about by() -- update
Sorry about the lack of detail. I am running R v.1.2.2. I can recast my question (which I think I have partially answered) more succinctly as follows: 1. This seems to work (note that group takes values 1,2,3,4, or 5): my.newfun <- function(x) myfile <- lm(award ~ ilogemp + ilogage, x) test.by <- by(wintemp, as.factor(wintemp$group), my.newfun) 2. This does not work (leaving aside