similar to: Column-mean-values for targeted rows

Displaying 20 results from an estimated 500 matches similar to: "Column-mean-values for targeted rows"

2008 Jul 16
1
Problem with mpi.close.Rslaves()
I am running R 2.7.0 on a Suse 9.1 linux cluster with a job scheduler dispatching jobs and openmpi-1.0.1. I have tried running one of the examples at http://ace.acadiau.ca/math/ACMMaC/Rmpi/examples.html in Rmpi and they seem to be working, except mpi.close.Rslaves() hangs. The slaves are closed, but the master doesn't finish its script. Below is the example script and the call to R. The job is
2008 Nov 07
1
Rmpi task-pull
Hi, I'm testing the efficiency of the Rmpi package regarding parallelization using a cluster. I've found and tried the task pull programming method, but even if it is described as the best method, it seems to cause deadlock, anyone could help me in using this method? here is the code I've found and tried: # Initialize MPI library("Rmpi") # Notice we just say "give us
2007 Oct 22
3
median value dataframe coming from multiple dataframes
Hi all, I am not a skillful R programmer and has I am handling with large dataframes (about 30000 x 300) I am in need of an efficient function. I have 4 dataframes with the same dimension. I need to generate other dataframe with the some dimension than the others where in each position it has the median value of the 4 values in the same position coming from the 4 dataframes. Grateful by your
2008 Mar 27
2
colMeans in a data.frame with numeric and character data
Hi all, I would like to know if it is posible by, someway, to get colMeans from a data.frame with numeric as well as character data, dispersed all over the object. Note that I would like to get colMeans neglecting character data. I am really in need of some function proceeding in that way… All the best Diogo André Alagador [[alternative HTML version deleted]]
2007 Jul 20
3
R CMD SHLIB problem [make: *** No rule to make target ]
Hy all, I apologize for my ingenuity in regard to interfaces in R, but I do need it for my work. In that respect I took a simple and small example from the net (the "hello world", one) to interface R with C. I have a Windows XP OS using R.2.5.0 and in that regard I have installed the Perl and RTools files to my PC. I also wrote a proper path file, as suggested. The C program is:
2008 Nov 06
2
comparing matrices using max or min
Dear all, I have 3 matrices with the same dimension, A,B,C and I would like to produce a matrix D where in each position would retrieve the max(or min) value along A,B,C taken from the same position. I guess that apply functions should fit, but for matrices objects I am not getting it. thanks in advance, Diogo André Alagador [[alternative HTML version deleted]]
2009 Jul 03
1
The time series analysis functions/packages don't seem to like my data
I have hundreds of megabytes of price data time series, and perl scripts that extract it to tab delimited files (I have C++ programs that must analyse this data too, so I get Perl to extract it rather than have multiple connections to the DB). I can read the data into an R object without any problems. thedata = read.csv("K:\\Work\\SignalTest\\BP.csv", sep = "\t", header =
2007 Nov 06
2
wilcox test on two data frames
Hi all, Basically I have 2 data frames with equal dimension and I want to apply the wilcox.test to compare columns in the same position (i.e. 1st of df.A with 1st of df.B, 2nd of df.A with 2nd of df.B,...). Anyone give me an hint on this, as I think it is nicer to avoid loops, specially for huge dataframes (30000 x 200) Thanks in advance, Diogo André Alagador Portugal [[alternative HTML
2011 Oct 02
2
Sum of Probabilities in a matrix...
Hi all, I have 2 columns in a mtrix, one of which is a column of probabilities and the other is simply a vector of integers. I want to sum all the probabilities with the same integer value and put it in a new column. For example, If my matrix is: 0.98 2 0.2 1 0.01 2 0.5 1 0.6 6 Then I should get: 0.98 2 0.99 0.2 1 0.70 0.01 2 0.99 0.5 1 0.70 0.6 6
2018 Jan 24
4
Geometry delaunayn and deldir results, differing results from Octave due to decimal precision?
The problem: I would like to translate the Octave algorithm in griddata.m to R. Within the griddata algorithm calls are made to the Delaunay function. For the R translation I have found delaunayn within the "geometry" package and also the deldir package. Both do similar things but give slightly different results depending on the input. The question is, what is making the results for the
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2006 Mar 11
2
how to create analog stripchart plots of x vs t (t=mm/dd/yyyy hh:mm:ss)
Hello r-experts, I sure could us a little help. I have an ever updating text file with timestamped data in it. I can reformat in anyway I want if need be but currently I have chosen to make columns of date, time and measuresed value (comma delimeted and with the dates and times in quotes to interpret them as strings). Here is a small section of my text data file:
2012 Jan 04
1
Adding a vertical line to plot with two overlapping density plots
Hi, A simple question I hope. I wish to add a single vertical line to a plot with several density plots. Here is a simplified example. ############ thedata <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data thedata.m<-melt(thedata) densityplot(~value, thedata.m, groups=variable,auto.key=list(columns=2)) #this gives the two density plots ######### what I wish now is to add a
2009 May 16
3
How to save R "clean" sessions in BATCH mode?
Thanks a lot for all of you that have reply me about opening and ending R workspaces in BATCH mode. However replies were a king general and I?m afraid I could not take the entire message from them. Therefore I chose to expose here a representative fraction of my work. I have 50 Rdata files (F1,F2,F3,F4, ,F50) with objects inside. I need to: open F1: - perform some simple operations
2012 Jan 11
3
summarizing a complex dataframe
I need some help summarizing complex data frames (small example below): m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 i1 1 1 1 2 2 2 i1 2 1 1 2 2 2 i2 2 2 1 2 2 2 For an arbitrary number of columns (say m1 ?. m199) where the column names have variable patterns, and such that each set of columns is repeated (with potentially unique data) an
2011 Oct 18
2
Non-linear maximization function in R
Hello, # Full disclosure. I am not sure if my problem is a bug(s) in the code, or a fundamental misunderstanding on my part about what I am trying to do with these statistics. I am not familiar with maximum likelihood tests. # I currently have two vectors Aequipecten<-c(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
2010 Aug 18
2
Different way of aggregating
Hi Usually "aggregate" is used to calculate things such as the sum of all data on the first day, the sum next day, and so on. But how can I calculate the mean of the first hour of all days, the mean of the second hour of all days, and so on. ??? That's Most examples: today at 1am + today at 2am + today at 3am +.... -> sum today tomorrow at 1am + tomorrow at
2008 Oct 31
4
[ifelse] how to maintain a value from original matrix without probs?
Dear all, I have a matrix with positive and negative values. >From this I would like to produce 2 matrices: 1st - retaining positives and putting NA in other positions 2nd - retaining negatives and putting NA in other positions and then apply rowMeans for both. I am trying to use the function ifelse in the exemplified form: ifelse(A>0,A,NA) but by putting A as a 2nd parameter it
2017 Mar 19
2
outer not applying a constant function
Hi, the function outer can not apply a constant function as in the last line of the following example: > xg <- 1:4 > yg <- 1:4 > fxyg <- outer(xg, yg, function(x,y) x*y) > fconstg <- outer(xg, yg, function(x,y) 1.0) Error in outer(xg, yg, function(x, y) 1) : dims [product 16] do not match the length of object [1] Of course there are simpler ways to construct a constant