Displaying 20 results from an estimated 1000 matches similar to: "Frequencies, proportions & cumulative proportions"
2010 Feb 17
2
extract the data that match
Hi r-users,
 
I would like to extract the data that match.  Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
            z  intg rand_no
   [1,]  0.00 0.000   0.001
   [2,]  0.01 0.000   0.002
   [3,]  0.02 0.000   0.002
   [4,]  0.03 0.000   0.003
   [5,]  0.04 0.000   0.003
   [6,] 
2004 Feb 17
1
Comparison of % variance explained by each PC before AND after rotation
Hello again-
Thanks to Prof. Ripley for responding to my previous question.
I would like to clarify my question using sample code.   I will use some 
sample code taken from ?prcomp
Again, I would like to compare the % variance explained by each PC 
before and after rotation.
< code follows >
data(USArrests)
pca = prcomp(USArrests, scale = TRUE)
# proportion variance explained by each
2005 Dec 14
4
unable to force the vector format
Dear all,
I am so ashamed to pollute the list with a trivial question, but it is a
long time I have not used R, and I need a result in the next one or two
hour...
I have a table which I have loaded with read.table, and I want to make
the mean of its columns.
> slides <- read.table("slides.txt")
> slides [1:5,]
            V1    V2     V3     V4     V5     V6     V7     V8
1
2007 May 12
4
Multiply and format with thousands separator
I have just started with Ruby and Rails and am still greatly confuse,
finding the usual tutorials not much help.
What I want to do is take two numbers from my database, multiply them
together and display them in a list with a comma for the thousands
separator. This would be very easy to do in a spreadsheet, so I assumed
it would be easy to do in Ruby on Rails but I can''t work out how.
I
2012 May 07
1
Can't find the error in a Binomial GLM I am doing, please help
Hi all,
I can't find the error in the binomial GLM I have done. I want to use that
because there are more than one explanatory variables (all categorical) and
a binary response variable.
This is how my data set looks like:
> str(data)
'data.frame':	1004 obs. of  5 variables:
 $ site  : int  0 0 0 0 0 0 0 0 0 0 ...
 $ sex   : Factor w/ 2 levels "0","1": NA NA NA
2015 Oct 22
2
C_LogLin (stats/loglin)
Hi everyone,
I have a question regarding a C function of the "stats" package in R.
I tried to understand the ?loglin? basic function of the ?stats?  
package implemented in
R. The implemented function itself runs without any problem (perhaps  
see sample). When I
ran it line by line it stopped at the lines 23-24 of the  
loglin-function; (the following line):
z <- .Call(C_LogLin,
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end.
I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis.
I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
install.packages("systemfit")
2012 Feb 26
6
loop for a large database
Yes, I am a newbie.
I have a data.frame (MyTable) of  1445846  rows and  15  columns with
character data.
And a character vector (MyVector) of 473491 elements.
I want simply to get a data.frame with the count of how many times each
element of MyVector appears in MyTable.
I've tried a loop with : for (i in 1 : length (myvector))  sum (MyTable== i)
but it crashes my computer.
I've also
2013 Mar 14
1
error: object of type 'closure' is not subsettable
Hi all,
when i run this script:
>read.table("Angelika.txt",header=T,sep="\t")
>mytable=read.table("Angelika.txt",header=T,sep="\t")
>for ( dye in c("A","B","C","F","G","K","L","M"))
+      {
+      for (cond in 1:8)
+          {
+          measurement =
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
str(Empdata)
Empdata$gnipc<-as.numeric(Empdata$gnipc)
install.packages("systemfit")
library("systemfit")
pdata <- plm.data(Empdata,
2006 Mar 06
4
Contingency table and zeros
Hello,
Let's assume I have a vector of integers :
 > myvector <-  c(1, 2, 3, 2, 1, 3, 5)
My purpose is to obtain the cumulative distribution of these numerical 
data, i.e. something like :
value	nb_occur.
<=1    2
<=2    4
<=3    6
<=4    6
<=5    7
For this, I create a table with ;
 > mytable <- table(myvector)
1 2 3 5
2 2 2 1
However, table() returns an array
2012 Mar 06
1
frequency count by row
I feel this is a very easy thing but I've never done it before and it is
getting frustrating.
I have a big data.frame (1445846 rows,  15 col)
 that looks like this:
                V1          V2         V3          V4          V5
1    home      sister        brother   chair       0
2    cat             dog          animal      0           0
3    girl            boy           0              
2010 Jul 26
4
using string variable as order() function argument
Hello,
In my script I would like to use a loop, which sorts the dataframe 
according to different columns, pointed by the string variable.
     id col1  col2  col3
1   10    0    4      8
2   11    1    2      2
3   12    0    8      3
4   13    0    5      5
Usually the order() function can be used like this:
sorted = mytable**[order(column3) , ]
which results in properly sorted table:
**
 
2009 Nov 22
3
Define return values of a function
I have created a function to do something:
i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5,  
1)))
k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9,  
1)))
mytable <- function(x){
   xtb <- x
   btx <- x
   # do more with x, not relevant here
   cat("The table has been created,
2007 Apr 20
2
Caching of database values
If do something like this:
    dbObj = MyTable.find_by_id(5)
    a = dbObj.name
    b = dbObj.name
How many times will an SQL call be made to get the value of
MyTable.name for id 5?  In other words, are the values for dbObj
cached in the object?  Is there a way of controlling that?  (I can
imagine that sometimes you might not want to cache them if you wanted
to be sure of having the latest
2008 Mar 08
1
ask for help on nonlinear fitting
I have a table like the following. I want to fit Cm to Vm like this:
Cm ~ Cl+Q1*b1*38.67*exp(-b1*(Vm-Vp1)*0.03867)/(1+exp(-b1*(Vm-Vp1)*0.03867))^2+Q2*b2*38.67*exp(-b2*(Vm-Vp2)*0.03867)/(1+exp(-b2*(Vm-Vp2)*0.03867))^2
I use nls, with start=list(Q1=2e-3, b1=1, Vp1=-25, Q2=3e-3, b2=1,
Vp2=200). But I always get 'singlular gradient' error like this. But
in SigmaPlot I can get the result. How
2007 May 06
1
simple table ordering question
Hi all,
 
I'm sure this is simple but I don't get it.
 
I have a table
 
mytable<-c(rep("Disagree",37),rep("Agree",64))
table(mytable)
 
this gives me
Agree    Disagree
64        37
 
but I didn't ask for it to be in alphabetic order.
 
How can I get it in original order?
 
Disagree    Agree
37            64
 
Thanks,
Jeff
 
 
 
 
Jeffrey. M. Miller, PhD
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal.
On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2005 Oct 31
2
nlme error message
Dear Friends,
I am seeking for any help on an error message in lme 
functions. I use mixed model to analyze a data with 
compound symmetric correlation structure. But I get an 
error message: "Error in corMatrix.corCompSymm(object) : 
NA/NaN/Inf in foreign function call (arg 1)". If I change 
the correlation structure to corAR1, then no error. I have 
no clue how to solve this problem.