Displaying 20 results from an estimated 3000 matches similar to: "How to subset a matrix?"
2012 Jun 12
1
handle large matrix in R
Dear all,
I've run into a question of handling large matrices in R. I'd like to
define a 70000*70000 matrix in R on Platform:
x86_64-apple-darwin9.8.0/x86_64 (64-bit), but it seems to run out of memory
to handle this. Is it due to R memory limiting size or RAM of my laptop? If
I use a cluster with larger RAM, will that be able to handle this large
matrix in R? Thanks much!
Best,
Hui
2012 Jun 01
1
scaling of parameter errors in a weighted regression using nls
I noticed that nls treats weights as relative and that the absolute size of the weights w in
the following script has therefore no influence on the errors of the parameters reported in the summary
a<-1
b<-3
x<--100:100
y<-a*x+b
yeps<-y+rnorm(length(x),sd=1)
w<-rep(1,length(x))
plot(x,yeps)
lines(x,y)
fit<-nls(yeps~p1*x+p2,start=list(p1=a*1.5,p2=b*1.5),weights=w)
2012 May 31
1
Repost: Expressions returned by GlobalEnv functions and package functions
Hello,
(Sorry for the repost, i am resending in plain text)
I have a function 'ewrap' (see below for definition).
It takes 3 expressions and returns another expression e.g.
map <- ewrap({
len <- length(r$addon)
rhcollect(len,1)
})
becomes:
expression({
NULL
result <- mapply(function(.index, k, r) {
{
len <- length(r$addon)
2012 Jun 15
3
spelling correction using R
hello
I want a code which can correct the spelling mistakes as well as
grammatical mistakes in the sentences...that is if I am writing following
sentence:
I want too meet my frnd bt due to hectic shcedule I cant
I want output in following way:
I want to met my friend but due to hectic schedule I can't.
Thanks in advance
Shilpa Rai
MSc
IIT Bomaby
--
View this message in context:
2012 Jun 12
3
R-SCRIPT Label Calling Method
Hi,
here i have some code...
a <-1
b <- b+1
c <- b+a/20
if c >5
{ d<- 1 }
else { d<- 0 }
i want to repeat this code from the 2nd line [b <- b+1] without using loop.
Actulay i want to use "*Label *" and call *GoTo* method like in other
coding Languages.
For eg:- like this,
a <-1
*LabelBegin :*
b <-
2012 May 31
3
Quadrat counting with spatstat
I have photographs of plots that look like so:
http://r.789695.n4.nabble.com/file/n4631960/Untitled.jpg
I need to divide it up so each circle has an equal area surrounding it. So
into 20 equal segments, each of which contains a circle. Quadratcount is not
sufficient because if I divide it up into 36 equal quadrats, some quadrats
do not contain one of the circles.
I'm not even sure how to
2012 Jun 28
4
Printing a variable in a loop
Dear R Users:
I'm a STATA user converting to R, and I'd like to be to do the following.
#Assign var_1 and var_2 a value
10->var1
20->var2
#Now I'd like to print the values of var_1 and var_2 by looping through
var_1 and var_2 in such a manner:
while(y<3){
print(var_y)
y+1->y
}
In STATA, the "y" appended to " var_" is called the local variable and
2012 Jun 26
4
increase the usage of CPU and Memory
Dear All,
I have been searching online for help increasing my R code more efficiently
for almost a whole day, however, there is no solution to my case. So if
anyone could give any clue to solve my problem, I would be very appreciate
for you help. Thanks in advance.
Here is my issue:
My desktop is with i7-950 Quad-core CPU with 24Gb memory, and a NVIDIA GTX
480 graphic card, and I am using a
2012 May 31
1
Using RDF/OWL with R?
Hello,
Is there a convenient way to import RDF/OWL data into R?
I'm interested in importing BioPAX/SBPAX data into R to make them
available for a wider audience. One exciting application would be to
use pathway data to explain differential microarray measurements by
identifying upstream nodes that are likely involved in causing the
differences. This could also be used to validate
2006 Mar 07
3
returning the largest element in an array/matrix?
Hi all,
I want to use "which.max" to identify the maximum in a 2D array/matrix and I
want "argmin" and return the row and column indices.
But "which.max" only works for vector...
Is there any convinient way to solve this problem?
Thanks a lot!
[[alternative HTML version deleted]]
2003 Jul 18
2
create a vector looping over a frame
Hello,
I have a data.frame
> names(popA)
[1] "Year" "Series" "Age" "WM" "WF" "HM" "HF" "BM"
[9] "BF" "IM" "IF" "AM" "AF" "Yr"
how do i loop over a subset of variables in this frame to create a vector of
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]]
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
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]]
2006 Feb 02
4
How to force a vector to be column or row vector?
Hi all,
I tended to use rbind, or cbind to force a vector be be deemed as a column
or row vector. This is very important if I want to do things like u' * A *
u, where u' is a row vector and u is a column vector, regardless of what
originall format the "u" is... I want to recast it to column vector or row
vector... How can I do that?
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!
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.