search for: cat4

Displaying 10 results from an estimated 10 matches for "cat4".

Did you mean: cat
2011 Jan 17
2
matrix manipulations
...5", "cat6"))) > m1 cat2 cat5 cat6 land 32 35 36 water 12 15 16 m2 <- matrix(c(45, 46, 47, 48, 21, 22, 23, 24), nrow = 2, ncol = 4, byrow = TRUE, dimnames = list(c("land", "water"), c("cat1", "cat2", "cat3", "cat4"))) > m2 cat1 cat2 cat3 cat4 land 45 46 47 48 water 21 22 23 24 So my end desired result should be a matrix (or a data frame) that has 6 columns called cat1 to cat6 and 2 rows labeled land and water, and for the category that appears in both m1 and m2 the end result will...
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
...ems okay as it is a small dataset. It looks a bit inelegant and given all the warnings in the Intro to R, etc, about using loops I wondered if anyone could suggest something a bit simpler or more efficent? Example: cat1 <- c( 1,1,6,1,1,5) cat2 <- c( 1,2,3,4,5,6) cat3 <- c( 5,4,6,7,8,8) cat4 <- c( 1,2,1,2,1,2) years <- c( 'year1', 'year2', 'year3', 'year3', 'year1', 'year1') id <- c('a','a','b','c','c','a') df1 <- data.frame(id,years,cat1,cat2, cat3, cat4) nn <- levels(df1$...
2007 Dec 19
3
median of binned values
...nd I need to find the median category. Trivial to do by hand, but I was wondering if there is a means to do it in R in an elegant way. The obvious medioan(vector) returns the median frequency for the binns, and that is not what I want. i.e,: freq cat1 1 cat2 10 cat3 100 cat4 1000 cat5 10000 I want it to return cat5, instead of cat3. Thanks a lot Martin
2006 Mar 25
2
acts_as_tree wierdness with children.count and children.size
...i iterate over the category using my counter_cache however it would show a different number than what was actually being represetned in the tree. Here is an example cat.children = [cat2, cat3] puts cat.children.size 2 puts cat.children_count 2 cat4.parent_id = cat.id cat4.save puts cat.children.size 2 puts cat.children_count 2 however cat.children.count produces the correct number (3) what gives? Thanks, Mark -- -------------------------------------------------------------------- I a...
2010 Sep 29
0
R Graphic - Tellis as a potential
Hello all, I have been meaning to learn R for a while and have just subscribed to this list. I am planning to give R a shot at one of my live projects. I am looking to explore graphical features of R on my data below. Sample Data: Cat1 - Cat2 - Cat3 - Cat4 - NumPeople - Salary H - L - H - L - 100 - 50000 L - L - L - L - 40 - 30000 - H - H - - 100 - 45000 Cat1 through Cat4 are categorical variables containing High, Medium, Low or Blank values and the last two variables are continuous. 1. Is there a good way of graphically representing this data...
2011 Apr 12
2
Converting a categorical variable to multiple dichotemous variables
I have a categorical variable in a dataframe similar to the following... cat 1 1 3 2 4 I need to convert it to 4 dichotemous variables for each observations like... cat1 cat2 cat3 cat4 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 Thanks in advance! Shane
2009 Aug 21
2
compare observed and fitted GAM values
Hi, I am comparing the observed and fitted values of my GAM model, which includes the explanatory variables: longitude, depth, ssh, year and month. When I compare observed and fitted values for longitude, depth and ssh it works. But when I try to do it for month and year (which are as factors in the GAM model) it doesn't work. My observed and fitted values are exactly the same.. How is that
2005 Sep 24
1
Encrypt some services with ipsec
Hi all, I have two prodction servers with FreeBSD 5.4 (all security patches are applied). They running some services like dns, ssh, http, ftp, etc. But I woukd like to encrypt some services for some hosts with ipsec when it is accessed. For example: - DNS resolution: not encrypted. - DNS replication master-slave: encrypted by ipsec. - Telnet: encrypted by ipsec for some hosts. Deny
2013 Jan 01
1
Order variables automatically
Hi, I have a dataset with 6 categorical variables. I have used this following code to make the variables u1-u6 ordered factors and this works well. cat1cat2 cat3 cat4 cat5 cat6 ? 0 ? ?? 1 ? ? 1????? 0 ??? 0? ?? 1 ? 1 ? ?? 1 ? ? 0 ? ?? 0 ? ? 0 ? ? 0 ....... .... ############ data<-read,table("example.txt") data <- as.data.frame(lapply(data, ordered)) ############ Now, suppose I have bigger dataset where some variables are categorical (cat)...
2004 Feb 24
2
Samba Slow, and I have high Quality NICS
I have SLOW file transfers across samba to my Windows Server 2000 domain. I am using a built in 100bT Intel Pro NIC, I have tried the built in gigabit NIC and a PCI 3com, all with the same results. Using iperf, I get about 45-90Mb of bandwidth from my PC's to my samba server. I can pull it up by \\servername <file:///\\servername> or \\ipaddress <file:///\\ipaddress> with out