similar to: How to set the dimension of a matrix correctly?

Displaying 12 results from an estimated 12 matches similar to: "How to set the dimension of a matrix correctly?"

2010 Oct 12
0
Stripes in the plot
I'm trying to plot the spatial distribution of the precipitation within an area. However, I think some thing wrong with the way to create the matrix for the precipitation data, so it came out lots of stripes. Could somebody help to see what's the problem? Here's the code: library(maptools);gpclibPermit() KSR <-
2011 Jul 27
2
for loop help
I am having a hard time putting the below into a loop, where it pulls out ppt from all he stations I have versus having to go through and hard code the data to the specific stations. I tried stnID <- stnid[which(duplicated(stnid)==FALSE)] for(i in 1:length(stnID)) { ppt[i] <- ppt[which(stnid==[i])] } but it doesn't like to use the which function inside a for loop? Any idea's here is
2010 Jan 05
3
R matching lat/lon pairs from two datasets?
Hello, I am trying to match lat/lon from one dataset with the lat/lon from a second dataset and use that rows data for calculations. I am using match, but this is finding the first match and not comparing the pair, how can I determine if the lat/lon are the same? See example below. Is there a better way to determine to a matching pair of lat/lon values? Example Datasets: > data2
2005 Jul 22
1
Authenticate pptpd server on a domain controller
Hello. I have two servers: -One is a vpn server with pptpd. It has debian sarge 3.1, kernel(2.6.8), pptd(1.2.1-4), ppp(2.4.3-2) and Samba(3.0.14a-3). All the accounts to log on the vpn are on /etc/ppp/chap-secrets file. -The other is a pdc with samba(2.2.7) in red hat 8 I want the accounts in the first server (chap-secrets file) authenticate against the pdc server (/etc/samba/smbpasswd) on
2008 Jun 26
3
using contour() with x,y,z data?
Hello list, I'm new to R and I have a problem :-) Below is what my data file that looks like. I tried to import and contour this data by doing this: cv_data <- read.table("cv_data.csv",sep=",",header=TRUE) attach(cv_data) contour(x,y,z) I get the error "Error in contour.default(x,y,z) : increasing 'x', and 'y' values expected" I
2012 Aug 28
3
date in plot, can't add regression line
Hello all, I have been using R for about 3 weeks and I am frustrated by a problem. I have read R in a nutshell, scoured the internet for help but I either am not understanding examples or am missing something completely basic. Here is the problem: I want to plot data that contains dates on the x axis. Then I want to fit a line to the data. I have been unable to do it. This is an example of
2010 Jan 21
3
cross validation function translated from stata
Hi, everyone: I ask for help about translating a stata program into R. The program perform cross validation as it stated. #1. Randomly divide the data set into 10 sets of equal size, ensuring equal numbers of events in each set #2. Fit the model leaving out the 1st set #3. Apply the fitted model in (2) to the 1st set to obtain the predicted probability of a prostate cancer diagnosis. #4. Repeat
2010 Mar 11
2
about IRT simulation
hello R: we have a two-parameter IRT simulation code. The goal is to generate a response matrix.But the "for" part doesn't run. we don't know what is wrong with it. Thanks so much~~~ I <- 10 J <- 5 response <- matrix(0, 10, 5) pij <- function(a,b,theta) { a <- rnorm(J, 0.8, 0.04) a b <- rnorm(J, 0, 1) b theta <- rnorm(I, 0,1) theta for( i in 1:I ) { for(
2011 Jun 01
0
Anyone have experience with kinship pedigree plot?
Hello, I am using the Kinship package to draw a pedigree plot. I am trying to control the spacing between individuals in the pedigree. Currently, it is drawing a pedigree with too little space, so the text is overlapping. I'd like to increase the distance between individuals. According to the documentation, I would expect the following to be relevant:
2009 Jan 23
1
Anova and unbalanced designs
Dear R-list! My question is related to an Anova including within and between subject factors and unequal group sizes. Here is a minimal example of what I did: library(car) within1 <- c(1,2,3,4,5,6,4,5,3,2); within2 <- c(3,4,3,4,3,4,3,4,5,4) values <- data.frame(w1 = within1, w2 = within2) values <- as.matrix(values) between <- factor(c(rep(1,4), rep(2,6))) betweenanova <-
2005 Sep 29
20
maclist problem on a firewall/bridge/router system with masquerading
Hy, sorry for my poor english i think i''m having a very unusual problem and very dificult to track, but i''ll try to explain it as best as i can. here is my scenario: a firewall/bridge composed of 3 ethernet devices and 1 virtual one. my bridge (br0 ) is composed of eth0, eth1 and tap0 br0:eth0 is my connection to my router (200.244.92.1) br0:eth1 is my connection to my
2003 Dec 13
1
Mapping CIFS/Samba problem
All, The Windows 2000 client is on my side of the firewall (the error message is: "remote computer is not available"), the Windows XP client is on the other side of the firewall, (the error message is: "The specified network name is no longer available"). I am able to ping both the IP address and server name of the CIFS/Samba server. I cannot perform the mapping, via Map