Displaying 20 results from an estimated 7000 matches similar to: "optimal way to compute matrix subtotals?"
2006 Apr 05
5
List to Array
Hi,
this is probably the easiest thing to do but I manage
not finding the answer:
I have a list with matrices of exact same format and
headers. Now I would like to transform the list into
an normal array. What is the proper way to do this?
as.array changes the entire format and right now I
only found the method of creating a new array, going
through the entire list and copy the matrix in each
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi,
is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates?
I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object.
Many thanks,
Werner
__________________________________________________
Do
sragenden Schutz gegen Massenmails.
2008 Jul 27
4
Object-oriented programming in R for Java programmers?
Hi,
I was wondering if anybody might have a reference for
me: My R code is growing and getting more and more
confusing. Thus, I figure it's time to switch to
object-oriented again. I have done oo programming in
C++ and Java before but the first few tutorial on R oo
were a bit confusing for me.
Is there any brief tutorial on oo programming in R
especially for people who have done oo in Java
2006 Jan 10
5
matching country name tables from different sources
Hi,
Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it.
I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly.
Has anyone done this or any recommendation on what commands I
2008 Feb 21
2
column name handling and long labels
Hi,
I have two loosely related questions which could make
my live again a bit easier:
1) Is there a simple way to select a range of columns
in a data frame using column names?
I am thinking of something like mydf[1,"col4":"col8"]
2) I have a data frame with many columns and they all
have short variable names which is good in most cases
but sometimes it would be nice to have
2008 Feb 26
2
Custom LaTeX tables
Hello,
I am very happy that I have Sweave and R to write my
papers. But I still have to do some tables by hand
since I have not found out how I can customize the
latex tables produced by R further (I mainly use
xtable()). Like for instance, I have a table which
needs an extra row every few rows as a group header
and sometimes I want some extra horizontal lines in
the table and also a multicolumn
2009 Mar 02
4
portable R editor
Hi,
I have been dreaming about a complete R environment on my USB stick for a long time. Now I finally want to realize it but what I am missing is a good, portable editor for R which has tabs and syntax highlighting, can execute code, has bookmarks and a little project file management facility pretty much like Tinn-R has those. I like Tinn-R but it seems like there is only a very old version of
2006 Apr 21
4
Considering port of SAS application to R
Hi there!
I am considering to port a SAS application to R and I would like to hear your opinion if you think this is possible and worthwhile. SAS is mainly used to do data management and then to do some aggregations and simple computations on the data and to output a modified data set. The main problem I see is the size of the data file. As I have no access to SAS yet I cannot give real details
2012 Oct 17
3
subtotals based on price bands?
I would like to create a subtotal table with custom bands.
seq1 = seq(0, 100, by = 5)
seq2 = seq(100, 1000, by = 100)
Bands = c(seq1, seq2)
#Prices
Prices = sample(1:1000, 200, replace=F)
#corresponding size for the given price above.
size = sample(1:1000, 200, replace=F)
How would I find the subtotal of the size based on a given price falls
within a band?
--
View this message in
2006 Dec 05
1
summaryBy(): Is it the best option?
Hi,
since I have quite large tables and the processing
takes quite a while I am
curious if I can improve the performance of this
aggregation somehow: At the
moment I am using summaryBy from the doBy package
under R 2.4.0, Win2K.
summaryBy(soc_s6aq5 + soc_s6aq7 + soc_s6aq9 +
soc_s6aq11 ~ hh +
comgroup,soc6a,postfix=c("","","",""),FUN=sum,
na.rm=T)
The
2008 Mar 13
2
recover masked functions?
Hi,
I have loaded the packages car, memisc, Hmisc and all
of these implement the function recode. The order in
which the packages are loaded depends on the order I
execute my scripts and thus is not always the same and
the syntax of the recode function changes with the
package.
Is there any way to call specificly the memisc recode
function?
Or maybe it's better to detach all packages first
2008 Oct 22
3
retrieving matrix elements by giving pairs of row AND column numbers?
Hi,
this is probably a very trivial question but I can't figure out the right terms to find the solution in the list archive.
I have a matrix or a data.frame or the like:
> m <- matrix(ncol=3,seq(1,9))
> m
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
and now I wonder if one can provide somehow two vectors, one containing row numbers, the other
2008 Jan 29
1
sqldf error
Hi,
sqldf sounds like a very useful package but I don't
even get the example to run:
> a1s <- sqldf("select * from warpbreaks limit
6")
Error in combine(FUN(...)) : argument "value" is
missing, with no default
>
I am using R 2.6.1 on Windows Vista Business and have
updated all packages.
Some help would be very much appreciated.
Many thanks,
Werner
2006 Mar 27
1
reading in multi-dimensional data from .csv
Hi,
I would like to read in multi-dimensional data from a
text file, i.e. "tables" with more than 2 dimensions.
I have looked for a function which I can abuse for
that but haven't found anything.
I would appreciate it a lot if somebody gave me a hint
if such functions already exist somewhere.
Thanks,
Werner
2007 Aug 22
1
Processing Sweave documents without Sweave
Hi,
I am very intrigued by the idea of integrating
statistical analysis directly with a paper as Sweave
does it. But as I am collaborating with several people
and they won't have set up R and also they're very
unlikely interested in learning it, I am concerned
about how such an Latex/Sweave document will work on
their side.
Can they Latex-compile the document without having R /
Sweave
2008 Aug 12
1
Threshold vector error correction models
Hi,
is anyone aware of estimation functions for threshold vector error correction / threshold cointegration models?
I didn't find anything for R using RSeek or Google.
Thanks a lot for any pointers,
Werner
__________________________________________________
Do You Yahoo!?
hutz gegen Massenmails.
http://mail.yahoo.com
2008 Oct 10
1
map + some arbitrary locations' heights: some kind of perspective or contour plot possible?
Hi,
I thought about this but programming it seems rather difficult so I was wondering if a function exists for this in R (as most of the times it turns out that it does):
I have a map (shapefile) and for about 50 points on that map (GPS locations) I have heights. Is there a function which can make a perspective plot or contour plot or the like from this little data? Or maybe some function I can
2009 Aug 06
1
solving system of equations involving non-linearities
Hi,
I would appreciate if someone could help me on track with this problem.
I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this:
sum_i( A+b_i>0 & A+b_i>C+d_i) = x
sum_i( C+d_i>0 & C+d_i>A+b_i) = y
sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z
A, C, E are free variables while the other
2005 Apr 20
2
Label / Tick under single Boxplot
Hi!
I am trying to get the tick / label under a stacked
boxplot with only a single
data row. With >=2 rows it works, but with a single
one the tick resp. my class
name is not printed below the boxplot. Can anybody
point me to what am I doing
wrong?
For example:
boxplot(data.frame(c(3,4,5)),names=list("a"),beside=F)
Here, I would like to have the "a" below the single
2009 Jun 13
1
Insignificant variable improves AIC (multinom)?
Hi,
I am trying to specify a multinomial logit model using the multinom function from the nnet package. Now I add another independent variable and it halves the AIC as given by summary(multinom()). But when I call Anova(multinom()) from the car package, it tells me that this added variable is insignificant (Pr(>Chisq)=0.39). Thus, the improved AIC suggests to keep the variable but the Anova