similar to: zeros keep dropping

Displaying 20 results from an estimated 3000 matches similar to: "zeros keep dropping"

2009 Nov 05
3
performing operations on a dataframe
Hey all, I feel like the solution to this problem should be relatively simple, but for some reason I can't find answers or come up with my own solution. Given the dataframe: (SpA and SpB not important, want to look at distribution of cooccurance for each year) Year SpA SpB Coocc 2000 0 2000 2 2000 1 2001 8 2001 2 2001 0 2001 0 2002 1 2002 2 How can I apply different functions to
2009 Nov 06
1
using xyplot to plot frequencies
Hi all, First off, thank you for the overwhelming response last time. I'm still trying to figure out the syntax of R to plot some distributions of some frequencies. I've managed to plot histograms from the data, but I would like to clean it up using xyplot from library(lattice). Unfortunately I cannot find a solution to my problem. Given a dataframe "all2", with numerical
2010 May 04
2
R for web browser
Hi Everyone, Does anyone know of any projects for running an interactive R session within a web browser? I'm looking for something similar to the one on the Ruby website (http://tryruby.org), except for R. Thanks for your responses in advance! Lanna ----- Lanna Jin lannajin at gmail.com 510-898-8525 -- View this message in context:
2010 Mar 10
2
function to create multiple matrices
Hi All, If given a dataframe (long form) with Year, Species, and Location, How would I write a function that would create a unique matrix of Species & Location for each Year? What I've tried doing is the following: data #dataframe dataT<-table(data$Species,data$Location,data$Year) #creates tables of Species vs Location for each Year But I'm encountering issues individually
2010 Mar 16
1
nested looping functions and dataframes
Hey All, So, I am confused how exactly to use nesting loop functions in R to spit out data frames. I've managed to create a working function for my data set that generates a data frame for a given set of Year i and Location j; but how would I do it for all Years and Locations? Here is my working function: test<-function(i,j){ a<-x[which(x$Year==i & x$Location==j),]
2011 Nov 07
2
adjusting levelplot color scale to data
Hi guys, I have a matrix with values varying from approximately -0.7 to 0.33 that I want to create a heatmap/levelplot with. When I execute the levelplot function for my matrix, I end up getting colors that are adjusted to the max and min rather than around 0. In other words, ideally I would like to have a color ramp that goes from red (negative number), to white (0), to blue (positive);
2012 Mar 29
1
Retrieving matrix column and row names by index value
Hi all, So let's say I have a matrix, mdat and I only know the index number. How do I retrieve the column and row names? For example, > mdat <- matrix(c(1,2,3, 11,12,13), nrow = 2, ncol=3, byrow=TRUE, dimnames = list(c("row1", "row2"), c("C.1", "C.2", "C.3"))) > mdat[4] [1] 12 >
2010 May 04
7
How to replace all <NA> values in a data.frame with another ( not 0) value
I need to replace <NA> occurrences in multiple columns in a data.frame with "000/000" how do I achieve this? Thanks Nevil Amos
2010 May 03
8
Delete rows with duplicate field...
as a r noob i am having another problem: i have a big dataframe where each row corresponds to one entry and each column is a field... for instance, i have the column ID and time and many more... Id like to get a dataframe where all IDs are just included once (some users with that ID might have several entries but Id like to kepp only one).. when i use unique I only get a list of the levels (or
2003 Jun 25
2
probelem of function inside function
Hi, I encountered a problem when I am trying to write my own function which contains another function. To simplify a problem, I tried the following simplified function, hope someone can idenfity the problem for me. I have a simple data frame called "testdata" as following: >
2010 May 17
2
Variable variables using R ... e.g., looping over data frames with a numeric separator
Hello, I have programmed in PHP a lot, and wanted to know if anyone figured out Variable variables using R. For example, I have several dataframes of unequal sizes that relate to L treatments (1, 2, 3, 4, 5,6, L) ... in this case L=7 fData.1 unique.1 fit.nls.1 summary.nls.1 fit.var.1 summary.var.1 ..... fData.2 unique.2 fit.nls.2 summary.nls.2 fit.var.2 summary.var.2 ..... fData.L unique.L
2013 Mar 25
3
Obtaining the internal integer codes of a factor XXXX
Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a factor (using as.numeric() as below), but what is the best way to obtain these codes for the levels() of a factor (since the as.numeric() results don't really make clear which code maps to which level)?
2007 Sep 17
2
vector name
I have got a list named "filtered", I would like to construct alist named "fdata" as following: fdata <- cbind(matrix(unlist(filtered),ncol=28), myregime) If I try names(filtered), it gives all the correct name for each vector, but if I try names(fdata), it appears "filtered[[1]]" "filtered[[2]]" ..., How can I keep the name in "fdata"?
2001 Dec 13
2
k-means with euclidian distance but no coordinates
Hi, I'm trying to build a thesaurus that will sensible values for rare words. I suspect the best algorithm to use is k-means although I'm not sure about that -- I would have preferred a k dimensional space with a binary cluster in each dimension so a word can belong to 0..k clusters, but I digress... I can measure the strength of correlation between words fairly easily by counting
2005 Mar 08
2
problem in compiling openh323
hello all i am having a problem in compiling openh323. [root@kamran openh323]# ./configure checking for g++... g++ checking for C++ compiler default output... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails.
2009 Jun 23
2
Weighting column entries in a data frame
Hi Guys, I would like to weight column entries in a data frame by the population of each state. For example, here is some data: state statenum year income popul ALABAMA 1 1 9.703193 3973.00 ALABAMA 1 2 9.745950 3992.00 ALABAMA 1 3 9.762092 4015.00 ALASKA 2 1 10.221640 532.00 ALASKA 2 2 10.169600
2009 Jan 21
1
problem with rbind
Hi All, I have a problem with rbind. I have data that consist of weight height .. etc of 1000 patients. I would like to find the mean and the standard deviation ( for the weight , height etc) for each gender. data<-read.table("data.txt", header=T, sep='\t') fdata=NULL for (i in 1:50){ nn<-names(X)[i] m<-tapply(X[,i],data$gender,mean,na.rm=T) s<-tapply(X[,i],
2004 Dec 19
2
OH323 channel compile error
Hello I am trying to compile asterisk-oh323-0.7.0 with pwlib-Janus_patch4 and openh323-Janus_patch4 downloaded from inaccessnetworks so I did this: tar -zxvf openh323-Janus_patch4-src-tar.gz cd openh323 patch -p1 < /root/asterisk-oh323-0.7.0/openh323_1.13.5-make.patch ./configure make opt cd asterisk-oh323-0.7.0 vi Makefile (to set the paths and options according to my system...) NOW I
2020 Sep 15
2
[ELF] String literals don't obey -fdata-sections
Hi there, When I compile my code with -fdata-sections and -ffunction-sections, I still see some unused string in my shared library (Android). Actually, the strings appear together inside a .rodata.str1.1 section instead of getting their own section. It seems that the C-string literal are considered differently than other constant and the -fdata-sections is not respected in